How To Extract Consensus Sequence Of Mapped Regions From A Bam File?
1
3
Entering edit mode
11.1 years ago
lin.barnum ▴ 230

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?

Thanks,

bam samtools • 9.7k views
ADD COMMENT
2
Entering edit mode
ADD REPLY
2
Entering edit mode
11.1 years ago
bioinfo ▴ 830

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 COMMENT

Login before adding your answer.

Traffic: 3182 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6