How to make Nexus file(s) from reference genome and VCF files
1
0
Entering edit mode
josh_banta • 0
@josh_banta-11482
Last seen 8.3 years ago

Hello everyone,

My question relates to RAD-seq data I have obtained from a genomics company. It is in the form of a (pseudo)reference genome plus VCF files for the other individuals.

My question is this: how do I get the full data in nexus format so that it's no longer in VCF format relative to a reference genome?

Can someone show me how to do this with sample code?

For instance, let's say I had the human reference genome and the genome of one other person in VCF format. How would I turn the genomic data for these two individuals into a nexus file (or multiple nexus files if I am not thinking about this the right way)?

If it would be too many steps to turn this sort of data directly into a nexus file, is there a way to turn it into FASTA file(s)?

Thanks very much in advance for any help.

Sincerely,

Josh

samtools • 3.2k views
ADD COMMENT
0
Entering edit mode
josh_banta • 0
@josh_banta-11482
Last seen 8.3 years ago

I received the following answer to the question from one of my friends. I want to share it with all of you:

You are right, the best thing is to convert to FASTA first then convert to Nexus if you have a tool or script for that.

We use GATK FastaAlternateReferenceMaker for that:

https://software.broadinstitute.org/gatk/gatkdocs/org_broadinstitute_gatk_tools_walkers_fasta_FastaAlternateReferenceMaker.php

I believe that this tool will simply replace ALT alleles at the appropriate position in the reference genome.  So, if you have a single sample or multi-sample vcf, I would first run GATK SelectVariants with --sample_name <your sample to convert to fasta> and --excludeNonVariants arguments:

https://software.broadinstitute.org/gatk/gatkdocs/org_broadinstitute_gatk_tools_walkers_variantutils_SelectVariants.php

If you have not worked with GATK before, you also need to prepare index files for your reference genome as the reference fasta and its index files are required to run GATK tools:

http://gatkforums.broadinstitute.org/gatk/discussion/2798/howto-prepare-a-reference-for-use-with-bwa-and-gatk

ADD COMMENT

Login before adding your answer.

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