Hi, I'm trying to run crisprseq on our HPC, with t...
# crisprseq
m
Hi, I'm trying to run crisprseq on our HPC, with the following setup: Nextflow version: 24.04.4.5917 Java version: openjdk 17.0.6 2023-01-17 LTS Operating system: Rocky Linux, VERSION="8.8 (Green Obsidian)",ID_LIKE="rhel centos fedora") Bash version: version 5.1.16(1)-release (x86_64-pc-linux-gnu) Apptainer: V1.3.3 Executor: slurm Hardware HPC -- submitting pipeline from tower.nf Tower Agent version 0.5.0 (build d758993) As I'm running it on the HPC I'm required to run it using Apptainer rather than Docker. I'm getting the error below, which I think relates to something seen by another user in a different context (see https://nfcore.slack.com/archives/CKDDD9JB0/p1730278780347589) when running a similar script via Singularity/Apptainer. Any help would be massively appreciated.
Copy code
The exit status of the task that caused the workflow execution to fail was: 1

Error executing process > 'NFCORE_CRISPRSEQ:CRISPRSEQ_SCREENING:MAGECK_FLUTEMLE (drugA_drugB_vs_treatment)'

Caused by:
  Process `NFCORE_CRISPRSEQ:CRISPRSEQ_SCREENING:MAGECK_FLUTEMLE (drugA_drugB_vs_treatment)` terminated with an error exit status (1)


Command executed [/mnt/scratch/projects/biol-tf-2018/nextflow/work/.nextflow/pipelines/6e167da8/nf-core/crisprseq/templates/template_fluteMLE.R]:

  #!/usr/bin/env Rscript
  #### author: Laurence Kuhlburger
  #### Released under the MIT license. See git repository (<https://github.com/nf-core/crisprseq>) for full license text.
  ####
  #### graphs mageck MLE
  
  library(MAGeCKFlute)
  library(clusterProfiler)
  library(ggplot2)
  
  library(pathview)
  options(ggrepel.max.overlaps = Inf)
  mle <- read.table("drugA_drugB_vs_treatment.gene_summary.txt", header = TRUE, sep = "	", stringsAsFactors = FALSE)
  
  if("drugA_drugB_vs_treatment" == "day0") {
      beta_strings <- grep("\\.beta", colnames(mle), value = TRUE)
      before_beta <- sub("\\.beta.*", "", beta_strings)
      unique_strings <- unique(before_beta)
      for(i in unique_strings) {
          tryCatch(
              {
                  FluteMLE(mle, treatname= i, proj=i, <http://pathview.top|pathview.top>=5)
              },
          error=function(e) {
                  print(paste("Could not run FluteMLE with project",i))
              }
          )
      }
  } else {
      beta_strings <- grep("\\.beta", colnames(mle), value = TRUE)
      before_beta <- sub("\\.beta.*", "", beta_strings)
      unique_strings <- unique(before_beta)
      for(i in unique_strings) {
          tryCatch(
              {
              FluteMLE(mle, treatname= i, proj=i,  , <http://pathview.top|pathview.top>=5)
              },
          error=function(e) {
                  print(paste("Could not run FluteMLE with project",i))
              }
          )
      }
  }
  
  version_file_path <- "versions.yml"
  version_flute <- paste(unlist(packageVersion("MAGeCKFlute")), collapse = ".")
  version_ggplot <- paste(unlist(packageVersion("ggplot2")), collapse = ".")
  version_clusterprofiler <- paste(unlist(packageVersion("clusterProfiler")), collapse = ".")
  version_pathview <- paste(unlist(packageVersion("pathview")), collapse = ".")
  
  f <- file(version_file_path, "w")
  writeLines('"NFCORE_CRISPRSEQ:CRISPRSEQ_SCREENING:MAGECK_FLUTEMLE":', f)
  writeLines("    MAGeCKFlute: ", f, sep = "")
  writeLines(version_flute, f)
  writeLines("    ggplot2: ", f, sep = "")
  writeLines(version_ggplot, f)
  writeLines("    clusterProfiler: ", f, sep = "")
  writeLines(version_clusterprofiler, f)
  writeLines("    pathview: ", f, sep = "")
  writeLines(version_pathview, f)
  close(f)

Command exit status:
  1

Command output:
  (empty)

Command error:
  
  Error: package or namespace load failed for 'MAGeCKFlute':
   .onLoad failed in loadNamespace() for 'depmap', details:
    call: h(simpleError(msg, call))
    error: error in evaluating the argument 'x' in selecting a method for function 'query': error in evaluating the argument 'conn' in selecting a method for function 'dbDisconnect': object 'info' not found
  In addition: Warning messages:
  1: In normalizePath("~") :
    path[1]="/users/username": No such file or directory
  2: In normalizePath("~") :
    path[1]="/users/username": No such file or directory
  3: In normalizePath("~") :
    path[1]="/users/username": No such file or directory
  4: In normalizePath("~") :
    path[1]="/users/username": No such file or directory
  5: In normalizePath("~") :
    path[1]="/users/username": No such file or directory
  6: In dir.create(cache, recursive = TRUE) :
    cannot create dir '/users/username', reason 'No such file or directory'
  7: In normalizePath(dn) :
    path[1]="/users/username/.cache/R/ExperimentHub": No such file or directory
  Execution halted

Work dir:
  /mnt/scratch/projects/biol-tf-2018/nextflow/work/da/f4dd1dc9f50219e57d2e485909ad07

Tip: you can try to figure out what's wrong by changing to the process work dir and showing the script file named `.command.sh`
l
Hi Matthew, yes this error is the bane of my existence and I'm currently getting help from @Pieter Moris to fix it. Otherwise my plan would be to make mageckflute optional so that the pipeline runs smoothly
m
Thank you for getting back to me, I know from my own experience that getting everything to play well with Apptainer can be a nightmare so I feel your pain. I'll also have a play around to see if there is anything that could be done to resolve this issue... but I'm far from an expert.
Okay, so a quick play around suggests that altering the R script to add this:
Copy code
Sys.setenv(HOME = getwd())
e.g. to look like this
Copy code
#!/usr/bin/env Rscript
#### author: Laurence Kuhlburger
#### Released under the MIT license. See git repository (<https://github.com/nf-core/crisprseq>) for full license text.
####
#### graphs mageck MLE

Sys.setenv(HOME = getwd())
library(MAGeCKFlute)
library(clusterProfiler)
library(ggplot2)
Resolves the issue.
👍 1
l
Would you mind adding your fix here https://github.com/nf-core/crisprseq/pull/214 so we can see if the tests pass with that fix?
m
I'm awaiting to be added to the nf-core GitHub (https://nfcore.slack.com/archives/CEB982K2T/p1730481168697959), once I am, I'll add to the PR.
@Laurence Kuhlburger I've now pushed some modifications to https://github.com/nf-core/crisprseq/pull/214/commits , they pass all tests bar a linting issue.
l
ok those are easily fixable, thanks a lot Matthew 🙌
m
No worries, it's nice to actually contribute considering how useful these pipelines are.
❤️ 1
l
we have a bunch of issues https://github.com/nf-core/crisprseq/issues some of them easy fixes but we’re only 2 actively contributing so if you ever want to help out that’d be great 🙂
Added you as a contributor in the README for the next release, thanks again :)
m
Thank you 😁. I can't promise that I'll be regular contributor, but as we use nfcore pipelines and discover bugs I aim to try to help fix them if I can.
❤️ 1
l
i’m always happy when a user pops out, i always wonder if people are actually using crisprseq 😛
m
People only tend to show up when they can't get things working, else they silently get on without thanking anyone... I suffer this problem.
l
yes this singularity issues have been making people pop out of the dark, thanks to you they will go back into silently using the pipeline which is the best for the pipeline but not for my ego 😛
🤣 1