Question: get consensus sequence from bam file with insertions
0
gravatar for Vvedenskiia
29 days ago by
Vvedenskiia0 wrote:

Hello everyone! I want to get consensus sequence from my NGS data. I created sorted bam, and visualized it in IGV. I know that alligment has SNPs, insertions and deletions. After that I tried to get consensus sequence from my NGS data. I used two ways:

  1. From samtools manual: "Generate the consensus sequence for one diploid individual: samtools mpileup -uf ref.fa aln.bam | bcftools call -c | vcfutils.pl vcf2fq > cns.fq" - this coomand gave me only SNPs in consensus sequence.
  2. Copy consensus sequence from IGV. It gave me consensus with SNPs and deletions.

How can I get insertions in consensus sequence?

Thanks!

consensus • 115 views
ADD COMMENTlink modified 25 days ago • written 29 days ago by Vvedenskiia0

Please use the formatting bar (especially the code option) to present your post better. You can use backticks for inline code (`text` becomes text), or select a chunk of text and use the highlighted button to format it as a code block. I've done it for you this time.
code_formatting

ADD REPLYlink written 29 days ago by RamRS22k

Have you tried this?

ADD REPLYlink modified 29 days ago • written 29 days ago by finswimmer11k

Yes, but in this try result sequence has same length as a reference. But region with reads is much less.

ADD REPLYlink written 29 days ago by Vvedenskiia0

Could you please show a screenshot of a region where you suppose an indel?

ADD REPLYlink written 29 days ago by finswimmer11k

More information. I used command:

bcftools consensus -f ref.fasta -s sorted_03.bam vars3_1.vcf.gz >out.fa

But insertions and deletions were not find in consensus.

ADD REPLYlink modified 25 days ago • written 25 days ago by Vvedenskiia0

I saw this post: https://www.biostars.org/p/179357/ With sam=1.3, but than I tried

samtools mpileup -uf SA05sequence.fasta sorted.bam | bcftools call -c > vars.vcf

with bam file from bbmap it was not work. The report was: The sequence "chr3B chr3B:12400161..12411680" not found (this is my reference name). Maybe problems with indels can be associated with cigar sting? Different formats or something like that?

ADD REPLYlink written 25 days ago by Vvedenskiia0
0
gravatar for Vvedenskiia
25 days ago by
Vvedenskiia0 wrote:

This is part with deletion: https://ibb.co/27jVv4S

ADD COMMENTlink modified 25 days ago • written 25 days ago by Vvedenskiia0
Please log in to add an answer.

Help
Access

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