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
import bamnostic as bs
bam = bs.AlignmentFile("yourfile.bam", 'rb')
for i, read in enumerate(bam.fetch(contig="Scaffold_Name", start=1, stop=100)):
if i >= 3:
break
print(read)
bamnostic gives the error that 'scaffold_name" is not found in the header. Of course not, as the name has capitals. To Reproduce
Make your own bam file with contig names containing capitals
Run the above python lines
You will get a message that the contig with a name in only lower case is not found.
Expected behavior
Bamnostic should keep the literal name of the contig and not change to lower case.
Desktop (please complete the following information):
Win 6 64x
Python Version: 3.7 using Spyder 3.3.1
bamnostic Version: 1.0.0
Additional context
Problem seems to be the line in bam.py:
query = parse_region(**signature)
contig in bam.py is a str with the capital still in place
query.contig has the same value but now in lower case only
re-assigning contig to query.contig solved the problem:
query.contig=contig
in the line just after query = parse_region(**signature)
The text was updated successfully, but these errors were encountered:
When using the Random access sample:
import bamnostic as bs
bam = bs.AlignmentFile("yourfile.bam", 'rb')
for i, read in enumerate(bam.fetch(contig="Scaffold_Name", start=1, stop=100)):
if i >= 3:
break
print(read)
bamnostic gives the error that 'scaffold_name" is not found in the header. Of course not, as the name has capitals.
To Reproduce
Expected behavior
Bamnostic should keep the literal name of the contig and not change to lower case.
Desktop (please complete the following information):
Additional context
Problem seems to be the line in bam.py:
query = parse_region(**signature)
contig in bam.py is a str with the capital still in place
query.contig has the same value but now in lower case only
re-assigning contig to query.contig solved the problem:
query.contig=contig
in the line just after query = parse_region(**signature)
The text was updated successfully, but these errors were encountered: