linxingchen / cobra

A tool to raise the quality of viral genomes assembled from short-read metagenomes via resolving and joining of contigs fragmented during de novo assembly.
MIT License
62 stars 10 forks source link

get_cov bug fix #45

Open yayekit opened 2 months ago

yayekit commented 2 months ago

fixed the bug in get_cov function that attempts to skip the header line, regardless if it's a header or not; also minor bugfixes

Hocnonsense commented 1 month ago

Thanks for your kind check! I should apologize for the wrong value calculation of orphan_query.

However, I'm puzzle about the other two fixes:

  1. In your version, you've just ignore any abnormal line (including blank, only one column, and cannot transfer the second column to float), I think this can be a looser version of current one, so what does "fix ... skip the header line" mean? Also, if there is abnormal values inner data, I think we should check the data (e.g. remove the blank lines and check the value) instead of trying to ignore it.

  2. the second change in the pull is checking whether real_seq_len <= 0. I'm puzzle about in which case this become True? It means that calculation of overlap (self_circular_flex.get(contig, maxk)) can give fake result. Would you mind provide an example and help us fix it?

Again, thanks for your help!