Standardization of DNA data
1
0
Entering edit mode
6.8 years ago
manay ▴ 10

Hi, When I have a data set which includes 0 and 1, I can standardize the data easily in the following way. (each row denotes a chromosome and each column denotes a SNP)

p<- apply(input, 2, mean, na.rm = T)
 mat <- matrix(, nr = nchr, nc = nsnp)
   for (i in 1:nsnp){
      mat[,i] <- (data[,i] - p[i])/sqrt(p[i] * (1 - p[i]))
   }

However, I have a data set which includes A,T,G,C. Is it possible to standardize this data?

It is a small part of my data:

NA06989_A   A   A   G   G   C
NA06989_B   A   A   G   G   C
NA10850_A   G   A   G   G   C
NA10850_B   G   G   A   G   C
NA06984_A   G   G   A   G   C
NA06984_B   A   A   G   G   C
NA11917_A   G   A   A   T   C
NA11917_B   A   A   G   G   C
NA12282_A   A   A   G   G   C
NA12282_B   G   G   A   G   C
R SNP gene genome • 1.1k views
ADD COMMENT
1
Entering edit mode
6.8 years ago
Fabio Marroni ★ 3.0k

"0" and "1" SNP genotype are just arbitrary representations of the two alleles. So, yes, you can standardize the data you showed by replacing (arbitrarily) one letter with 0 and one with 1. However, I am not sure if standardizing genotype data the way you do is a good idea.

ADD COMMENT

Login before adding your answer.

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