takaram / kofam_scan

CLI tool to annotate genes with KOfam
https://www.genome.jp/tools/kofamkoala/
MIT License
66 stars 11 forks source link

bin/lib/kofam_scan/parallel.rb:28:in `write': Broken pipe (Errno::EPIPE) #7

Closed PandengWang closed 2 years ago

PandengWang commented 4 years ago

Thanks for providing so useful tool! When I used it, I encountered a error as follows:

/mdata/xxx/software/miniconda3/bin/lib/kofam_scan/parallel.rb:28:in write': Broken pipe (Errno::EPIPE) from /mdata/xxx/software/miniconda3/bin/lib/kofam_scan/parallel.rb:28:inputs' from /mdata/xxx/software/miniconda3/bin/lib/kofam_scan/parallel.rb:28:in block in exec' from /mdata/xxx/software/miniconda3/lib/ruby/2.5.0/open3.rb:205:inpopen_run' from /mdata/xxx/software/miniconda3/lib/ruby/2.5.0/open3.rb:95:in popen3' from /mdata/xxx/software/miniconda3/bin/lib/kofam_scan/parallel.rb:27:inexec' from /mdata/xxx/software/miniconda3/bin/lib/kofam_scan/executor.rb:107:in run_hmmsearch' from /mdata/xxx/software/miniconda3/bin/lib/kofam_scan/executor.rb:35:inexecute' from /mdata/xxx/software/miniconda3/bin/lib/kofam_scan/executor.rb:8:in execute' from /mdata/xxx/software/miniconda3/bin/lib/kofam_scan/cli.rb:21:inrun' from /mdata/xxx/software/miniconda3/bin/exec_annotation:7:in `

'

Do you have any idea about how to solve this problem? Thanks so much!

Pandeng

takaram commented 4 years ago

Hmm... sorry I have no idea about the error. Do you get it every time? Do you run more than one KofamScan in parallel?

PandengWang commented 4 years ago

Hmm... sorry I have no idea about the error. Do you get it every time? Do you run more than one KofamScan in parallel?

Yes, I encountered this error every time when I annotated my whole protein seqs (16762174). But, when I used a subset of the protein seqs, such as 200, it didn't report this error.

The comment I run: exec_annotation -o y19-all15_prot_kegg.annotations ../4.genePrediction/y19-all15_prot_catalogue_relabel.faa -p /software/xxx/kegg/kofam/profiles/ -k /software/xxx/kegg/kofam/ko_list --cpu=1 --tmp-dir=/mdata/xxx/tmp -f mapper-one-line --no-report-unannotated

achmall commented 4 years ago

I get the same error when trying to run kofamscan on a server, whereas it is working fine with the same input file on my local machine... $ ./exec_annotation -o 26052020_kofamscan_HACON.txt /export/work_cgb/Achim/HACON_sequencing/200408_K00253.A.Project_Mall-DNA1-2020-02-13/gene_calls_aa.fa Traceback (most recent call last): 10: from ./exec_annotation:7:in

' 9: from /export/work_cgb/Achim/kofam_scan/lib/kofam_scan/cli.rb:21:in run' 8: from /export/work_cgb/Achim/kofam_scan/lib/kofam_scan/executor.rb:8:inexecute' 7: from /export/work_cgb/Achim/kofam_scan/lib/kofam_scan/executor.rb:35:in execute' 6: from /export/work_cgb/Achim/kofam_scan/lib/kofam_scan/executor.rb:107:inrun_hmmsearch' 5: from /export/work_cgb/Achim/kofam_scan/lib/kofam_scan/parallel.rb:27:in exec' 4: from /export/home/sey013/.conda/envs/kofamscan/lib/ruby/2.6.0/open3.rb:101:inpopen3' 3: from /export/home/sey013/.conda/envs/kofamscan/lib/ruby/2.6.0/open3.rb:219:in popen_run' 2: from /export/work_cgb/Achim/kofam_scan/lib/kofam_scan/parallel.rb:28:inblock in exec' 1: from /export/work_cgb/Achim/kofam_scan/lib/kofam_scan/parallel.rb:28:in puts' /export/work_cgb/Achim/kofam_scan/lib/kofam_scan/parallel.rb:28:inwrite': Broken pipe (Errno::EPIPE) `

PandengWang commented 2 years ago

Hi All,

I may have figured out the reason underlying this error. This error come from Linux parallel command, which is called in exec_annotation. When you close your shell window, the Linux parallel will recieve signal and won't submit new jobs, even you run parallel with nohup. One possible method to resolve this issue is that after you run exec_annotation with nohup in the backgroud, you could disconnect this command with your current shell using disown -h %jobid or disown -a.

Hope this message will help you guy who have encountered the same error.

Pandeng