mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-10-24 02:04:04 +08:00
Enable display of BAM data without sequence info
Unaligned BAM files like produced, e.g., by picard FastqToSam will not have sequence information present in their header. This change should allow Galaxy to display such files instead of just a ``` Could not display BAM file, error was: file has no sequences defined (mode='rb') - is it SAM/BAM format? Consider opening with check_sq=False ``` message.
This commit is contained in:
@@ -467,7 +467,7 @@ class BamNative(CompressedArchive, _BamOrSam):
|
||||
def get_chunk(self, trans, dataset, offset=0, ck_size=None):
|
||||
if not offset == -1:
|
||||
try:
|
||||
with pysam.AlignmentFile(dataset.file_name, "rb") as bamfile:
|
||||
with pysam.AlignmentFile(dataset.file_name, "rb", check_sq=False) as bamfile:
|
||||
ck_size = 300 # 300 lines
|
||||
ck_data = ""
|
||||
header_line_count = 0
|
||||
|
||||
Reference in New Issue
Block a user