Question: Extract consensus gene sequence (from gff file) from bam file
0
gravatar for AW
3.9 years ago by
AW350
United Kingdom
AW350 wrote:

Hi,

 

I have a bam file from Illumina DNA-seq that I obtained by mapping reads to the reference genome using Bowtie. I want to extract the consensus sequence of a specific gene from the bam file irrespective of the reference. The gene coordinates are present in the gff file but I did not use this when mapping to the reference.

 

Thanks very much!

dna-seq bam gff • 2.1k views
ADD COMMENTlink modified 3.9 years ago • written 3.9 years ago by AW350

You can use SAMtools to specify the chromosome/interval of the gene, and its variant-calling workflow to identify the differences b/t the reference and your data.

ADD REPLYlink written 3.9 years ago by harold.smith.tarheel4.4k

Thanks! How do I go about doing this? I've only seen examples specifying one region but I want to extract the multiple exons and not intron?

ADD REPLYlink written 3.9 years ago by AW350
0
gravatar for vassialk
3.9 years ago by
vassialk190
Belarus
vassialk190 wrote:

Try to use commercial trial software like NextGene, CLC, DNAStar, Geneous Pro and Ugene (free, open source). They have many good functions which can do your job also.

ADD COMMENTlink written 3.9 years ago by vassialk190

Its not about "many good functions". Its about the specific question user had asked.

ADD REPLYlink written 3.9 years ago by geek_y9.9k
0
gravatar for AW
3.9 years ago by
AW350
United Kingdom
AW350 wrote:

I have tried the following but get an error

samtools view -b input.bam  "chr1:14382-15521" > subset.bam

samtools sort subset.bam subset_sort

samtools mpileup -d 10000000 -uf ref.fna subset_sort.bam | bcftools view -cg - | vcfutils.pl vcf2fq > cns.fq

Error: Could not parse --min-ac g
[mpileup] 1 samples in 1 input files
Use of uninitialized value $l in numeric lt (<) at /bcftools/bin/vcfutils.pl line 566.
Use of uninitialized value $l in numeric lt (<) at /bcftools/bin/vcfutils.pl line 566.

Any ideas?

ADD COMMENTlink written 3.9 years ago by AW350

The 'c' flag in bcftools view requires an integer value.

ADD REPLYlink written 3.9 years ago by harold.smith.tarheel4.4k
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: 768 users visited in the last hour