export alignment from BAM file

0

Dear all,

I'd like to export an alignment in a fasta (or similar) format from a bam file.

I know there are tools to extract the reads that cover a certain region, for example by doing:

samtools view -b -h bam_file.bam "chr1:2000-3000" > reads_bam_file.bam

samtools fasta reads_bam_file.bam > reads_bam_file.fasta

But this doesn't result in an alignment.

The reason I'd like to avoid repeat the alignment is that I might have several hundreds of reads, which make a de novo alignment not sustainable.

I haven't found so far a tool for doing this and I was wondering if anybody has suggestions

Thank you in advance!


samtools


file


bam


alignment

• 43 views

updated 2 hours ago by

102k

written 6 hours ago by

0



Source link