[BioC] GeneticsBase readGenes not reading

James W. MacDonald jmacdon at med.umich.edu
Tue Feb 12 15:50:45 CET 2008


Hi Farrel,

Farrel Buchinsky wrote:
> Any idea why I get this message
> 
> b <-readGenes("pedformat.txt",gformat="ped")
> Error in FUN(X[[2L]], ...) : cannot coerce to vector

I don't see that error. However, the pedfile you show below won't work 
anyway. The first line needs to contain some marker names. This version 
worked for me (saved as temp.ped):

one two three
100 1 0 0 1  1 2  1 2  1 2
100 2 0 0 2  1 2  1 2  1 2
100 3 1 2 1  1 1  2 2  1 1

 > readGenes("temp.ped", gformat="ped")
Reading 3 markers and 3 subjects from ` temp.ped ' ...
generating 'geneSet' object...

Successfully read the pedigree file ` temp.ped '.

Number of Markers:  3
Number of Subjects: 3
Number of Families: 1


geneSet object
------------------

Number of Markers:      3
Number of Observations: 3

Sample variables: family, pid, father, mother, sex

Genetic data:

       100.1 100.2 100.3
one   1/2   1/2   1/1
two   1/2   1/2   2/2
three 1/2   1/2   1/1

 > sessionInfo()
R version 2.6.0 Patched (2007-10-20 r43232)
i386-pc-mingw32

locale:
LC_COLLATE=English_United States.1252;LC_CTYPE=English_United 
States.1252;LC_MONETARY=English_United 
States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252

attached base packages:
[1] stats     graphics  grDevices datasets  utils     methods   base

other attached packages:
[1] GeneticsBase_1.2.0 haplo.stats_1.3.1  mvtnorm_0.8-1 
xtable_1.5-2
[5] combinat_0.0-6     rcompgen_0.1-17

loaded via a namespace (and not attached):
[1] gdata_2.4.0  gplots_2.3.2 gtools_2.4.0 MASS_7.2-37  tools_2.6.0

Best,

Jim



> 
> Where pedformat.txt was diretly copied from
> http://www.sph.umich.edu/csg/abecasis/GOLD/docs/pedigree.html
> 100 1 0 0 1  1 2  1 2  1 2
> 100 2 0 0 2  1 2  1 2  1 2
> 100 3 1 2 1  1 1  2 2  1 1
> 
> 

-- 
James W. MacDonald, M.S.
Biostatistician
Affymetrix and cDNA Microarray Core
University of Michigan Cancer Center
1500 E. Medical Center Drive
7410 CCGC
Ann Arbor MI 48109
734-647-5623



More information about the Bioconductor mailing list