marcelauliano / MitoHiFi

Find, circularise and annotate mitogenome from PacBio assemblies
MIT License
169 stars 29 forks source link

Error - can't makeblastdb #102

Open desmodus1984 opened 2 months ago

desmodus1984 commented 2 months ago

Hi,

I am working on an HPC with Linux. I installed MitoHifi as stated and then I loaded MitoFinder 1.4.1.

I used the following code python MitoHiFi/src/mitohifi.py -o 5 -r CB_Parent.fasta -f c.elegans.mito.fasta -t 10 -g c.elegans.mito.gb , with PacBio Hifi reads, and I downloaded the fasta and gbk of C elegans N2, since I am working with a different strain, same species.

Everything worked fine until the makeblastdb.

2024-09-04 23:44:13 [INFO] Welcome to MitoHifi v2. Starting pipeline... 2024-09-04 23:44:13 [INFO] Length of related mitogenome is: 13794 bp 2024-09-04 23:44:13 [INFO] Number of genes on related mitogenome: 36 2024-09-04 23:44:13 [INFO] Running MitoHifi pipeline in reads mode... 2024-09-04 23:44:13 [INFO] 1. First we map your Pacbio HiFi reads to the close-related mitogenome 2024-09-04 23:44:13 [INFO] minimap2 -t 10 --secondary=no -ax map-hifi c.elegans.mito.fasta CB_Parent.fasta | samtools view -@ 10 -b -F4 -F 0x800 -o reads.HiFiMapped.bam 2024-09-04 23:44:30 [INFO] 2. Now we filter out any mapped reads that are larger than the reference mitogenome to avoid NUMTS 2024-09-04 23:44:30 [INFO] 2.1 First we convert the mapped reads from BAM to FASTA format: 2024-09-04 23:44:30 [INFO] samtools fasta reads.HiFiMapped.bam > gbk.HiFiMapped.bam.fasta 2024-09-04 23:44:31 [INFO] Total number of mapped reads: 1407 2024-09-04 23:44:31 [INFO] 2.2 Then we filter reads that are larger than 13794 bp 2024-09-04 23:44:31 [INFO] Number of filtered reads: 1348 2024-09-04 23:44:31 [INFO] 3. Now let's run hifiasm to assemble the mapped and filtered reads! 2024-09-04 23:44:31 [INFO] hifiasm --primary -t 10 -f 0 -o gbk.HiFiMapped.bam.filtered.assembled gbk.HiFiMapped.bam.filtered.fasta 2024-09-04 23:45:34 [INFO] 4. Let's run the blast of the contigs versus the close-related mitogenome 2024-09-04 23:45:34 [INFO] 4.1. Creating BLAST database: 2024-09-04 23:45:34 [INFO] makeblastdb -in c.elegans.mito.fasta -dbtype nucl Traceback (most recent call last): File "MitoHiFi/src/mitohifi.py", line 565, in main() File "MitoHiFi/src/mitohifi.py", line 207, in main subprocess.run(makeblastdb_cmd, stderr=subprocess.DEVNULL, stdout=subprocess.DEVNULL) File "/home/juaguila/.conda/envs/mitohifi_env/lib/python3.7/subprocess.py", line 488, in run with Popen(*popenargs, **kwargs) as process: File "/home/juaguila/.conda/envs/mitohifi_env/lib/python3.7/subprocess.py", line 800, in init restore_signals, start_new_session) File "/home/juaguila/.conda/envs/mitohifi_env/lib/python3.7/subprocess.py", line 1551, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) FileNotFoundError: [Errno 2] No such file or directory: 'makeblastdb': 'makeblastdb'

Any reason why this doesn't work? I also installed Mitofinder in the same directory I am running now, and I added to the path and same problem.

ghost commented 2 months ago

Do you have BLAST loaded as part of your script?

desmodus1984 commented 2 months ago

Yes. I did install it in the conda environment and I also tried loading the HPC module