epi2me-labs / wf-basecalling

Other
34 stars 14 forks source link

Workflow can't find minimap2 and/or seq_cache_populate.pl #37

Closed lucy924 closed 6 months ago

lucy924 commented 7 months ago

Operating System

Other Linux (please specify below)

Other Linux

Ubuntu 20.04.6 LTS

Workflow Version

v1.1.7-g2e9fce3

Workflow Execution

Command line

EPI2ME Version

No response

CLI command run

mamba activate venv_with_minimap2
nextflow run epi2me-labs/wf-basecalling \
    --input /base/path/to/sample/directory \
    --ref /different/path/to/fasta/reference.fa \
    --out_dir /different/path/to/analyses/output \
    --sample_name Sample01 \
    --basecaller_cfg dna_r10.4.1_e8.2_400bps_sup@v4.3.0 \
    --remora_cfg dna_r10.4.1_e8.2_400bps_sup@v4.3.0_5mCG_5hmCG@v1 \
    --basecaller_args="-r -N 2 --kit-name SQK-NBD114-24 --sample-sheet /base/path/to/sample_sheet.csv" \
    --watch_path 

Workflow Execution - CLI Execution Profile

None

What happened?

It doesn't seem to run using the virtual environment, I was wondering if this is possible because I'd prefer not to have to install minimap outside of a virtual environment. Additionally, when I install minimap2 outside the virtual environment I then get an error about how it doesn't recognise the command seq_cache_populate.pl I'd like to see it start processing the pod5 files that I give it in --input.

Docker version 26.1.0, build 9714adc

Relevant log output

# When I'm running it in the venv_with_minimap:

N E X T F L O W  ~  version 23.04.4
Launching `https://github.com/epi2me-labs/wf-basecalling` [sick_edison] DSL2 - revision: 2e9fce3763 [master]
WARN: NEXTFLOW RECURSION IS A PREVIEW FEATURE - SYNTAX AND FUNCTIONALITY CAN CHANGE IN FUTURE RELEASES

||||||||||   _____ ____ ___ ____  __  __ _____      _       _
||||||||||  | ____|  _ \_ _|___ \|  \/  | ____|    | | __ _| |__  ___
|||||       |  _| | |_) | |  __) | |\/| |  _| _____| |/ _` | '_ \/ __|
|||||       | |___|  __/| | / __/| |  | | |__|_____| | (_| | |_) \__ \
||||||||||  |_____|_|  |___|_____|_|  |_|_____|    |_|\__,_|_.__/|___/
||||||||||  wf-basecalling v1.1.7-g2e9fce3
--------------------------------------------------------------------------------
Core Nextflow options
  revision       : master
  runName        : sick_edison
  containerEngine: docker
  launchDir      : /home/dejlu879/20240416_BEBIC_B/run_nextflow
  workDir        : /home/dejlu879/20240416_BEBIC_B/run_nextflow/work
  projectDir     : /home/dejlu879/.nextflow/assets/epi2me-labs/wf-basecalling
  userName       : dejlu879
  profile        : standard
  configFiles    : /home/dejlu879/.nextflow/assets/epi2me-labs/wf-basecalling/nextflow.config

Input Options
  input          : /external/data/2024415-BEBIC_B/F_T0_rest
  ref            : /home/uowgene/Documents/hg38_refs/hg38_chromsonly.ebv.lambda.bcg.fa

Output Options
  out_dir        : /external/analyses/20240416_BEBIC_B/BT0
  sample_name    : B_T0_rest

Basecalling options
  basecaller_cfg : dna_r10.4.1_e8.2_400bps_sup@v4.3.0
  remora_cfg     : dna_r10.4.1_e8.2_400bps_sup@v4.3.0_5mCG_5hmCG@v1

Advanced basecalling options
  basecaller_args: -r -N 2 --kit-name SQK-NBD114-24 --sample-sheet /home/dejlu879/20240416_BEBIC_B/sample_sheet_FT0.csv

Real Time Analysis Options
  watch_path     : true

!! Only displaying parameters that differ from the pipeline defaults !!
--------------------------------------------------------------------------------
If you use epi2me-labs/wf-basecalling for your analysis please cite:

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

--------------------------------------------------------------------------------
This is epi2me-labs/wf-basecalling v1.1.7-g2e9fce3.
--------------------------------------------------------------------------------
WARN: Watching /external/data/2024415-BEBIC_B/F_T0_rest for new pod5 files indefinitely.
WARN: To stop this workflow create: /external/data/2024415-BEBIC_B/F_T0_rest/STOP.f63ccb58-2cf9-4521-8d0c-839bd17ebe8d.pod5
executor >  local (5)
[f6/1cece8] process > wf_dorado:dorado (29)        [  0%] 0 of 129
[88/1c3cbb] process > wf_dorado:make_mmi           [100%] 1 of 1, failed: 1 ✘
[-        ] process > wf_dorado:align_and_qsFilter -
[-        ] process > wf_dorado:merge_pass_calls   -
[-        ] process > wf_dorado:merge_fail_calls   -
[88/1bbd8b] process > getVersions                  [100%] 1 of 1 ✔
[f7/543f75] process > getParams                    [  0%] 0 of 1
[e3/5e1992] process > cram_cache                   [100%] 1 of 1, failed: 1 ✘
[-        ] process > bamstats                     -
[-        ] process > progressive_stats            -
[-        ] process > makeReport                   -
[-        ] process > output_last                  -
[-        ] process > output_stream                [  0%] 0 of 1
ERROR ~ Error executing process > 'wf_dorado:make_mmi'

Caused by:
  Process `wf_dorado:make_mmi` terminated with an error exit status (127)

Command executed:

  minimap2 -t 4 -x map-ont -d ref.mmi hg38_chromsonly.ebv.lambda.bcg.fa

Command exit status:
  127

Command output:
  (empty)

Command error:
  .command.sh: line 2: minimap2: command not found

Work dir:
  /home/dejlu879/20240416_BEBIC_B/run_nextflow/work/88/1c3cbb2a11ce1a7769eae0a4f0fd92

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`

 -- Check '.nextflow.log' file for details
WARN: Killing running tasks (2)

#############################################################################
# When minimap2 is installed outside the venv the error section is as below:
ERROR ~ Error executing process > 'cram_cache'

Caused by:
  Process `cram_cache` terminated with an error exit status (127)

Command executed:

  seq_cache_populate.pl -root ref_cache/ hg38_chromsonly.ebv.lambda.bcg.fa

Command exit status:
  127

Command output:
  (empty)

Command error:
  .command.sh: line 2: seq_cache_populate.pl: command not found

Work dir:
  /home/dejlu879/20240416_BEBIC_B/run_nextflow/work/f7/30d2484ff8a07d4950847b9d8e00f5

Application activity log entry

No response

Were you able to successfully run the latest version of the workflow with the demo data?

No response

Other demo data information

No response

SamStudio8 commented 7 months ago

Hi @lucy924, this is an unfortunate quirk where the files installed in the home directory of our containers are shadowed by your home directory. This occurs when Nextflow needs to mount more than one subdirectory of /home from your system. In your case, because your ref is stored in home/uowgene/ and your other resources are stored in /home/dejlu879, Nextflow will mount your entire /home and shadow the one in the container.

  launchDir      : /home/dejlu879/20240416_BEBIC_B/run_nextflow
  workDir        : /home/dejlu879/20240416_BEBIC_B/run_nextflow/work
  projectDir     : /home/dejlu879/.nextflow/assets/epi2me-labs/wf-basecalling
  userName       : dejlu879
  profile        : standard
  configFiles    : /home/dejlu879/.nextflow/assets/epi2me-labs/wf-basecalling/nextflow.config

Input Options
  input          : /external/data/2024415-BEBIC_B/F_T0_rest
  ref            : /home/uowgene/Documents/hg38_refs/hg38_chromsonly.ebv.lambda.bcg.fa

You should be able to resolve this by making a copy of your reference somewhere in the /home/dejlu879 path.

lucy924 commented 6 months ago

Oh that's good to know! Thank you, it works now.