HRGV / phyloFlash

phyloFlash - A pipeline to rapidly reconstruct the SSU rRNAs and explore phylogenetic composition of an illumina (meta)genomic dataset.
GNU General Public License v3.0
77 stars 25 forks source link

nhmmer failure: Error was 'Inappropriate ioctl for device' and return code '35584' #178

Open osvatic opened 1 year ago

osvatic commented 1 year ago

It looks like nhmmer fails on phyloFlash v3.4.2.

I am running this command:

phyloFlash.pl -lib test_phyloflash -CPUs 32 -everything -read1 ../../data/interleave/JMF-2212-17-0001A.interleave.fastq.gz --interleaved -readlength 150 -clusterid 99 -dbhome /scratch/jmf/internal/Analyses_Jay/JMF_2212_17/results/138.1

Error log:

[13:05:22] Using dbhome
           '/scratch/jmf/internal/Analyses_Jay/JMF_2212_17/results/138.1'
[13:05:22] working on library 2212_17_0001A_phyloflash
[13:05:22] Using interleaved read data
[13:05:22] Forward reads
           ../../data/interleave/JMF-2212-17-0001A.interleave.fastq.gz
[13:05:22] Reverse reads from interleaved read file
           ../../data/interleave/JMF-2212-17-0001A.interleave.fastq.gz
[13:05:22] Running "everything" - overrides other command line options
[13:05:22] Current operating system linux
[13:05:22] Checking for required tools.
[13:05:22] Using cat found at "/usr/bin/cat".
[13:05:22] Using bbmap found at
           "/home/apps/conda/miniconda3/envs/phyloflash-3.4.2/bin/bbmap.sh".
[13:05:22] Using barrnap found at
           "/home/apps/conda/miniconda3/envs/phyloflash-3.4.2/lib/phyloFlash/barrnap-HGV/bin/barrnap_HGV".
[13:05:22] Using grep found at "/usr/bin/grep".
[13:05:22] Using spades found at
           "/home/apps/conda/miniconda3/envs/phyloflash-3.4.2/bin/spades.py".

[13:05:22] Using mafft found at
           "/home/apps/conda/miniconda3/envs/phyloflash-3.4.2/bin/mafft".
[13:05:22] Using awk found at "/usr/bin/awk".
[13:05:22] Using emirge_rename_fasta found at
           "/home/apps/conda/miniconda3/envs/phyloflash-3.4.2/bin/emirge_rename_fasta.py".
[13:05:22] Using emirge_amp found at
           "/home/apps/conda/miniconda3/envs/phyloflash-3.4.2/bin/emirge_amplicon.py".
[13:05:22] Using sed found at
           "/home/apps/conda/miniconda3/envs/phyloflash-3.4.2/bin/sed".
[13:05:22] Using reformat found at
           "/home/apps/conda/miniconda3/envs/phyloflash-3.4.2/bin/reformat.sh".
[13:05:22] Using plotscript_SVG found at
           "/home/apps/conda/miniconda3/envs/phyloflash-3.4.2/lib/phyloFlash/phyloFlash_plotscript_svg.pl".
[13:05:22] Using vsearch found at
           "/home/apps/conda/miniconda3/envs/phyloflash-3.4.2/bin/vsearch".
[13:05:22] Using fastaFromBed found at
           "/home/apps/conda/miniconda3/envs/phyloflash-3.4.2/bin/fastaFromBed".
[13:05:22] Using emirge found at
           "/home/apps/conda/miniconda3/envs/phyloflash-3.4.2/bin/emirge.py".
[13:05:22] Using nhmmer found at
           "/home/apps/conda/miniconda3/envs/phyloflash-3.4.2/lib/phyloFlash/barrnap-HGV/binaries/linux/nhmmer".
[13:05:22] All required tools found.
[13:05:22] filtering reads with SSU db using minimum identity of 70%
[13:05:22] running subcommand:
           /home/apps/conda/miniconda3/envs/phyloflash-3.4.2/bin/bbmap.sh
           fast=t minidentity=0.7 -Xmx20g reads=-1 threads=32 po=f
           outputunmapped=f
           path=/scratch/jmf/internal/Analyses_Jay/JMF_2212_17/results/138.1
           out=2212_17_0001A_phyloflash.bbmap.sam
           outm=2212_17_0001A_phyloflash.JMF-2212-17-0001A.interleave.fastq.gz.SSU.1.fq
           noheader=t ambiguous=all build=1
           in=../../data/interleave/JMF-2212-17-0001A.interleave.fastq.gz
           bhist=2212_17_0001A_phyloflash.basecompositionhistogram
           ihist=2212_17_0001A_phyloflash.inserthistogram
           idhist=2212_17_0001A_phyloflash.idhistogram
           scafstats=2212_17_0001A_phyloflash.hitstats overwrite=t
           outm2=2212_17_0001A_phyloflash.JMF-2212-17-0001A.interleave.fastq.gz.SSU.2.fq
           pairlen=1200 interleaved=t 2>2212_17_0001A_phyloflash.bbmap.out
[13:25:12] done...
[13:25:12] Reading SAM file 2212_17_0001A_phyloflash.bbmap.sam into memory
[13:25:25] Writing fixed SAM file to
           2212_17_0001A_phyloflash.JMF-2212-17-0001A.interleave.fastq.gz.SSU.sam
[13:25:32] Done
[13:25:32] Total read segments processed: 930459722
[13:25:32] insert size median: 313
[13:25:32] insert size std deviation: 141
[13:25:32] Summarizing taxonomy from mapping hits to SILVA database
[13:25:44] done...
[13:25:45] Forward read segments mapping: 184043
[13:25:45] Reverse read segments mapping: 183111
[13:25:45] Reporting mapping statistics for paired end input
[13:25:45] Total read pairs with at least one segment mapping: 225192
[13:25:45] => both segments mapping to same reference: 111287
[13:25:45] => both segments mapping to different references: 30675
[13:25:45] Read segments where next segment unmapped: 83230
[13:25:45] mapping rate: 0.048%
[13:25:45] subsampling SSU reads and running nhmmer to check coverage
           evenness across gene
[13:25:45] running subcommand:
           /home/apps/conda/miniconda3/envs/phyloflash-3.4.2/bin/reformat.sh
           in=2212_17_0001A_phyloflash.JMF-2212-17-0001A.interleave.fastq.gz.SSU.1.fq
           out=2212_17_0001A_phyloflash.readsf.subsample.fasta srt=10000
           ow=t interleaved=t 2>2212_17_0001A_phyloflash.reformat.out
[13:25:46] running subcommand:
           /home/apps/conda/miniconda3/envs/phyloflash-3.4.2/lib/phyloFlash/barrnap-HGV/binaries/linux/nhmmer
           --cpu 32 --tblout 2212_17_0001A_phyloflash.nhmmer.tblout
           /home/apps/conda/miniconda3/envs/phyloflash-3.4.2/lib/phyloFlash/barrnap-HGV/db/ssu/ssu_ABE.hmm
           2212_17_0001A_phyloflash.readsf.subsample.fasta >/dev/null
[13:25:46] FATAL: Tool execution failed!.
           Error was 'Inappropriate ioctl for device' and return code
           '35584'
           Check log file /dev/null
           Aborting.
[13:25:46] Saving log to file phyloFlash_log_on_error

I have tried running the nhmmer command online and it immediately breaks with a segmentation fault

/home/apps/conda/miniconda3/envs/phyloflash-3.4.2/lib/phyloFlash/barrnap-HGV/binaries/linux/nhmmer --cpu 8 --tblout 2212_17_0001A_phyloflash.nhmmer.tblout /home/apps/conda/miniconda3/envs/phyloflash-3.4.2/lib/phyloFlash/barrnap-HGV/db/ssu/ssu_ABE.hmm 2212_17_0001A_phyloflash.readsf.subsample.fasta 
Segmentation fault

Any idea what is causing this?

jowodo commented 1 year ago

a temporary workaround until this is fixed:

conda activate phyloflash # or what ever you named your phyloflash environment
conda install hmmer
cp ${CONDA_PREFIX}/bin/nhmmer ${CONDA_PREFIX}/lib/phyloFlash/barrnap-HGV/binaries/linux/nhmmer
kbseah commented 1 year ago

Thanks for this report, will incorporate the workaround