*`dplyr` package error in conda env while running ...
# crisprseq
c
dplyr
package error in conda env while running
test_screening
Hi all, this could be a possible bug, I'm running the screening wf for the first time and I got the following error
Copy code
nextflow run nf-core/crisprseq -profile test_screening,conda --outdir results --analysis screening

 N E X T F L O W   ~  version 24.10.4

Launching `<https://github.com/nf-core/crisprseq>` [stoic_allen] DSL2 - revision: 0e9f915c4a [master]

WARN: Access to undefined parameter `reference_fasta` -- Initialise it to a default value eg. `params.reference_fasta = some_value`
WARN: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    There is a problem with your Conda configuration!
    You will need to set-up the conda-forge and bioconda channels correctly.
    Please refer to <https://bioconda.github.io/>
    The observed channel order is
    [conda-forge]
    but the following channel order is required:
    [conda-forge, bioconda]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"


------------------------------------------------------
                                        ,--./,-.
        ___     __   __   __   ___     /,-._.--~'
  |\ | |__  __ /  ` /  \ |__) |__         }  {
  | \| |       \__, \__/ |  \ |___     \`-._,-`-,
                                        `._,._,'
  nf-core/crisprseq 2.3.0
------------------------------------------------------
Input/output options
  input                     : <https://raw.githubusercontent.com/nf-core/test-datasets/crisprseq/testdata/samplesheet_test.csv>
  outdir                    : results
  analysis                  : screening

Screening parameters
  library                   : <https://raw.githubusercontent.com/nf-core/test-datasets/crisprseq/testdata/brunello_target_sequence.txt>
  contrasts                 : <https://raw.githubusercontent.com/nf-core/test-datasets/crisprseq/testdata/rra_contrasts.txt>
  mle                       : true
  rra                       : true
  bagel2                    : true
  drugz                     : true
  crisprcleanr              : Brunello_Library
  hitselection              : true
  hit_selection_iteration_nb: 50

Institutional config options
  config_profile_name       : Test screening profile
  config_profile_description: Minimal test dataset to check pipeline function

Core Nextflow options
  revision                  : master
  runName                   : stoic_allen
  launchDir                 : /home/chandini.v/nfcore-crisprseq
  workDir                   : /home/chandini.v/nfcore-crisprseq/work
  projectDir                : /home/chandini.v/.nextflow/assets/nf-core/crisprseq
  userName                  : chandini.v
  profile                   : test_screening,conda
  configFiles               : 

!! Only displaying parameters that differ from the pipeline defaults !!
------------------------------------------------------* The pipeline
  <https://doi.org/10.5281/zenodo.7598496>

* The nf-core framework
    <https://doi.org/10.1038/s41587-020-0439-x>

* Software dependencies
    <https://github.com/nf-core/crisprseq/blob/master/CITATIONS.md>

executor >  local (5)
[d1/87201e] process > NFCORE_CRISPRSEQ:CRISPRSEQ_SCREENING:FASTQC (SRR8983579)                            [100%] 2 of 2 ✔
[22/87a460] process > NFCORE_CRISPRSEQ:CRISPRSEQ_SCREENING:MAGECK_COUNT (control,treatment)               [100%] 1 of 1 ✔
[e6/2a0305] process > NFCORE_CRISPRSEQ:CRISPRSEQ_SCREENING:CRISPRCLEANR_NORMALIZE (count_table_normalize) [  0%] 0 of 1
[-        ] process > NFCORE_CRISPRSEQ:CRISPRSEQ_SCREENING:MAGECK_TEST                                    -
[-        ] process > NFCORE_CRISPRSEQ:CRISPRSEQ_SCREENING:MAGECK_GRAPHRRA                                -
[-        ] process > NFCORE_CRISPRSEQ:CRISPRSEQ_SCREENING:HITSELECTION_RRA                               -
[-        ] process > NFCORE_CRISPRSEQ:CRISPRSEQ_SCREENING:BAGEL2_FC                                      -
[-        ] process > NFCORE_CRISPRSEQ:CRISPRSEQ_SCREENING:BAGEL2_BF                                      -
[-        ] process > NFCORE_CRISPRSEQ:CRISPRSEQ_SCREENING:BAGEL2_PR                                      -
[-        ] process > NFCORE_CRISPRSEQ:CRISPRSEQ_SCREENING:BAGEL2_GRAPH                                   -
[-        ] process > NFCORE_CRISPRSEQ:CRISPRSEQ_SCREENING:HITSELECTION_BAGEL2                            -
[c2/b1cdd6] process > NFCORE_CRISPRSEQ:CRISPRSEQ_SCREENING:MATRICESCREATION (1)                           [100%] 1 of 1 ✔
[-        ] process > NFCORE_CRISPRSEQ:CRISPRSEQ_SCREENING:MAGECK_MLE                                     -
[-        ] process > NFCORE_CRISPRSEQ:CRISPRSEQ_SCREENING:HITSELECTION_MLE                               -
[-        ] process > NFCORE_CRISPRSEQ:CRISPRSEQ_SCREENING:MAGECK_FLUTEMLE_CONTRASTS                      -
[-        ] process > NFCORE_CRISPRSEQ:CRISPRSEQ_SCREENING:DRUGZ                                          -
[-        ] process > NFCORE_CRISPRSEQ:CRISPRSEQ_SCREENING:HITSELECTION                                   -
[-        ] process > NFCORE_CRISPRSEQ:CRISPRSEQ_SCREENING:VENNDIAGRAM                                    -
[-        ] process > NFCORE_CRISPRSEQ:CRISPRSEQ_SCREENING:VENNDIAGRAM_DRUGZ                              -
[-        ] process > NFCORE_CRISPRSEQ:CRISPRSEQ_SCREENING:MULTIQC                                        -
Execution cancelled -- Finishing pending tasks before exit
-[nf-core/crisprseq] Pipeline completed with errors-
ERROR ~ Error executing process > 'NFCORE_CRISPRSEQ:CRISPRSEQ_SCREENING:CRISPRCLEANR_NORMALIZE (count_table_normalize)'

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


Command executed:

  #!/usr/bin/env Rscript
  library(CRISPRcleanR)
  library(dplyr)
  
  print('Brunello_Library')
  count_file <- read.delim('count_table.count.txt',header=T,sep = "	")
  count_file <-  count_file[!duplicated(count_file$sgRNA), ]
  if('' == "") {
      data('Brunello_Library')
      library <- as.data.frame(get('Brunello_Library'))
      #colnames(library)
      #print(head(count_file))
      #print(head(library))
      count_file_to_normalize <- count_file  %>% dplyr::left_join(library, by=c("sgRNA"="seq"),multiple = "all")
      count_file_to_normalize <- count_file_to_normalize %>% 
          dplyr::select(colnames(count_file),CODE,-sgRNA)
  
      names(count_file_to_normalize)[names(count_file_to_normalize) == 'Gene'] <- 'gene'
      names(count_file_to_normalize)[names(count_file_to_normalize) == 'CODE'] <- 'sgRNA'
      count_file_to_normalize <- count_file_to_normalize %>% dplyr::select(sgRNA, gene, everything())        
  } else {
      try(library <- read.delim('',header=T,sep = ","))
      duplicates <- duplicated(library[, 1])
      unique_rows <- !duplicates
      library <- library[unique_rows, , drop = FALSE]
      rownames(library) = library[,1]
      library = library[order(rownames(library)),]
      library = library[,-1]
      names(count_file)[names(count_file) == 'Gene'] <- 'gene'
      count_file_to_normalize <- count_file %>% dplyr::select(sgRNA, gene, everything())
      }
  
  normANDfcs <- ccr.NormfoldChanges(Dframe=count_file_to_normalize,saveToFig = FALSE,min_reads=30,EXPname="count_table_normalize", libraryAnnotation=library,display=FALSE)
  gwSortedFCs <- ccr.logFCs2chromPos(normANDfcs[["logFCs"]],library)
  correctedFCs <- ccr.GWclean(gwSortedFCs,display=FALSE,label='crisprcleanr')
  correctedCounts <- ccr.correctCounts('crisprcleanr',
                          normANDfcs[["norm_counts"]],
                          correctedFCs,
                          library,
                          minTargetedGenes=3,
                          OutDir='./')
  
  write.table(correctedCounts, file=paste0("crisprcleanr","_norm_table.tsv"),row.names=FALSE,quote=FALSE,sep="	")
  
  #version
  version_file_path <- "versions.yml"
  version_crisprcleanr <- paste(unlist(packageVersion("CRISPRcleanR")), collapse = ".")
  f <- file(version_file_path, "w")
  writeLines('"NFCORE_CRISPRSEQ:CRISPRSEQ_SCREENING:CRISPRCLEANR_NORMALIZE":', f)
  writeLines("    crisprcleanr: ", f, sep = "")
  writeLines(version_crisprcleanr, f)
  close(f)

Command exit status:
  1

Command output:
  (empty)

Command error:
  Loading required package: SummarizedExperiment
  Loading required package: MatrixGenerics
  Loading required package: matrixStats
  
  Attaching package: 'MatrixGenerics'
  
  The following objects are masked from 'package:matrixStats':
  
      colAlls, colAnyNAs, colAnys, colAvgsPerRowSet, colCollapse,
      colCounts, colCummaxs, colCummins, colCumprods, colCumsums,
      colDiffs, colIQRDiffs, colIQRs, colLogSumExps, colMadDiffs,
      colMads, colMaxs, colMeans2, colMedians, colMins, colOrderStats,
      colProds, colQuantiles, colRanges, colRanks, colSdDiffs, colSds,
      colSums2, colTabulates, colVarDiffs, colVars, colWeightedMads,
      colWeightedMeans, colWeightedMedians, colWeightedSds,
      colWeightedVars, rowAlls, rowAnyNAs, rowAnys, rowAvgsPerColSet,
      rowCollapse, rowCounts, rowCummaxs, rowCummins, rowCumprods,
      rowCumsums, rowDiffs, rowIQRDiffs, rowIQRs, rowLogSumExps,
      rowMadDiffs, rowMads, rowMaxs, rowMeans2, rowMedians, rowMins,
      rowOrderStats, rowProds, rowQuantiles, rowRanges, rowRanks,
      rowSdDiffs, rowSds, rowSums2, rowTabulates, rowVarDiffs, rowVars,
      rowWeightedMads, rowWeightedMeans, rowWeightedMedians,
      rowWeightedSds, rowWeightedVars
  
  Loading required package: Biobase
  Welcome to Bioconductor
  
      Vignettes contain introductory material; view with
      'browseVignettes()'. To cite Bioconductor, see
      'citation("Biobase")', and for packages 'citation("pkgname")'.
  
  
  Attaching package: 'Biobase'
  
  The following object is masked from 'package:MatrixGenerics':
  
      rowMedians
  
  The following objects are masked from 'package:matrixStats':
  
      anyMissing, rowMedians
  
  Loading required package: Rsubread
  Loading required package: Rqc
  Loading required package: ggplot2
  Loading required package: jsonlite
  Warning message:
  replacing previous import 'withr::makevars_user' by 'tools::makevars_user' when loading 'CRISPRcleanR' 
  Error in library(dplyr) : there is no package called 'dplyr'
  Execution halted

Work dir:
  /home/chandini.v/nfcore-crisprseq/work/e6/2a03058de72bb4e4cadc46c09b6047

Tip: you can replicate the issue by changing to the process work dir and entering the command `bash .command.run`

 -- Check '.nextflow.log' file for details
ERROR ~ Pipeline failed. Please refer to troubleshooting docs: <https://nf-co.re/docs/usage/troubleshooting>

 -- Check '.nextflow.log' file for details
FIXED by adding dependencies
conda-forge::r-dplyr==1.1.4
to
environment.yml
l
Hi Chandini, would you be open to do a small PR to fix this small issue? We could list you as a contributor, thanks a lot for spotting it 🙂
c
Hi @Laurence Kuhlburger Sure! I'm on it now. Edit: Ah, I'm definitely late to this. Thank you for fixing it though!