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

no blastfile #3

Open
PercyCapebiosa opened this issue Dec 10, 2021 · 6 comments
Open

no blastfile #3

PercyCapebiosa opened this issue Dec 10, 2021 · 6 comments

Comments

@PercyCapebiosa
Copy link

Hi I hope you are well. I am trying to run sprayandpray on a couple of MAGs to decontaminate them.
i have installed the program very well and i have the nr.dmnd file however, i recieve this error when i run the command

spray-and-pray.py -g S13.bin.6_loki.fa -ref nr2.dmnd -out S13.bin.6_loki -t 12

error:

Reference database: nr2.dmnd
Input genome: S13.bin.6_loki.fa
Running Prodigal: calling ORFs from provided contigs
Running Diamond BLAST
Traceback (most recent call last):
File "/home/percy/SprayNPray/spray-and-pray.py", line 725, in
blast = open(blastFile)
FileNotFoundError: [Errno 2] No such file or directory: 'S13.bin.6_loki.fa.blast'

please help

@Arkadiy-Garber
Copy link
Owner

Arkadiy-Garber commented Dec 10, 2021

Hi there, thanks for your interest in SprayNPray. Sorry that you are having issues, but hopefully, we can get to this bottom of this quickly.

So based on your command, there should be a file generated from BLAST, called S13.bin.6_loki.fa.blast. However, this file is not produced for some reason, since SprayNPray cannot find it. I can think of two possible reasons for this:

  1. You generated the nr2.dmnd file outside of the SprayNPray conda environment, in which case, there is version conflict (if the dmnd blast database was generated under one version of DIAMOND, but the DIAMOND BLASTP run is carried out under a different version) - this creates errors that crash the program.
  2. The second and more likely reason that this is happening is because your argument for the -ref flag is -ref nr2.dmnd. Please try again with the following command: spray-and-pray.py -g S13.bin.6_loki.fa -ref nr2 -out S13.bin.6_loki -t 12. As you can see, the .dmnd extension was removed, because it is also added on within the script when looking for that database file.

Does this make sense? Let me know if this works, or if you continue to have issues.

Thanks!
Arkadiy

@PercyCapebiosa
Copy link
Author

PercyCapebiosa commented Dec 11, 2021 via email

@gaworj
Copy link

gaworj commented Mar 17, 2022

Hi,

I have also noticed similar problem with lack of blast file using conda installation
.
Tried with nr BLAST db (diamond db was created by sprayandpracy or manually in the conda env) with no success and even switched to your toy dataset:

spray-and-pray.py -g 2851_assembly.fasta -out 2851_sap -ref SprayNPray/toy_dataset/test_database.faa
.
Reference database: SprayNPray/toy_dataset/test_database.faa
Input genome: 2851_assembly.fasta
Running Prodigal: calling ORFs from provided contigs
Running Diamond BLAST
Traceback (most recent call last):
File "/home/jang/biosoft/SprayNPray/spray-and-pray.py", line 635, in
blast = open(blastFile)
FileNotFoundError: [Errno 2] No such file or directory: '2851_assembly.fasta.blast'

When I have run the test it was more or less OK:

bash testRun.sh
.
Reference database: toy_dataset/test_database.faa
Input genome: toy_dataset/test_dataset.fasta
Running Prodigal: calling ORFs from provided contigs
Running Diamond: making DIAMOND BLAST database
Running Diamond BLAST
Calculating GC-content
Preparing summary: testrun.csv
Starting the binning algorithm
Estimating the number of genomes
Predicting 2 clusters
Calculating tetranucleotide frequency
Extracting GC and gene density from summary file
Calculating codon usage bias
Consolidating
Transforming data
Writing predicted clusters to bins:
--cluster_1.fa: 0.538294 Mb
--cluster_0.fa: 0.138927 Mb

SprayNPray finished without errors. Checking the output files to make sure everything is in check...
Traceback (most recent call last):
File "/home/jang/biosoft/SprayNPray/md5sum-check.py", line 539, in
md5 = open("%s/md5sum.txt" % args.i)
FileNotFoundError: [Errno 2] No such file or directory: 'toy_dataset/md5sum.txt'

Interestingly when I change the file database file extension after -ref argument to filename as you suggested:

spray-and-pray.py -g 2851_assembly.fasta -out 2851_sap -ref SprayNPray/toy_dataset/test_database
.
Reference database: SprayNPray/toy_dataset/test_database
Input genome: 2851_assembly.fasta
Running Prodigal: calling ORFs from provided contigs
SprayNPray cannot locate the diamond blast database file
Would you like to SprayNPray to make a diamond blast db? If not, SprayNPray will exit. (y/n): y
Running Diamond BLAST
Traceback (most recent call last):
File "/home/jang/biosoft/SprayNPray/spray-and-pray.py", line 635, in
blast = open(blastFile)
FileNotFoundError: [Errno 2] No such file or directory: '2851_assembly.fasta.blast'

Any other hints?

Bests,
Jan

@Arkadiy-Garber
Copy link
Owner

Hi Jan,

Thanks for your interest, and apologies that this issue has resurfaced for you. I just combed through the script and identified some potential spots/bugs that might be causing the error. I uploaded the updated version fo SprayNPray to GitHub. Please try again with a fresh download, and let me know if the issue persists.

Thanks!
Arkadiy

@Arkadiy-Garber
Copy link
Owner

Hello,

Just touching base on this issue - has this problem been resolved given the latest updates? If so, I will close this issue.

Thanks!
Arkadiy

@cslamo
Copy link

cslamo commented Jan 11, 2023

I have a similar issue. The blast db file is not being created, e.g.:

(sprayandpray) cslamo@HAL9001:~/SprayNPray$ spray-and-pray.py -g Bih_contigs.fasta -ref reference_proteins.faa -t 16 --meta --euk --fa . Reference database: reference_proteins.faa Input genome: Bih_contigs.fasta SprayNPray will write a FASTA file with contigs matching user-specified metrics: Bih_contigs.spraynpray-contigs.fa SprayNPray will write a FASTA file with contigs not matching user-specified metrics: Bih_contigs.spraynpray-unmatched.contigs.fa Domain restriction: NA Running Prodigal: calling ORFs from provided contigs SprayNPray cannot locate the diamond blast database file Would you like to SprayNPray to make a diamond blast db? If not, SprayNPray will exit. (y/n): y Running Diamond BLAST Traceback (most recent call last): File "/home/cslamo/SprayNPray/spray-and-pray.py", line 688, in blast = open(blastFile) FileNotFoundError: [Errno 2] No such file or directory: 'Bih_contigs.fasta.blast'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants