Question: Getting consensus fasta sequence for a chromosome from a bam file
0
gravatar for nagarsaggi
6 months ago by
nagarsaggi0
nagarsaggi0 wrote:

I have a bam file per sample which I have generated by mapping Illumina short reads on ~1100 single copy orthologues genes (busco). I want to extract consense sequence from bam file for a given single copy orthologue, in another way for a given chromosome. The aim is to generate a multiple sequence alignment out of the consensus sequence of a particular single-copy ortholog gene.

Following command have been recommended for extracting consense from a bam file but I am not able to use it for a particular chromosome

samtools mpileup -uf reference.fa aligment.bam | bcftools view -cg - | vcfutils vcf2fq >out.fasta
alignment • 336 views
ADD COMMENTlink modified 6 months ago by finswimmer11k • written 6 months ago by nagarsaggi0
1

So essentially what you need is to get a single chromosome from the bam file? Have you looked at the manual of samtools?

ADD REPLYlink modified 6 months ago • written 6 months ago by WouterDeCoster38k
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: 1063 users visited in the last hour