Question: vcf to fasta CDS converter
gravatar for mosquitoes
5.8 years ago by
United States
mosquitoes0 wrote:

I need to create a fasta file that contains only CDS for each sample that I have NGS and genotyped using gatk. I've used gatk FastaAlternateReferenceMaker and then BEDtools and the .gff to pull out all the exons (or CDSs), but this does not put the coding sequences together for each gene. Also, gatk FastaAlternateReferenceMaker outputs a fasta with chromosome names listed chr1...etc. (i.e. not matching the names in the .gff). My genome has many contigs and it is time consuming to change these by hand. Is there a better way to do this? Any tools out there exist to go from a vcf file to a fasta file specific to each sample I've sequenced that has the CDS for each gene?

I need this fasta to eventually feed into PAML so I can calculate dn/ds for each gene. If there's a better way to do this also, please let me know.



sequencing next-gen • 2.6k views
ADD COMMENTlink modified 5.2 years ago by Biostar ♦♦ 20 • written 5.8 years ago by mosquitoes0
gravatar for Devon Ryan
5.8 years ago by
Devon Ryan96k
Freiburg, Germany
Devon Ryan96k wrote:

Just use gtf2fasta (I think tophat comes with such an executable, but if not there are python scripts out there) after changing the chromosome names of either the fasta files or the GTF file (you could just use awk to do that). You'll need to modify the GTF such that it only contains the CDS entries and then rename those to "exon", since most conversion programs are expecting to make transcripts (again, you can do this with awk).

ADD COMMENTlink written 5.8 years ago by Devon Ryan96k
Please log in to add an answer.


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