Hello,
I am getting the following error after setting up a GenotypeData object in GWASTools:
Error in assocTestCPH(genoData, event = "pheno", time.to.event = "time_to_event", :
required phenotypes are not in genoData
I had to add the phenotypes to the scanAnnot object manually from a data frame, as they were not read in by imputedDosageFile(), despite being in the .sample file (ncdfImputedDosage worked for this, but is deprecated).
However, they are in genoData: when I type getScanVariableNames(genoData), I see my phenotypes, and they are listed under
@scannAnnot
@data
$pheno
in str(genoData). In addition, the exact same script works perfectly well on my laptop - no error. I am trying to get this to run on a cluster so I can run the analysis over an array of chromosome fragments.
Does anyone have an idea of why this would run differently in an R session on a cluster vs. my computer?
Thanks!
sessionInfo() for my computer:
R version 3.1.1 (2014-07-10)
Platform: x86_64-apple-darwin13.1.0 (64-bit)
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] splines parallel stats graphics grDevices utils datasets methods base
other attached packages:
[1] snpStats_1.16.0 Matrix_1.1-4 survival_2.37-7 GWASTools_1.12.0 ncdf_1.6.8 Biobase_2.26.0
[7] BiocGenerics_0.12.1 gdsfmt_1.1.0.1
loaded via a namespace (and not attached):
[1] DBI_0.3.1 DNAcopy_1.40.0 grid_3.1.1 GWASExactHW_1.01 lattice_0.20-29 lmtest_0.9-33
[7] quantreg_5.05 quantsmooth_1.32.0 RSQLite_1.0.0 sandwich_2.3-2 SparseM_1.05 tools_3.1.1
[13] zlibbioc_1.12.0 zoo_1.7-11
sessionInfo() for my cluster session:
R version 3.1.1 (2014-07-10)
Platform: x86_64-unknown-linux-gnu (64-bit)
locale:
[1] LC_CTYPE=en_US LC_NUMERIC=C LC_TIME=en_US
[4] LC_COLLATE=en_US LC_MONETARY=en_US LC_MESSAGES=en_US
[7] LC_PAPER=en_US LC_NAME=C LC_ADDRESS=C
[10] LC_TELEPHONE=C LC_MEASUREMENT=en_US LC_IDENTIFICATION=C
attached base packages:
[1] splines parallel grid stats graphics grDevices utils
[8] datasets methods base
other attached packages:
[1] snpStats_1.16.0 Matrix_1.1-4 survival_2.37-7
[4] GWASTools_1.12.0 Biobase_2.26.0 BiocGenerics_0.12.0
[7] quantsmooth_1.32.0 quantreg_5.05 SparseM_1.05
[10] DNAcopy_1.40.0 GWASExactHW_1.01 gdsfmt_1.1.2
[13] ncdf_1.6.8
loaded via a namespace (and not attached):
[1] DBI_0.3.1 lattice_0.20-29 lmtest_0.9-33 RSQLite_1.0.0
[5] sandwich_2.3-2 zlibbioc_1.12.0 zoo_1.7-11
Thanks for reporting the bug about data from the .sample file not appearing in the scan annotation. I will work on a fix for this.
I am perplexed about the different behavior between your Mac and your cluster. Can you try the following on the cluster:
and paste the results? The test in the last line is what triggers the error you reported, but I don't know why it would behave differently on different machines.
Thank you Stephanie. Somehow it is working today, I don't know why!
The phenotype problem is still there though, imputedDosageFile only returns scanID, sampleID, and added.