Closed jakobnissen closed 3 years ago
Hi @jakobnissen! Are you referring to the order of the contigs in the array?
The reason for this is that the contigs (and their coverage vectors) are being stored in a HashMap
, which doesn't preserve the order. I did this to allow the contig_set
parameter, whose purpose is to reduce memory usage when you're only interested in a set of contigs (e.g.: only binned contigs).
If that's indeed your problem, I think I can fix this quickly using an ordered hash table.
pyCoverM now returns the contigs in the same order as in the BAM files. Let me know if that solves your issue!
That's exactly what I was looking for, thank you!
The output of
get_coverages_from_bam
is in a haphazard order. It would be nicer if it was returned in the same order as in the BAM files - which is what CoverM returns when called from command line.