merenlab / anvio

An analysis and visualization platform for 'omics data
http://merenlab.org/software/anvio
GNU General Public License v3.0
441 stars 146 forks source link

small bug when checking contigs and bam files #167

Closed rikander closed 9 years ago

rikander commented 9 years ago

Ran the following command:

[randerson@minnie mega_assembly]$ anvi-profile -i mega_metagenome_assembly_vs_MidCaymanRise_RockB_merged_filtered_n0.05.bam --list-contigs | head

and got the following error:

MidCaymanRise_FS851_merged_filtered_contig_16086 123,749
MidCaymanRise_FS851_merged_filtered_contig_18819 120,905
MidCaymanRise_FS851_merged_filtered_contig_1129 112,815
MidCaymanRise_FS851_merged_filtered_contig_936 106,082
MidCaymanRise_FS851_merged_filtered_contig_70173 105,940
MidCaymanRise_FS851_merged_filtered_contig_42636 105,903
MidCaymanRise_FS851_merged_filtered_contig_27280 100,419
MidCaymanRise_FS851_merged_filtered_contig_35408 90,076
MidCaymanRise_FS851_merged_filtered_contig_21822 87,772
MidCaymanRise_FS851_merged_filtered_contig_12935 86,726
Traceback (most recent call last):
  File "/bioware/anvio-0.9.2/bin/anvi-profile", line 5, in <module>
    pkg_resources.run_script('anvio==0.9.2', 'anvi-profile')
  File "/bioware/python-2.7.9-20150610120900/lib/python2.7/site-packages/distribute-0.6.49-py2.7.egg/pkg_resources.py", line 507, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/bioware/python-2.7.9-20150610120900/lib/python2.7/site-packages/distribute-0.6.49-py2.7.egg/pkg_resources.py", line 1272, in run_script
    execfile(script_filename, namespace, namespace)
  File "/automounts/bioware/bioware/linuxOpteron/anvio-0.9.2/lib/python2.7/site-packages/anvio-0.9.2-py2.7-linux-x86_64.egg/EGG-INFO/scripts/anvi-profile", line 105, in <module>
    profiler._run()
  File "/bioware/anvio-0.9.2/lib/python2.7/site-packages/anvio-0.9.2-py2.7-linux-x86_64.egg/anvio/profiler.py", line 145, in _run
    self.list_contigs()
  File "/bioware/anvio-0.9.2/lib/python2.7/site-packages/anvio-0.9.2-py2.7-linux-x86_64.egg/anvio/profiler.py", line 348, in list_contigs
    print '%-40s %s' % (tpl[1], pp(int(tpl[0])))
IOError: [Errno 32] Broken pipe
meren commented 9 years ago

This happens when the user pipes the output to an input manager like head or tail. Thank you very much for the report. We should take a look at this at some point (will probably wait for the first stable release though).