You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I use vamb with my contigs without renaming them I get the next error:
ValueError: At least one BAM file reference name hash to b8126ea6ff9bedc4ebb495695cd25129, expected c110292443b13cdc4d101e2114c17656. Make sure all BAM and FASTA headers are identical and in the same order.
This happens because in the parsecontigs.pyComposition.from_file method the line contignames.append(entry.header) uses the whole header as the contig name (e.g. "contig1 description") istead of just the ID (e.g. "contig1"). I have resolved this by replacing this line with contignames.append(entry.header.split()[0])
The text was updated successfully, but these errors were encountered:
By using the identifier, we make sure the BAM identifiers match the FASTA
identifiers, because BAM files do not contain the whole header, only the
identifier.
Fix issue #161
Thanks for the bug report. The fix is indeed to hash just the identifier when constructing the Composition.
Why not hash the entire header? Because SAM/BAM files only contain the identifier, not the header. Hence, if we want to check that the BAM files match the FASTA file, we cannot use the description.
By using the identifier, we make sure the BAM identifiers match the FASTA
identifiers, because BAM files do not contain the whole header, only the
identifier.
Fix issue #161
vamb=4.0.1
When I use vamb with my contigs without renaming them I get the next error:
This happens because in the
parsecontigs.py
Composition.from_file
method the linecontignames.append(entry.header)
uses the whole header as the contig name (e.g. "contig1 description") istead of just the ID (e.g. "contig1"). I have resolved this by replacing this line withcontignames.append(entry.header.split()[0])
The text was updated successfully, but these errors were encountered: