diff --git a/README.md b/README.md index c85d64d..08e384c 100644 --- a/README.md +++ b/README.md @@ -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 .. ``` diff --git a/RF2na-linux.yml b/RF2na-linux.yml index 6f737b3..7474413 100644 --- a/RF2na-linux.yml +++ b/RF2na-linux.yml @@ -1,17 +1,7 @@ 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 @@ -19,6 +9,20 @@ dependencies: - bioconda::infernal - bioconda::cd-hit - bioconda::csblast + - conda-forge::llvm-openmp - pip: + - pandas + - torch==2.2.1 + - torchvision + - torchaudio + - torchdata + - torch_geometric - psutil - - tqdm \ No newline at end of file + - 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 diff --git a/input_prep/make_rna_msa.sh b/input_prep/make_rna_msa.sh index d731ee7..70d510c 100755 --- a/input_prep/make_rna_msa.sh +++ b/input_prep/make_rna_msa.sh @@ -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 diff --git a/network/predict.py b/network/predict.py index 71a71de..733efeb 100644 --- a/network/predict.py +++ b/network/predict.py @@ -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") diff --git a/run_RF2NA.sh b/run_RF2NA.sh index 12bad0f..1883a4d 100755 --- a/run_RF2NA.sh +++ b/run_RF2NA.sh @@ -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 <<< ############################################################ @@ -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 { @@ -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 @@ -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 } @@ -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 } @@ -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