How To Extract Consensus Sequence Of Mapped Regions From A Bam File?
1
3
Entering edit mode
11.6 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 • 10.0k views
ADD COMMENT
2
Entering edit mode
ADD REPLY
2
Entering edit mode
11.6 years ago
bioinfo ▴ 840

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: 1964 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