Thanks. I stumbled upon another way that is quite similar. I like it since I
can manipulate the entire vector in the same way.

RawSeqG<-paste(RawSeq$GENOTYPE_ID,RawSeq$GENOTYPE_ID,sep="")

#this duplicates heterozygotes to become ATAT or CGCG which makes no sense,
so now we use substr

RawSeqG<-substr(RawSeqG,1,2)

RawSeqGe<-genotype(RawSeqG,sep=1)#the sep=1 informs that there is no
separator between the alleles.
(this genotype command is from the genetics package)


On 12/31/06, Jim Lemon <[EMAIL PROTECTED]> wrote:
>
> 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
>



-- 
Farrel Buchinsky
Mobile: (412) 779-1073

        [[alternative HTML version deleted]]

______________________________________________
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