Extract consensus gene sequence (from gff file) from bam file
2
0
Entering edit mode
6.8 years ago
AW ▴ 350

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!

gff bam DNA-seq • 3.1k views
ADD COMMENT
0
Entering edit mode

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 REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode
6.8 years ago
vassialk ▴ 200

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 COMMENT
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode
6.8 years ago
AW ▴ 350

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 COMMENT
0
Entering edit mode

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

ADD REPLY

Login before adding your answer.

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