Skip to content

samtools view with -L, -M and --fetch-pairs doing full CRAM traversal #2059

Description

@acorvelo

samtools 1.20
htslib 1.20
Linux 3.10.0-1160.71.1.el7.x86_64

Hi,
In samtools view, when using a BED file to extract overlapping reads and their mates, using the options -M -L intervals.bed --fetch-pairs, samtools appears to traverse the entire CRAM on the second (I assume) pass, leading to huge run times, even for a small number of intervals. The same doesn't appear to be the case if the interval(s) is/are specified at the end of the command using chr:start-end notation. Is this difference in behavior intended? Or, is there another way to invoke it with the -L option that avoids full traversals?

Thanks!

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions