Recoding SNP genotype data from nitrogenous bases to 0 1 2 format
1
0
Entering edit mode
4.4 years ago
bntjoanne ▴ 10

I am busy extracting SNP data from various datasets that have been published. Those that are provided in plink format and in matrices with genotypes coded as 0 1 2 are absolutely fine. However, some of the matrices have genotypes coded as nucleotides (A G T C), and I am struggling to find a conversion tool for these that works. In many occasions it is not viable for me to manually convert these datasets into plink format because I don't always have all the necessary data (e.g., often there is just a matrix with the genotypes and no other information).

Has anyone had any success with a package, or otherwise does anyone know a function that I could use to code the A G C T matrix into 0 1 2?

Thanks in advance!

SNP genotype biallelic recode NA • 2.0k views
ADD COMMENT
0
Entering edit mode

In your comment on SO you say "checkATCG function called by recodeSNPs rejects a matrix with anything other than A T G and C", even tho the docs say it should work. Maybe you could contact the author for clarification.

ADD REPLY
0
Entering edit mode

Thanks -- I emailed the author a few days ago (I've also emailed the author for the snpReady package). If/when they reply, I'll update my post on SO and here.

ADD REPLY
0
Entering edit mode
4.4 years ago
bntjoanne ▴ 10

ANSWER: The r package snpReady can convert matrices in nitrogenous base format to 0 1 2: https://cran.r-project.org/web/packages/snpReady/snpReady.pdf

ADD COMMENT

Login before adding your answer.

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