Convert matrix in numeric format to genotype format
1
1
Entering edit mode
5.4 years ago
shinken123 ▴ 150

Hi All,

I want to convert a matrix in numeric format, 0 for homozygous reference allele, 1 for heterozygous and 2 for homozygous alternative to a genotype matrix, if it is possible to a vcf file. Do you know any tool to do it?

Best Wishes,

Eric

SNP • 2.3k views
ADD COMMENT
1
Entering edit mode
5.4 years ago

If your matrix is variant-major (i.e. each line has one variant, each column has one sample), it shouldn't take too much work to manipulate it into a form that plink 2.0 --import-dosage (see http://zzz.bwh.harvard.edu/plink/dosage.shtml for a description of the expected format, and http://www.cog-genomics.org/plink/2.0/input#import_dosage for --import-dosage syntax) can read; adding "--export vcf" to the same command line will then give you your VCF.

If it's sample-major, you'll probably need to transpose it first.

ADD COMMENT

Login before adding your answer.

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