create consensus sequence from bam file
0
0
Entering edit mode
16 months ago
Sara ▴ 160

I have made a subset of bam file and want to make consensus sequence from that. do you know how to convert a bam file into a fasta or fastq file with consensus sequence?

alignment • 558 views
ADD COMMENT
2
Entering edit mode
ADD REPLY
0
Entering edit mode

@genomax: I used that link before. but the problem is that in the vcf file I have both indels and SNPs and at some points they have overlap. in those regions program skips the indels (which is what I am interested in). do you have any solution for that

ADD REPLY
1
Entering edit mode

Split your VCF file by sample and then normalize it with a reference genome (bcftools norm or vt decompose+vt norm). A sample cannot have both an indel and an SNP at the same location.

Note: If you're using vt, decompose first, then split by sample and normalize at the end.

EDIT: A sample can have an indel and an SNP at the same location, given they're both heterozygous and on different chromosomes. I'm not sure how that would translate to a consensus sequence.

ADD REPLY

Login before adding your answer.

Traffic: 2552 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