Question: How To Extract Consensus Sequence Of Mapped Regions From A Bam File?
gravatar for lin.barnum
6.1 years ago by
lin.barnum230 wrote:

I would like to extract consensus sequence of only the mapped regions from a BAM file. I have a bam file which contains only a few regions that are mapped, most of my regions are completely unmapped. How could I go about this?


bam samtools • 7.3k views
ADD COMMENTlink modified 2.7 years ago by Biostar ♦♦ 20 • written 6.1 years ago by lin.barnum230

You might find this thread or this link useful for your purpose.

How to generate a consensus fasta sequence from SAM tools pileup?

ADD REPLYlink modified 6.1 years ago • written 6.1 years ago by toni2.1k
gravatar for bioinfo
6.1 years ago by
bioinfo690 wrote:

FastaAlternativeReferenceMaker function from picardtools compares variant files to reference to create a consensus fasta sequence ; -L flag takes the input intervals file, -o flag gives the output consensus fasta file, -variant flag takes the variant file (SNPS and Indels together) -R flag takes the reference genome

java -Xmx2g -jar /GATK_pre/GenomeAnalysisTK-1.0.4905/GenomeAnalysisTK.jar -R reference.fasta -T FastaAlternateReferenceMaker -L sorted.bam.intervals -o consensus.fasta –variant snps_indel_file
ADD COMMENTlink written 6.1 years ago by bioinfo690
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1013 users visited in the last hour