Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update config #100

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ You also need to install NVIDIA's SE(3)-Transformer (**please use SE3Transformer
```
conda activate RF2NA
cd SE3Transformer
pip install --no-cache-dir -r requirements.txt
python setup.py install
cd ..
```
Expand Down
28 changes: 16 additions & 12 deletions RF2na-linux.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,28 @@
name: RF2NA
channels:
- pytorch
- nvidia
- defaults
- conda-forge
dependencies:
- python=3.10
- python==3.10.14
- pip
- pytorch
- requests
- pytorch-cuda=11.7
- dglteam/label/cu117::dgl
- pyg::pyg
- bioconda::mafft
- bioconda::hhsuite
- bioconda::blast
- bioconda::hmmer>=3.3
- bioconda::infernal
- bioconda::cd-hit
- bioconda::csblast
- conda-forge::llvm-openmp
- pip:
- pandas
- torch==2.2.1
- torchvision
- torchaudio
- torchdata
- torch_geometric
- psutil
- tqdm
- tqdm
- torchdata
- pydantic
- e3nn
- wandb
- pynvml
- git+https://github.com/NVIDIA/dllogger#egg=dllogger
- https://data.dgl.ai/wheels/cu121/dgl-2.0.0%2Bcu121-cp310-cp310-manylinux1_x86_64.whl
2 changes: 1 addition & 1 deletion input_prep/make_rna_msa.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ out_dir="$2"
out_tag="$3"

overwrite=true
if [ -f $out_dir/$out_tag.afa -a $overwrite = false]
if [ -f $out_dir/$out_tag.afa -a $overwrite == false ]
then
exit 0
fi
Expand Down
9 changes: 6 additions & 3 deletions network/predict.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,9 +360,12 @@ def _run_model(self, L_s, msa_orig, ins_orig, t1d, t2d, xyz_t, xyz, alpha_t, sam

# Read template database
FFDB = args.db
FFindexDB = namedtuple("FFindexDB", "index, data")
ffdb = FFindexDB(read_index(FFDB+'_pdb.ffindex'),
read_data(FFDB+'_pdb.ffdata'))
if FFDB is not None:
FFindexDB = namedtuple("FFindexDB", "index, data")
ffdb = FFindexDB(read_index(FFDB+'_pdb.ffindex'),
read_data(FFDB+'_pdb.ffdata'))
else:
ffdb = None

if (torch.cuda.is_available()):
print ("Running on GPU")
Expand Down
23 changes: 12 additions & 11 deletions run_RF2NA.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ set -e
############################################################
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('conda' 'shell.bash' 'hook' 2> /dev/null)"
eval "$__conda_setup"
unset __conda_setup
#__conda_setup="$('conda' 'shell.bash' 'hook' 2> /dev/null)"
#eval "$__conda_setup"
#unset __conda_setup
# <<< conda initialize <<<
############################################################

Expand All @@ -22,7 +22,7 @@ MEM="64" # max memory (in GB)
WDIR=`realpath -s $1` # working folder
mkdir -p $WDIR/log

conda activate RF2NA
#conda activate RF2NA

# process protein (MSA + homology search)
function proteinMSA {
Expand All @@ -36,7 +36,7 @@ function proteinMSA {
then
echo "Running HHblits"
echo " -> Running command: $PIPEDIR/input_prep/make_protein_msa.sh $seqfile $WDIR $tag $CPU $MEM"
$PIPEDIR/input_prep/make_protein_msa.sh $seqfile $WDIR $tag $CPU $MEM > $WDIR/log/make_msa.$tag.stdout 2> $WDIR/log/make_msa.$tag.stderr
$PIPEDIR/input_prep/make_protein_msa.sh $seqfile $WDIR $tag $CPU $MEM > $WDIR/log/make_msa.$tag.stdout #2> $WDIR/log/make_msa.$tag.stderr
fi


Expand All @@ -48,7 +48,7 @@ function proteinMSA {
echo "Running hhsearch"
HH="hhsearch -b 50 -B 500 -z 50 -Z 500 -mact 0.05 -cpu $CPU -maxmem $MEM -aliw 100000 -e 100 -p 5.0 -d $HHDB"
echo " -> Running command: $HH -i $WDIR/$tag.msa0.ss2.a3m -o $WDIR/$tag.hhr -atab $WDIR/$tag.atab -v 0"
$HH -i $WDIR/$tag.msa0.a3m -o $WDIR/$tag.hhr -atab $WDIR/$tag.atab -v 0 > $WDIR/log/hhsearch.$tag.stdout 2> $WDIR/log/hhsearch.$tag.stderr
$HH -i $WDIR/$tag.msa0.a3m -o $WDIR/$tag.hhr -atab $WDIR/$tag.atab -v 0 > $WDIR/log/hhsearch.$tag.stdout #2> $WDIR/log/hhsearch.$tag.stderr
fi
}

Expand All @@ -64,7 +64,7 @@ function RNAMSA {
then
echo "Running rMSA (lite)"
echo " -> Running command: $PIPEDIR/input_prep/make_rna_msa.sh $seqfile $WDIR $tag $CPU $MEM"
$PIPEDIR/input_prep/make_rna_msa.sh $seqfile $WDIR $tag $CPU $MEM > $WDIR/log/make_msa.$tag.stdout 2> $WDIR/log/make_msa.$tag.stderr
$PIPEDIR/input_prep/make_rna_msa.sh $seqfile $WDIR $tag $CPU $MEM > $WDIR/log/make_msa.$tag.stdout #2> $WDIR/log/make_msa.$tag.stderr
fi
}

Expand All @@ -85,24 +85,25 @@ do

if [ $type = 'P' ]
then
proteinMSA $fasta $tag
proteinMSA $fasta_name $tag
argstring+="P:$WDIR/$tag.msa0.a3m:$WDIR/$tag.hhr:$WDIR/$tag.atab "
nP=$((nP+1))
lastP="$tag"
elif [ $type = 'R' ]
then
RNAMSA $fasta $tag
echo $fasta_name $tag
RNAMSA $fasta_name $tag
argstring+="R:$WDIR/$tag.afa "
nR=$((nR+1))
lastR="$tag"
elif [ $type = 'D' ]
then
cp $fasta $WDIR/$tag.fa
cp $fasta_name $WDIR/$tag.fa
argstring+="D:$WDIR/$tag.fa "
nD=$((nD+2))
elif [ $type = 'S' ]
then
cp $fasta $WDIR/$tag.fa
cp $fasta_name $WDIR/$tag.fa
argstring+="S:$WDIR/$tag.fa "
nD=$((nD+1))
fi
Expand Down