epi2me-labs / wf-human-variation

Other
86 stars 41 forks source link

Error at aggregating and sorting pileup variants, no 'pileup.vcf.gz' as output #149

Open Krysasp opened 3 months ago

Krysasp commented 3 months ago

Operating System

Ubuntu 22.04

Other Linux

No response

Workflow Version

epi2me-labs/wf-human-variation v1.11.0-86117a3

Workflow Execution

Command line

EPI2ME Version

No response

CLI command run

nextflow run '/home/testvar/wf-human-variation/main.nf' --bam ~/ONT_SRA/NA12878_demo.bam --basecaller_cfg 'dna_r9.4.1_e8_hac@v3.3' --clair3_model_path '/home/testvar/Clair3/models/ont' --ref ~/DB_DIR/GCA_000001405.15_GRCh38_no_alt_analysis_set.fna --sample_name 'NA12878_demo' --mod --str --cnv --phased --sex male -profile standard --threads 56 -resume

Workflow Execution - CLI Execution Profile

None

What happened?

  1. cloned the workflow from epi2me-labs repository to local machine
  2. bam file as input to the wf-human-variation for sv, snp calling
  3. switched 'clair3_model_path' to HKU-provided models for ont
  4. subprocess 'aggregate_pileup_variants' failed to proceed, output empty
  5. resume the process, error repeats

Relevant log output

WARN: Overriding Clair3 model with /home/testvar/Clair3/models/ont.
ERROR ~ Error executing process > 'snp:aggregate_pileup_variants (1)'

Caused by:
  Process `snp:aggregate_pileup_variants (1)` terminated with an error exit status (137)

Command executed:

  pypy $(which clair3.py) SortVcf             --input_dir input_vcfs/             --vcf_fn_prefix pileup             --output_fn pileup.vcf             --sampleName NA12878_demo             --ref_fn GCA_000001405.15_GRCh38_no_alt_analysis_set.fna             --contigs_fn CONTIGS             --cmd_fn CMD

  # Replaced bgzip with the faster bcftools index -n
  if [ "$( bcftools index -n pileup.vcf.gz )" -eq 0 ];         then echo "[INFO] Exit in pileup variant calling"; exit 1; fi

  bgzip -@ 2 -fdc pileup.vcf.gz |             pypy $(which clair3.py) SelectQual --phase --output_fn .

Command exit status:
  137

Command output:
  (empty)

Command error:
  .command.sh: line 2:    34 Killed                  pypy $(which clair3.py) SortVcf --input_dir input_vcfs/ --vcf_fn_prefix pileup --output_fn pileup.vcf --sampleName NA12878_demo --ref_fn GCA_000001405.15_GRCh38_no_alt_analysis_set.fna --contigs_fn CONTIGS --cmd_fn CMD

Work dir:
  /home/testvar/work/3a/39523373bf643e4999e237ab021e75

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

Application activity log entry

This is epi2me-labs/wf-human-variation v1.11.0.
--------------------------------------------------------------------------------
executor >  local (1)
[90/00027f] process > bam_ingress:samtools_index (1)      [100%] 1 of 1, cached: 1 ✔
executor >  local (1)
[90/00027f] process > bam_ingress:samtools_index (1)      [100%] 1 of 1, cached: 1 ✔
executor >  local (1)
[90/00027f] process > bam_ingress:samtools_index (1)      [100%] 1 of 1, cached: 1 ✔
[59/fa1e9f] process > bam_ingress:check_for_alignment (1) [100%] 1 of 1, cached: 1 ✔
[-        ] process > bam_ingress:cram_to_bam             -
[-        ] process > bam_ingress:minimap2_alignment      -
[72/e1b2ac] process > getGenome (1)                       [100%] 1 of 1, cached: 1 ✔
[5d/c8a39b] process > cram_cache (1)                      [100%] 1 of 1, cached: 1 ✔
[9d/dd240b] process > getAllChromosomesBed (1)            [100%] 1 of 1, cached: 1 ✔
[7e/38caea] process > mosdepth_input (1)                  [100%] 1 of 1, cached: 1 ✔
[52/01157f] process > getVersions                         [100%] 1 of 1, cached: 1 ✔
[eb/5cec2b] process > getParams                           [100%] 1 of 1, cached: 1 ✔
[34/902bc7] process > get_coverage (1)                    [100%] 1 of 1, cached: 1 ✔
[cd/bd9a6e] process > readStats (1)                       [100%] 1 of 1, cached: 1 ✔
[17/55cc54] process > makeAlignmentReport                 [100%] 1 of 1, cached: 1 ✔
[-        ] process > failedQCReport                      -
[8f/c364b7] process > snp:make_chunks (1)                 [100%] 1 of 1, cached: 1 ✔
[d9/7ba041] process > snp:pileup_variants (630)           [100%] 632 of 632, cached: 632 ✔
[3a/395233] process > snp:aggregate_pileup_variants (1)   [100%] 1 of 1, failed: 1 ✘
[-        ] process > snp:select_het_snps                 -
[-        ] process > snp:phase_contig                    -
[-        ] process > snp:get_qual_filter                 -
[-        ] process > snp:create_candidates               -
[-        ] process > snp:evaluate_candidates             -
[-        ] process > snp:aggregate_full_align_variants   -
[-        ] process > snp:merge_pileup_and_full_vars      -
[-        ] process > snp:post_clair_phase_contig         -
[-        ] process > snp:post_clair_contig_haplotag      -
[-        ] process > snp:cat_haplotagged_contigs         -
[-        ] process > snp:aggregate_all_variants          -
[-        ] process > snp:haploblocks_snp                 -
[-        ] process > annotate_snp_vcf                    -
[-        ] process > concat_snp_vcfs                     -
[-        ] process > sift_clinvar_snp_vcf                -
[-        ] process > vcfStats                            -
[dd/35edda] process > report_snp:getVersions              [100%] 1 of 1, cached: 1 ✔
[13/9ab928] process > report_snp:getParams                [100%] 1 of 1, cached: 1 ✔
[-        ] process > report_snp:makeReport               -
[-        ] process > output_snp                          -
[-        ] process > validate_modbam                     -
[-        ] process > mod:modkit_phase                    -
[f4/7857f2] process > cnv:callCNV (1)                     [100%] 1 of 1, cached: 1 ✔
[19/23e233] process > cnv:getVersions                     [100%] 1 of 1, cached: 1 ✔
[87/36b92c] process > cnv:getParams                       [100%] 1 of 1, cached: 1 ✔
[90/0b229b] process > cnv:makeReport (1)                  [100%] 1 of 1, cached: 1 ✔
[13/12693b] process > output_cnv (2)                      [100%] 2 of 2, cached: 2 ✔
[-        ] process > str:call_str                        -
[-        ] process > str:annotate_repeat_expansions      -
[cf/41d0ab] process > str:getVersions                     [100%] 1 of 1, cached: 1 ✔
[cd/fc5281] process > str:getParams                       [100%] 1 of 1, cached: 1 ✔
[-        ] process > str:bam_region_filter               -
[-        ] process > str:bam_read_filter                 -
[-        ] process > str:generate_str_content            -
[-        ] process > str:concat_str_vcfs                 -
[-        ] process > str:merge_tsv                       -
[-        ] process > str:make_report                     -
[-        ] process > output_str                          -
[ca/d0c5c0] process > configure_jbrowse (1)               [100%] 1 of 1, cached: 1 ✔
[45/40a6a4] process > publish_artifact (12)               [100%] 12 of 12, cached: 12 ✔

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

yes

Other demo data information

No response

SamStudio8 commented 3 months ago

Hi @Krysasp, it looks like the aggregate_pileup_variants process is exceeding its memory limit. We try to set sensible defaults for all processes in the workflow but in some cases, the process will exceed these limits. You can override and increase the limit by creating a file with the following contents:

process {
    withName:aggregate_pileup_variants {
        memory = 8.GB
    }
}

If the file was named increase_pileup_mem.config, you will additionally provide -c increase_pileup_mem.config to your Nextflow run command to apply the configuration on top of the defaults. You may need to increase the memory if the problem continues.