-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error in var(x) : is.atomic(y) is not TRUE #76
Comments
Hmmm, this is usually a mismatch in input files. can you provide a little bit more information on the format of the input files, and perhaps the first couple of lines? |
The input files are the picrust2 output files: picrust2 = "/pathway/" #Import PICRUSt2 results p2_EC = paste0(picrust2, "/EC_metagenome_out/pred_metagenome_unstrat.tsv.gz") #Load picrust2 output files p2EC = as.data.frame(fread(p2_EC)) p2KO = as.data.frame(fread(p2_KO)) p2PW = as.data.frame(fread(p2_PW)) #Reading metadata file metadata <- read_q2metadata("/pathway/sample-metadata-picrust.txt") #EC set.seed(123) #First lines of the files: #p2EC: SRR1556302 SRR1556810 SRR1556811 SRR1556812 SRR1556813 SRR1556814 #metadata SampleID maternal_obesity Both input files have matching rows and columns: ncol(p2EC) |
When I run the script in my local machine it works, but when I try to run the exactly same scipt on a remote server it returns this error, even with different inputs. |
could you inspect the results of sessionInfo() from each machine after a clean start of the R session? my guess is that one of them has more recent R packages than the other. |
the sessionInfo() from the one that does not work: R version 4.4.1 (2024-06-14) Matrix products: default locale: time zone: America/Sao_Paulo attached base packages: other attached packages: loaded via a namespace (and not attached): the sessionInfo() from the one that works: R version 4.4.1 (2024-06-14 ucrt) Matrix products: default locale: time zone: America/Sao_Paulo attached base packages: other attached packages: loaded via a namespace (and not attached): |
I am trying to run this tutorial https://ycl6.github.io/16S-Demo/4_picrust2_tutorial.html and the following error occurs:
set.seed(123)
system.time({
aldex2_EC = aldex(p2EC, metadata$fecal_sample_type, mc.samples = 500, test = "t", effect = TRUE, denom = "iqlr", verbose = TRUE)
})
aldex.clr: generating Monte-Carlo instances and clr values
conditions vector supplied
operating in serial mode
removed rows with sums equal to zero
computing iqlr centering
Error in var(x) : is.atomic(y) is not TRUE
13.stop(simpleError(msg, call = if (p <- sys.parent(1L)) sys.call(p)))
12.stopifnot(is.atomic(y))
11.var(x)
10.var(x)
9.FUN(newX[, i], ...)
8.apply(reads.clr[these.rows, ], 2, function(x) {
var(x)
})
7.iqlr.features(reads, conds)
6.aldex.set.mode(reads, conds, denom)
5.aldex.clr.function(as.data.frame(reads), conds, mc.samples, denom,
verbose, useMC, summarizedExperiment = FALSE, gamma)
4.aldex.clr(reads = reads, conds = conditions, mc.samples = mc.samples,
denom = denom, verbose = verbose, useMC = FALSE, gamma = gamma)
3.aldex.clr(reads = reads, conds = conditions, mc.samples = mc.samples,
denom = denom, verbose = verbose, useMC = FALSE, gamma = gamma)
2.aldex(p2EC, metadata$fecal_sample_type, mc.samples = 500, test = "t",
effect = TRUE, denom = "iqlr", verbose = TRUE)
1.system.time({
aldex2_EC = aldex(p2EC, metadata$fecal_sample_type, mc.samples = 500,
test = "t", effect = TRUE, denom = "iqlr", verbose = TRUE)
})
Timing stopped at: 1.217 0.014 1.224
The text was updated successfully, but these errors were encountered: