Skip to content

Workflow Error: xfun R dependency mismatch in DESeq2 #2

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

Closed
kee007ney opened this issue Mar 30, 2021 · 3 comments
Closed

Workflow Error: xfun R dependency mismatch in DESeq2 #2

kee007ney opened this issue Mar 30, 2021 · 3 comments

Comments

@kee007ney
Copy link

Following instructions with correct Ubuntu and Nextflow versions produces this (excerpted) error:

  Error: package or namespace load failed for ‘DESeq2’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
   namespace ‘xfun’ 0.15 is being loaded, but >= 0.19 is required
  In addition: Warning message:
  package ‘matrixStats’ was built under R version 3.6.3 
  Execution halted

(Full error is below):

Pipeline completed with errors-
WARN: To render the execution DAG in the required format it is required to install Graphviz -- See http://www.graphviz.org for more info.
Error executing process > 'CONSENSUS_PEAKS_DESEQ2 (SPT5)'

Caused by:
  Process `CONSENSUS_PEAKS_DESEQ2 (SPT5)` terminated with an error exit status (1)

Command executed:

  featurecounts_deseq2.r \
      --featurecount_file SPT5.consensus_peaks.featureCounts.txt \
      --bam_suffix '.mLb.clN.bam' \
      --outdir ./ \
      --outprefix SPT5.consensus_peaks \
      --outsuffix '' \
      --cores 2 \
  
  
  sed 's/deseq2_pca/deseq2_pca_1/g' <deseq2_pca_header.txt >tmp.txt
  sed -i -e 's/DESeq2 /SPT5 DESeq2 /g' tmp.txt
  cat tmp.txt SPT5.consensus_peaks.pca.vals.txt > SPT5.consensus_peaks.pca.vals_mqc.tsv
  
  sed 's/deseq2_clustering/deseq2_clustering_1/g' <deseq2_clustering_header.txt >tmp.txt
  sed -i -e 's/DESeq2 /SPT5 DESeq2 /g' tmp.txt
  cat tmp.txt SPT5.consensus_peaks.sample.dists.txt > SPT5.consensus_peaks.sample.dists_mqc.tsv
  
  find * -type f -name "*.FDR0.05.results.bed" -exec echo -e "bwa/mergedLibrary/macs/broadPeak/consensus/SPT5/deseq2/"{}"\t255,0,0" \; > SPT5.consensus_peaks.igv.txt

Command exit status:
  1

Command output:
  (empty)

Command error:
      dirname, do.call, duplicated, eval, evalq, Filter, Find, get, grep,
      grepl, intersect, is.unsorted, lapply, Map, mapply, match, mget,
      order, paste, pmax, pmax.int, pmin, pmin.int, Position, rank,
      rbind, Reduce, rownames, sapply, setdiff, sort, table, tapply,
      union, unique, unsplit, which, which.max, which.min
  
  
  Attaching package: ‘S4Vectors’
  
  The following object is masked from ‘package:base’:
  
      expand.grid
  
  Loading required package: IRanges
  Loading required package: GenomicRanges
  Loading required package: GenomeInfoDb
  Loading required package: SummarizedExperiment
  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")'.
  
  Loading required package: DelayedArray
  Loading required package: matrixStats
  
  Attaching package: ‘matrixStats’
  
  The following objects are masked from ‘package:Biobase’:
  
      anyMissing, rowMedians
  
  Loading required package: BiocParallel
  
  Attaching package: ‘DelayedArray’
  
  The following objects are masked from ‘package:matrixStats’:
  
      colMaxs, colMins, colRanges, rowMaxs, rowMins, rowRanges
  
  The following objects are masked from ‘package:base’:
  
      aperm, apply, rowsum
  
  Error: package or namespace load failed for ‘DESeq2’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
   namespace ‘xfun’ 0.15 is being loaded, but >= 0.19 is required
  In addition: Warning message:
  package ‘matrixStats’ was built under R version 3.6.3 
  Execution halted

Work dir:
  /home/j/chipseq_20210330/data/work/4e/c7a9b7394c7760781354adda99f45c

Tip: when you have fixed the problem you can continue the execution adding the option `-resume` to the run command line

@stain
Copy link
Member

stain commented Apr 22, 2021

This error seems to be related to nf-core/chipseq/issues/206 and the fact that R is not following semantic versioning.

I get a different error by running in a fresh Docker container of ubuntu:20.04 after installing curl, miniconda and the nextflow environment according to this guide.

(bco-ro) root@5ba894f413ba:/chipseq_20200924# nextflow run nf-core/chipseq -revision 1.2.1 -profile test,conda
N E X T F L O W  ~  version 20.07.1
Pulling nf-core/chipseq ...
downloaded from https://github.com/nf-core/chipseq.git
Launching `nf-core/chipseq` [grave_morse] - revision: 0f487ed76d [1.2.1]
----------------------------------------------------
                                        ,--./,-.
        ___     __   __   __   ___     /,-._.--~'
  |\ | |__  __ /  ` /  \ |__) |__         }  {
  | \| |       \__, \__/ |  \ |___     \`-._,-`-,
                                        `._,._,'
  nf-core/chipseq v1.2.1
----------------------------------------------------
Run Name            : grave_morse
Data Type           : Paired-End
Design File         : https://raw.githubusercontent.com/nf-core/test-datasets/chipseq/design.csv
Genome              : Not supplied
Fasta File          : https://raw.githubusercontent.com/nf-core/test-datasets/atacseq/reference/genome.fa
GTF File            : https://raw.githubusercontent.com/nf-core/test-datasets/atacseq/reference/genes.gtf
MACS2 Genome Size   : 1.2E+7
Min Consensus Reps  : 1
MACS2 Narrow Peaks  : No
MACS2 Broad Cutoff  : 0.1
Trim R1             : 0 bp
Trim R2             : 0 bp
Trim 3' R1          : 0 bp
Trim 3' R2          : 0 bp
NextSeq Trim        : 0 bp
Fingerprint Bins    : 100
Save Genome Index   : No
Max Resources       : 6 GB memory, 2 cpus, 12h time per job
Output Dir          : ./results
Launch Dir          : /chipseq_20200924
Working Dir         : /chipseq_20200924/work
Script Dir          : /root/.nextflow/assets/nf-core/chipseq
User                : root
Config Profile      : test,conda
Config Description  : Minimal test dataset to check pipeline function
----------------------------------------------------
[-        ] process > CHECK_DESIGN             -
[-        ] process > BWA_INDEX                -
[-        ] process > MAKE_GENE_BED            -
[-        ] process > MAKE_GENOME_FILTER       -
[-        ] process > FASTQC                   -
[-        ] process > TRIMGALORE               -
[-        ] process > BWA_MEM                  -
[-        ] process > SORT_BAM                 -
[-        ] process > MERGED_BAM               -
[-        ] process > MERGED_BAM_FILTER        -
[-        ] process > MERGED_BAM_REMOVE_ORPHAN -
[-        ] process > PRESEQ                   -
[-        ] process > PICARD_METRICS           -
[-        ] process > BIGWIG                   -
[-        ] process > PLOTPROFILE              -
[-        ] process > PHANTOMPEAKQUALTOOLS     -
[-        ] process > PLOTFINGERPRINT          -
[-        ] process > MACS2                    -
[-        ] process > MACS2_ANNOTATE           -
[-        ] process > MACS2_QC                 -
[-        ] process > CONSENSUS_PEAKS          -
[-        ] process > CONSENSUS_PEAKS_ANNOTATE -
[-        ] process > CONSENSUS_PEAKS_COUNTS   -
[-        ] process > CONSENSUS_PEAKS_DESEQ2   -
[-        ] process > IGV                      -
[-        ] process > get_software_versions    -
[-        ] process > MULTIQC                  -
[-        ] process > output_documentation     -
Error executing process > 'MAKE_GENE_BED (genes.gtf)'

Caused by:
  Failed to create Conda environment
  command: conda env create --prefix /chipseq_20200924/work/conda/nf-core-chipseq-1.2.1-124f0f8d69d9dfbfcea852493605e617 --file /root/.nextflow/assets/nf-core/chipseq/environment.yml
  status : 137
  message:



-[nf-core/chipseq] Pipeline completed with errors-
WARN: To render the execution DAG in the required format it is required to install Graphviz -- See http://www.graphviz.org for more info.

(bco-ro) root@5ba894f413ba:/chipseq_20200924# 

@stain stain changed the title Workflow Error Workflow Error: xfun R dependency mismatch in DESeq2 Apr 22, 2021
@stain
Copy link
Member

stain commented Apr 22, 2021

Reproduced original error also with older 1.2.0 version of workflow:

Error executing process > 'CONSENSUS_PEAKS_DESEQ2 (SPT5)'

Caused by:
  Process `CONSENSUS_PEAKS_DESEQ2 (SPT5)` terminated with an error exit status (1)

Command executed:

  featurecounts_deseq2.r \
      --featurecount_file SPT5.consensus_peaks.featureCounts.txt \
      --bam_suffix '.mLb.clN.bam' \
      --outdir ./ \
      --outprefix SPT5.consensus_peaks \
      --outsuffix '' \
      --cores 2 \
  
  
  sed 's/deseq2_pca/deseq2_pca_1/g' <deseq2_pca_header.txt >tmp.txt
  sed -i -e 's/DESeq2 /SPT5 DESeq2 /g' tmp.txt
  cat tmp.txt SPT5.consensus_peaks.pca.vals.txt > SPT5.consensus_peaks.pca.vals_mqc.tsv
  
  sed 's/deseq2_clustering/deseq2_clustering_1/g' <deseq2_clustering_header.txt >tmp.txt
  sed -i -e 's/DESeq2 /SPT5 DESeq2 /g' tmp.txt
  cat tmp.txt SPT5.consensus_peaks.sample.dists.txt > SPT5.consensus_peaks.sample.dists_mqc.tsv
  
  find * -type f -name "*.FDR0.05.results.bed" -exec echo -e "bwa/mergedLibrary/macs/broadPeak/consensus/SPT5/deseq2/"{}"\t255,0,0" \; > SPT5.consensus_peaks.igv.txt

Command exit status:
  1

Command output:
  (empty)

Command error:
      as.data.frame, basename, cbind, colnames, dirname, do.call,
      duplicated, eval, evalq, get, grep, grepl, intersect, is.unsorted,
      lapply, mapply, match, mget, order, paste, pmax, pmax.int, pmin,
      pmin.int, rank, rbind, rownames, sapply, setdiff, sort, table,
      tapply, union, unique, unsplit, which, which.max, which.min
  
  
  Attaching package: 'S4Vectors'
  
  The following object is masked from 'package:base':
  
      expand.grid
  
  Loading required package: IRanges
  Loading required package: GenomicRanges
  Loading required package: GenomeInfoDb
  Loading required package: SummarizedExperiment
  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")'.
  
  Loading required package: DelayedArray
  Loading required package: matrixStats
  
  Attaching package: 'matrixStats'
  
  The following objects are masked from 'package:Biobase':
  
      anyMissing, rowMedians
  
  Loading required package: BiocParallel
  
  Attaching package: 'DelayedArray'
  
  The following objects are masked from 'package:matrixStats':
  
      colMaxs, colMins, colRanges, rowMaxs, rowMins, rowRanges
  
  The following objects are masked from 'package:base':
  
      aperm, apply, rowsum
  
  Error: package or namespace load failed for 'DESeq2' in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
   namespace 'xfun' 0.15 is being loaded, but >= 0.19 is required
  In addition: Warning message:
  package 'matrixStats' was built under R version 3.6.3 
  Execution halted

Work dir:
  /work/ba/e59a76de2b41b2ffa2fbd83c3fef1d

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`

Alternatives:

  • Patch the workflow as part of the tutorial (confusing)
  • download patched version from our repo (confuses argument of URLs and authors),
  • await new workflow release of 1.2.1
  • switch to a different nf-core workflow (update example, screenshots etc) e.g. https://nf-co.re/rnaseq/2.0
  • switch to run workflow with Docker (more things to install, memory configuration of VM etc)
  • switch tutorial to NOT run the workflow, but download pre-baked non-BCO results as starting point

@stain
Copy link
Member

stain commented Apr 23, 2021

Fixed in nf-core/chipseq#206 - thanks to @drpatelh for rolling an updated 1.2.2.

@stain stain closed this as completed in f2c9080 Apr 23, 2021
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

2 participants