cerebis / bin3C

Extract metagenome-assembled genomes (MAGs) from metagenomic data using Hi-C.
GNU Affero General Public License v3.0
23 stars 7 forks source link

Bad use of empty list in cluster_report when no-spades=True #19

Closed cerebis closed 5 years ago

cerebis commented 5 years ago

https://github.com/cerebis/bin3C/blob/8bdcd2c12e6b33b5f8c8bd039f223608db62de71/mzd/cluster.py#L272

Per-contig coverage is not presently calculated but should be reintroduced. Instead, where SPAdes was used, the embedded information i extracted from the contig names.

Due to this, a --no-spades option was added to prevent this for other assemblers. Since the coverage list is never appended to, when the three lists (length, N50 and coverage) are zipped together, the empty coverage list results in truncation of all three.

This should resolve continuing issue reports in #17

cerebis commented 5 years ago

This issue goes further to affect the write_report method as well.

cerebis commented 5 years ago

This issue goes further to affect the write_report method as well.