Entering edit mode
3.6 years ago
francois
▴
80
Say I have long reads which I have aligned to hg38.
Now I want to trim my alignments to a specific region of chr20, say between position 2,000,000 and 2,000,500.
I am imagining something like
trim input.bam 'chr20:2000000-2000500' > output.bam
This is similar but not identical to this: Extract Reads From A Bam File That Fall Within A Given Region
Not identical because I do not want to extract complete alignments, I want alignments to be trimmed if necessary so they only cover the region I am interested in.
How can I do this?