Skip to content

Commit

Permalink
Add new view --fetch-pairs option
Browse files Browse the repository at this point in the history
The new `-P, --fetch-pairs` option allows to pull reads from regions
including their mates even when they fall outside the regions or are
unmapped.

Note
- everything is stored in memory, with many regions an external
  temporary storage may be needed
  • Loading branch information
pd3 authored and daviesrob committed Jan 10, 2022
1 parent 35fa6cd commit 487f201
Show file tree
Hide file tree
Showing 7 changed files with 564 additions and 220 deletions.
5 changes: 5 additions & 0 deletions doc/samtools-view.1
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,11 @@ is equivalent to
.BI "-@ " INT ", --threads " INT
Number of BAM compression threads to use in addition to main thread [0].
.TP
.BR -P ", " --fetch-pairs
Retrieve complete pairs even when the mate read is outside of the requested
region. In case read filtering is requested (e.g. by flag), the filters are
applied only on reads overlapping the requested regions but not their mates.
.TP
.B -S
Ignored for compatibility with previous samtools versions.
Previously this option was required if input was in SAM format, but now the
Expand Down
Loading

0 comments on commit 487f201

Please sign in to comment.