Farrel Buchinsky wrote:
> Sequenom has an odd format of calling a SNP genotype
> 
> gg
>  [1] "C"  "GA" "A"  "C"  "C"  "AG" "C"  "C"  "T"  "G"
> 
> homozygous A is called A and heterozygous is called AT
> The genetics package cannot handle the fact that some genotypes are declared
> with 2 letter while other are declared with only 1. Consequently the
> genotype() or makeGenotypes() will not work.
> 
> I need to either find a clever way that the genetics package actually does
> do this. I think it may reside in the "method" argument but do not know how
> to manipulat it. Alternatively I have to come up with some nifty string
> manipulation. Any ideas?
> 
gg1char<-nchar(gg)==1
gg[gg1char]<-paste(gg[gg1char],gg[gg1char],sep="")

Jim

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to