John -
I would use "samtools tview" with output as text, then edit the
text into fasta format. Do "samtools tview --help" for command
line options.
- tom blackwell -
On Thu, 18 Jun 2020, John Crow wrote:
From a bam file I'd like to extract the alignment, for each aligning read,
corresponding to the 10 bp region contig1:100-109 of the read, writing it
as fasta. This would produce something like
1/1
ACGTACGTAC
20/1
ACGTAC-TAC
22/1
C-GTACG-AC
. . .
It seemed a combo of "samtools view ... contig1:100-109" and "samtools
fasta" would do the trick but I haven't had luck with it yet. Any
suggestions?
_______________________________________________
Samtools-help mailing list
Samtools-help@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/samtools-help