-
Notifications
You must be signed in to change notification settings - Fork 2
Issues Encountered when running the fGWAS package (version 0.3.6) #5
Description
Hello!
I use the R package of fGWAS to analyze my data, but I have encountered some problems and would like to ask you for some advice.
Here are the versions and environments of the packages I installed
Installation method: Install from local source (install_local)
Package version: 0.3.6 (GitHub master)
R version:
sessionInfo()
R version 4.4.0 (2024-04-24 ucrt)
Platform: x86_64-w64-mingw32/x64
Running under: Windows 10 x64 (build 19045)
Matrix products: default
locale:
[1] LC_COLLATE=Chinese (Simplified)_China.utf8 LC_CTYPE=Chinese (Simplified)_China.utf8
[3] LC_MONETARY=Chinese (Simplified)_China.utf8 LC_NUMERIC=C
[5] LC_TIME=Chinese (Simplified)_China.utf8
time zone: Asia/Shanghai
tzcode source: internal
attached base packages:
[1] parallel stats graphics grDevices utils datasets methods base
other attached packages:
[1] fGWAS_0.3.6 mvtnorm_1.3-3 snpStats_1.54.0 Matrix_1.7-3 survival_3.8-3 minpack.lm_1.2-4
loaded via a namespace (and not attached):
[1] zlibbioc_1.50.0 compiler_4.4.0 cli_3.6.4 tools_4.4.0 rstudioapi_0.17.1
[6] splines_4.4.0 grid_4.4.0 BiocGenerics_0.50.0 rlang_1.1.5 lattice_0.22-6
System PATH environment variable configuration: C:\Program Files (x86)\Common Files\Oracle\Java\java8path; C:\Program Files (x86)\Common Files\Oracle\Java\javapath; E:\soft\R\Rtools\bin; E: \ soft \ blast - 2.11.0 + \ db; E:\soft\soft\perl\site\bin; E:\soft\soft\perl\bin; C:\Perl\site\bin; C:\Perl\bin; E:\soft\soft\site\bin; E:\soft\soft\bin; C:\WINDOWS\system32; C:\WINDOWS; C:\WINDOWS\System32\Wbem; C: \ WINDOWS \ System32 \ WindowsPowerShell \ v1.0 ; C:\WINDOWS\System32\OpenSSH; E:\soft\python\Scripts; E:\soft\python; E: \ soft \ blast - 2.11.0 + \ bin; E:\soft\blast-BLAST_VERSION+\bin; C:\Users\Administrator\AppData\Local\Microsoft\WindowsApps; C:\ProgramData\miniconda3; C:\ProgramData\miniconda3\Lib; C:\ProgramData\miniconda3\Scripts; C:\ProgramData\miniconda3\Library\lib;
I encountered some problems in the process of phenotypic data input. The following are my data and errors
phe.long = "PDY.csv" # Phenotype file, must be CSV file
phe.time = "PDT.csv" # Phenotype sampling time file, must be CSV file
phe.cov = "phe.cov.csv" # Genotype principal component analysis file, as covariance
head(ph.long) # should be a numerical matrix with one sample per row and one time point per column
Y1 Y2 Y3 Y4 Y5
Ta000001 891.17 929.17 976.33 1008.68 1135.98
Ta000003 858.96 949.59 976.33 1000.78 1119.73
Ta000011 891.17 964.93 989.43 1039.27 1174.47
Ta000021 909.35 964.93 989.43 1051.28 1174.47
Ta000033 891.17 949.59 976.33 1017.48 1155.21
Ta000040 858.96 929.17 964.93 1008.68 1135.98
head(phe.time) # should be a numerical matrix, consistent with the phe.long dimension
T1 T2 T3 T4 T5
Ta000001 1 2 3 4 5
Ta000003 1 2 3 4 5
Ta000011 1 2 3 4 5
Ta000021 1 2 3 4 5
Ta000033 1 2 3 4 5
Ta000040 1 2 3 4 5
head(ph.cov) # should be a numerical matrix with one sample per row and one covariate per column
PC1 PC2 PC3 PC4 PC5 PC6 PC7 PC8
Ta000001 0.0267938 0.02047240 -0.03562390 -0.01009650 0.026851500 -0.1346040 -0.01745180 0.01320840
Ta000003 0.0381277 0.01538180-0.03039660 0.01201130-0.000720483 -0.1318870 0.04780250 0.00435794
Ta000011 0.0353500 0.01767220-0.01400810 0.00983667-0.011397600-0.1161940 0.03441070 0.00481045
Ta000021 0.0366130 -0.00167634 -0.02517000 -0.00592249 0.000885553 -0.0983315 0.04028080 -0.02994980
Ta000033 0.0417192 -0.06318610 -0.00559580 -0.06530660 -0.018130500 -0.0204218 0.02026780 -0.02947000
Ta000040 0.0287826 -0.04100450 0.00159689-0.02174000 0.052334200 -0.0193662 0.00581975 -0.01617120
obj.phe <- fg.load.phenotype(phe.long, phe.cov, phe.time, curve.type=NULL,covariance.type=NULL, file.plot.pdf="curve.fitting1.pdf")
No curve or new curve type is specified, curve fitting is being performed.
Searching curve type ......
- [ 1 / 10 ] try curve: Logistic
Error in class(h0) == "try-error" || is.na(h0) :
'length = 5' in coercion to 'logical(1)'
My data are accumulated temperature data of different stages of wheat pregnancy, so I chose Logistic fitting, but the above problems still exist:
obj.phe <- fg.load.phenotype(
file.phe.long = "PDY.csv",
file.phe.cov = "phe.cov.csv",
file.phe.time = "PDT.csv",
curve.type = "Logistic",
covariance.type = "AR1"
)
No curve or new curve type is specified, curve fitting is being performed.
Searching curve type ......
- [ 1 / 10 ] try curve: Logistic
Error in class(h0) == "try-error" || is.na(h0) :
'length = 5' in coercion to 'logical(1)'
I used your test file to simulate the data, but still got an error:
obj1 < -fg. simulate("Logistic", "AR1", 2000, 1000, 1:8, phe.missing=0.05, snp.missing=0.05, sig.pos=501, plink.format=FALSE, file.prefix = NULL );
Data simulation is done! [Sig= 501 ]
obj1.opt2 <- fg.snpscan( obj1$obj.gen, obj1$obj.phe, curve.type="Logistic", covariance.type="AR1", options=list(ncores=20))
gen.table[ 1000 2005 ]
Curve Type==> Logistic <==
Error in class(h0) == "try-error" || is.na(h0) :
'length = 5' in coercion to 'logical(1)'