Skip to content

parallelizing script for R cluster-Error- Function cannot find "tax_glom" #1653

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

Open
pulidofabs opened this issue Jan 13, 2023 · 0 comments
Open

Comments

@pulidofabs
Copy link

pulidofabs commented Jan 13, 2023

Hello, I am working with a large metagenomes dataset. As such, I need to use the cluster to parallelize the script to work on my > 800,000-row file. However, to use phyloseq here, I need to parallelize a script, and unfortunately, I am getting an error that makes no sense, and I cannot seem to find any advice online.

Any advice on why I am getting this error when phyloseq is loaded?

Fct<- function(physeq, ...) {
   library(physeq)
   Fun <- tax_glom(physeq, "Function")
   Fun1<-psmelt(Fun)
   FunTrt <- merge_samples(Fun, "Treatment") #
   FunTrt1<-psmelt(FunTrt)
   names(FunTrt1)[2]<-"Trt" 
   return(FunTrt1)
}

#Submit slurm job using batchtools

Njobs <- 1:4 # Define number of jobs (here 4)
ids <- batchMap(fun=myFct, x=Njobs)
done <- submitJobs(ids, reg=reg, resources=list(partition="short", walltime=60, ntasks=10, ncpus=1, memory=1024))
waitForJobs()

#When I run this script, I get the following error
> showLog()
Error in convertId(reg, id) : argument "id" is missing, with no default
> findErrors()
Empty data.table (0 rows and 1 cols): job.id
> getErrorMessages()
Empty data.table (0 rows and 4 cols): job.id,terminated,error,message

Thanks a million

@pulidofabs pulidofabs changed the title Parallelize phyloseq subset For loop & parallelizing script Jan 19, 2023
@pulidofabs pulidofabs changed the title For loop & parallelizing script parallelizing script for R cluster Jan 19, 2023
@pulidofabs pulidofabs changed the title parallelizing script for R cluster parallelizing script for R cluster-Function cannot find "tax_glom" Jan 19, 2023
@pulidofabs pulidofabs changed the title parallelizing script for R cluster-Function cannot find "tax_glom" parallelizing script for R cluster-Error- Function cannot find "tax_glom" Jan 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant