Reputation: 309
I am running a microbial predictive functional profiling script and having this strange error. Here is my code:
file <- "HMP_0.97_table.txt"
QIIMESingleData <- importQIIMEData(file)
folderReferenceData <- "~/SILVA119/"
Tax4FunOutput <- Tax4Fun(QIIMESingleData, folderReferenceData, fctProfiling = TRUE, refProfile = "UProC", shortReadMode = TRUE, normCopyNo = TRUE)
Error in gzfile(file, "rb") : cannot open the connection In addition: Warning message: In gzfile(file, "rb") : cannot open compressed file '/Users/person/SILVA119/KEGGBacArchTaxInformationMoPPro.RData', probable reason 'No such file or directory'
I check my working directory with getwd and it says
getwd()
[1] "/Users/person/Downloads/Tax4FunData/SILVA119"
None of the files in the folder are compressed. I also noticed when I try opening the Rdata file R Studio gives me the following error:
load("/Users/person/Downloads/Tax4FunData/SILVA119/PathwayAbundancesKEGGBacArch.RData")
Error: bad restore file magic number (file may be corrupted) -- no data loaded In addition: Warning message: file ‘PathwayAbundancesKEGGBacArch.RData’ has magic number 'X' Use of save versions prior to 2 is deprecated
So I'm really unsure of how to proceed here. Here is the session data:
R version 3.2.2 (2015-08-14)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X 10.9.5 (Mavericks)
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] stats graphics grDevices utils datasets methods
[7] base
other attached packages:
[1] Tax4Fun_0.3.1 biom_0.3.12 qiimer_0.9.2 Matrix_1.2-2
loaded via a namespace (and not attached):
[1] colorspace_1.2-6 scales_0.3.0 plyr_1.8.3
[4] tools_3.2.2 gtable_0.1.2 RColorBrewer_1.1-2
[7] Rcpp_0.12.2 RJSONIO_1.3-0 grid_3.2.2
[10] munsell_0.4.2 lattice_0.20-33 pheatmap_1.0.7
>
Upvotes: 0
Views: 3671
Reputation: 78792
This is a pretty wonky package. The following works perfectly for me, but you really need to look at other SO questions to see what a minimal reproducible example looks like (it's very unlikely that your next SO question will get an answer without you showing some minimal effort):
devtools::install_url("http://tax4fun.gobics.de/Tax4Fun/Tax4Fun_0.3.1.tar.gz")
library(Tax4Fun)
download.file("http://tax4fun.gobics.de/Tax4Fun/ReferenceData/SILVA119.zip", "SILVA119.zip")
unzip("SILVA119.zip")
download.file("http://tax4fun.gobics.de/QIIME/HMP_0.97_table.txt", "HMP_0.97_table.txt")
file <- "HMP_0.97_table.txt"
QIIMESingleData <- importQIIMEData(file)
# SO is my dir for SO answer work
folderReferenceData <- "~/SO/SILVA119/"
Tax4FunOutput <- Tax4Fun(QIIMESingleData, folderReferenceData, fctProfiling = TRUE, refProfile = "UProC", shortReadMode = TRUE, normCopyNo = TRUE)
Upvotes: 1