Displaying 1 result from an estimated 1 matches for "gntp".
Did you mean:
gftp
2006 Apr 26
2
help in R
...#read in SNP data
> snp.dat <- as.matrix(genfile)
> snp.name <- scan("c:/tina/phd/bs871/hw/genfile.txt",nline=1,what="character")
Read 100 items
> n.snp <- length(snp.name)
> n.id <- 1 #number of fields for ids, sex and affection status
>
> ###form gntp using the two alleles of each SNP
> allele1 <- snp.dat[,seq(1,2*n.snp,2)+n.id ]
> allele2 <- snp.dat[,seq(2,2*n.snp,2)+n.id ]
> temp <- matrix(paste(allele1,allele2,sep="|"),dim(allele1))
> temp <- data.frame(temp)
> convt <- function(x) x <- factor(as.cha...