[R] genetics package not working

Farrel Buchinsky fjbuch at gmail.com
Tue Feb 12 01:26:39 CET 2008


Finally I found something that provides lower level examples.
I was looking around the genetics package. I came across 
write.pop.file(genetics) and there I found the format of 'pedigree' files is 
documented at http://www.sph.umich.edu/csg/abecasis/GOLD/docs/pedigree.html

That reference lays out exactly the format that is being used.


"Farrel Buchinsky" <fjbuch at gmail.com> wrote in message 
news:f5bfmv$jmo$1 at sea.gmane.org...
> >From crawling around the internet it appears to me as if genetics has 
> >given
> way to GeneticsBase and is part of bioconductor. The basic data structure 
> has changed to something called geneSet class. There is a pdf document 
> that promises to help me. 
> http://www.bioconductor.org/packages/2.1/bioc/vignettes/GeneticsBase/inst/doc/SummaryTables.pdf. 
> Unfortunately it does not. My dataset which was created using genetics 
> package does not seem to fit (or should I say "does not seem to easily 
> fit") the read in formats demonstrated in the document: standard pedigree 
> format, hapmap format, Pfizer format, Perlegen format.
>
> Can anyone point me to a resource with lower level instructions and 
> examples?
>
> My format is as follows (rs numbers are not correct but do not worry about 
> that detail)
>> str(ped.seq[,2:15])
> 'data.frame':   608 obs. of  14 variables:
> $ pedigree  : int  1 1 2 3 3 4 4 5 6 6 ...
> $ id        : Factor w/ 30 levels "1","2","3","4",..: 3 2 3 3 2 3 2 3 3 2 
> ...
> $ id.father : int  1 0 1 1 0 1 0 1 1 0 ...
> $ id.mother : int  2 0 2 2 0 2 0 2 2 0 ...
> $ PtCode    : Factor w/ 608 levels "AJM16001FA","AJM16001MO",..: 74 73 77 
> 117 116 80 79 83 86 85 ...
> $ HS.nr     : int  32940 32941 32960 32963 32964 32967 32968 32970 32972 
> 32973 ...
> $ affected  : int  2 1 2 2 1 2 1 2 2 1 ...
> $ sex       : int  2 2 1 1 2 1 2 2 2 2 ...
> $ rs11684: Factor w/ 1 level "C/C": 1 1 1 1 1 1 1 1 1 1 ...
>  ..- attr(*, "allele.names")= chr "C"
>  ..- attr(*, "allele.map")= chr [1, 1:2] "C" "C"
> $ rs1144: Factor w/ 3 levels "A/A","G/A","G/G": 3 3 3 3 3 2 3 3 3 3 ...
>  ..- attr(*, "allele.names")= chr  "G" "A"
>  ..- attr(*, "allele.map")= chr [1:3, 1:2] "A" "G" "G" "A" ...
> $ rs120: Factor w/ 2 levels "A/A","A/G": 1 1 1 1 1 1 1 1 1 1 ...
>  ..- attr(*, "allele.names")= chr  "A" "G"
>  ..- attr(*, "allele.map")= chr [1:2, 1:2] "A" "A" "A" "G"
>
>
>
> "Farrel Buchinsky" <fjbuch at gmail.com> wrote in message 
> news:bd93cdad0706181709p563b55d4pe43e2d0ea894054d at mail.gmail.com...
>> Has something changed in R that requires an update in the genetics 
>> package
>> by Gregory Warnes? I am using R version 2.5.0
>> This used to work
>>> summary(founders[,59])
>>
>> to prove that it is  a genotype class
>>> class(founders[,59])
>> [1] "genotype" "factor"
>>
>> Now when I issue the command:
>>> summary(founders[,59])
>>
>> I get:
>>
>> Error in attr(retval, "which") <- which : attempt to set an attribute on
>> NULL
>> In addition: Warning message:
>> $ operator is deprecated for atomic vectors, returning NULL in:
>> x$allele.names
>>
>> Clearly, I am missing something. What am I missing?
>>
>> -- 
>> Farrel Buchinsky
>>
>> [[alternative HTML version deleted]]
>>
>> ______________________________________________
>> R-help at 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.
>>
>
> ______________________________________________
> R-help at 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.
>



More information about the R-help mailing list