epi2me-labs / wf-human-variation

Other
87 stars 41 forks source link

ERROR ~ Error executing process > 'annotate_snp_vcf (1)' #125

Closed hyunjokoo closed 6 months ago

hyunjokoo commented 6 months ago

Ask away!

Hello,

I downloaded human Nanopore data from NCBI. This MinION data is 79.72 Gb. https://www.ncbi.nlm.nih.gov/sra?linkname=bioproject_sra_all&from_uid=553438

I searched this website and found that this human genome is recommended. So I used this sequence as a reference. ftp://ftp.ncbi.nlm.nih.gov/genomes/all/GCA/000/001/405/GCA_000001405.15_GRCh38/seqs_for_alignment_pipelines.ucsc_ids/GCA_000001405.15_GRCh38_no_alt_analysis_set.fna.gz

Using the query sequence and reference sequence, I did minimap2.

I also generated bed file for reference as shown below.

chr1    0   248956422
chr2    0   242193529
chr3    0   198295559
chr4    0   190214555
chr5    0   181538259
chr6    0   170805979
chr7    0   159345973
chr8    0   145138636
chr9    0   138394717
chr10   0   133797422
chr11   0   135086622
chr12   0   133275309
chr13   0   114364328
chr14   0   107043718
chr15   0   101991189
chr16   0   90338345
chr17   0   83257441
chr18   0   80373285
chr19   0   58617616
chr20   0   64444167
chr21   0   46709983
chr22   0   50818468
chrX    0   156040895
chrY    0   57227415
chrM    0   16569
chr1_KI270706v1_random  0   175055
chr1_KI270707v1_random  0   32032
chr1_KI270708v1_random  0   127682
(omitted in the middle)
chrUn_GL000216v2    0   176608
chrUn_GL000218v1    0   161147
chrEBV  0   171823

I started wf-human-variation workflow like this. ~/utils/nextflow/nextflow run epi2me-labs/wf-human-variation -w epi2me-human-variation3_NGS9/workspace -profile standard -with-docker --bam DRR180427_minimap2_to_GRCh38_sorted.bam --ref /data_ngs3/hjk/DB/human_genome_GRCh38_for_wf-human-variation/GCA_000001405.15_GRCh38_no_alt_analysis_set.fna --sample_name DRR180427_human_MinION --snp --sv --out_dir epi2me-human-variation3_NGS9 --threads 127 --bed /data_ngs3/hjk/DB/human_genome_GRCh38_for_wf-human-variation/GCA_000001405.15_GRCh38_no_alt_analysis_set.bed

I got error like this.

||||||||||   _____ ____ ___ ____  __  __ _____      _       _
||||||||||  | ____|  _ \_ _|___ \|  \/  | ____|    | | __ _| |__  ___
|||||       |  _| | |_) | |  __) | |\/| |  _| _____| |/ _` | '_ \/ __|
|||||       | |___|  __/| | / __/| |  | | |__|_____| | (_| | |_) \__ \
||||||||||  |_____|_|  |___|_____|_|  |_|_____|    |_|\__,_|_.__/|___/
||||||||||  wf-human-variation v1.9.1-gdfde912
--------------------------------------------------------------------------------
Core Nextflow options
  revision       : master
  runName        : berserk_monod
  containerEngine: docker
  container      : [withLabel:wf_human_snp:ontresearch/wf-human-variation-snp:sha0d7e7e8e8207d9d23fdf50a34ceb577da364373e, withLabel:wf_human_sv:ontresearch/wf-human-variation-sv:shabc3ac908a14705f248cdf49f218956ec33e93ef9, withLabel:wf_human_mod:ontresearch/modkit:shaeedb131a939d3eea2f9bd4dbecec805c0fa20bdb, withLabel:wf_basecalling:nanoporetech/dorado:sha1433bfc3146fd0dc94ad9648452364f2327cf1b0, withLabel:wf_cnv:ontresearch/wf-cnv:sha428cb19e51370020ccf29ec2af4eead44c6a17c2, withLabel:wf_human_str:ontresearch/wf-human-variation-str:sha28799bc3058fa256c01c1f07c87f04e4ade1fcc1, withLabel:snpeff_annotation:ontresearch/snpeff:sha4f289afaf754c7a3e0b9ffb6c0b5be0f89a5cf04, withLabel:wf_common:ontresearch/wf-common:sha91452ece4f647f62b32dac3a614635a6f0d7f8b5, default:ontresearch/wf-human-variation:sha0800eade05e4cbb75d45421633c78c4f6320b2f6]
  launchDir      : /data_ngs4/hjk/data/2023/nanopore_epi2mewf-human-variation_test_human_minion
  workDir        : /data_ngs4/hjk/data/2023/nanopore_epi2mewf-human-variation_test_human_minion/epi2me-human-variation3_NGS9/workspace
  projectDir     : /home/hjk/.nextflow/assets/epi2me-labs/wf-human-variation
  userName       : hjk
  profile        : standard
  configFiles    : /home/hjk/.nextflow/assets/epi2me-labs/wf-human-variation/nextflow.config

Workflow Options
  sv             : true
  snp            : true

Main options
  sample_name    : DRR180427_human_MinION
  bam            : DRR180427_minimap2_to_GRCh38_sorted.bam
  ref            : /data_ngs3/hjk/DB/human_genome_GRCh38_for_wf-human-variation/GCA_000001405.15_GRCh38_no_alt_analysis_set.fna
  bed            : /data_ngs3/hjk/DB/human_genome_GRCh38_for_wf-human-variation/GCA_000001405.15_GRCh38_no_alt_analysis_set.bed
  out_dir        : epi2me-human-variation3_NGS9

Multiprocessing Options
  threads        : 127

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

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

--------------------------------------------------------------------------------
This is epi2me-labs/wf-human-variation v1.9.1-gdfde912.
--------------------------------------------------------------------------------
executor >  local (8664)
[8c/6e9f13] process > bam_ingress:check_for_alignment (1)   [100%] 1 of 1, cached: 1 ✔
[-        ] process > bam_ingress:cram_to_bam               -
[-        ] process > bam_ingress:minimap2_alignment        -
[c4/58401c] process > getGenome (1)                         [100%] 1 of 1, cached: 1 ✔
[22/d408fd] process > cram_cache (1)                        [100%] 1 of 1, cached: 1 ✔
[ca/822321] process > sanitise_bed (1)                      [100%] 1 of 1, cached: 1 ✔
[6e/f0b0e0] process > mosdepth_input (1)                    [100%] 1 of 1, cached: 1 ✔
[00/db107f] process > readStats (1)                         [100%] 1 of 1, cached: 1 ✔
[44/1d4b9c] process > getVersions                           [100%] 1 of 1, cached: 1 ✔
[8b/d4ab0d] process > getParams                             [100%] 1 of 1, cached: 1 ✔
[2d/787422] process > get_region_coverage (1)               [100%] 1 of 1, cached: 1 ✔
[61/ed5a51] process > makeAlignmentReport                   [100%] 1 of 1 ✔
[-        ] process > failedQCReport                        -
[e5/0a4781] process > lookup_clair3_model (1)               [100%] 1 of 1, cached: 1 ✔
[b7/d17fd8] process > snp:make_chunks (1)                   [100%] 1 of 1, cached: 1 ✔
[d2/05a741] process > snp:pileup_variants (563)             [100%] 723 of 723, cached: 598 ✔
[92/9038d3] process > snp:aggregate_pileup_variants (1)     [100%] 1 of 1 ✔
[2b/c4d75d] process > snp:select_het_snps (1)               [100%] 116 of 116 ✔
[10/35032a] process > snp:phase_contig (116)                [100%] 116 of 116 ✔
[55/4db9e6] process > snp:get_qual_filter (1)               [100%] 1 of 1 ✔
[49/88246b] process > snp:create_candidates (2)             [100%] 116 of 116 ✔
[61/d82190] process > snp:evaluate_candidates (8049)        [100%] 8056 of 8056 ✔
[6f/abac39] process > snp:aggregate_full_align_variants (1) [100%] 1 of 1 ✔
[24/01c0df] process > snp:merge_pileup_and_full_vars (1)    [100%] 116 of 116 ✔
[fe/4f5053] process > snp:aggregate_all_variants (1)        [100%] 1 of 1 ✔
[54/6b7715] process > sv:variantCall:filterBam (1)          [100%] 1 of 1 ✔
[98/c945bc] process > sv:variantCall:sniffles2 (1)          [100%] 1 of 1 ✔
[6d/e6feae] process > sv:variantCall:filterCalls (1)        [100%] 1 of 1 ✔
[b3/314ef7] process > sv:variantCall:sortVCF (1)            [100%] 1 of 1 ✔
[c2/e55f60] process > sv:annotate_sv_vcf (1)                [100%] 1 of 1 ✔
[d9/56b3bc] process > sv:runReport:getVersions              [100%] 1 of 1, cached: 1 ✔
[9b/b293d6] process > sv:runReport:getParams                [100%] 1 of 1, cached: 1 ✔
[5c/7f260c] process > sv:runReport:report (1)               [100%] 1 of 1 ✔
[b0/8c5efb] process > output_sv (4)                         [100%] 4 of 4 ✔
[fa/aeb6dc] process > refine_with_sv (1)                    [100%] 1 of 1 ✔
[0f/af3eec] process > bed_filter (1)                        [100%] 1 of 1 ✔
[7c/d829af] process > annotate_snp_vcf (1)                  [  0%] 0 of 1
[-        ] process > vcfStats                              -
[39/200cb9] process > report_snp:getVersions                [100%] 1 of 1, cached: 1 ✔
[fa/2be406] process > report_snp:getParams                  [100%] 1 of 1, cached: 1 ✔
[-        ] process > report_snp:makeReport                 -
[-        ] process > output_snp                            -
[ba/2a65a0] process > configure_jbrowse (1)                 [100%] 1 of 1, cached: 1 ✔
[69/e170c7] process > publish_artifact (12)                 [100%] 12 of 12, cached: 11 ✔
ERROR ~ Error executing process > 'annotate_snp_vcf (1)'

Caused by:
  Process `annotate_snp_vcf (1)` terminated with an error exit status (255)

Command executed:

  # deal with samples which aren't hg19 or hg38
  if [[ "hg38" != "hg38" ]] && [[ "hg38" != "hg19" ]]; then
      # return the original VCF and index as the outputs
      cp input.vcf.gz DRR180427_human_MinION.wf_snp.vcf.gz
      cp input.vcf.gz.tbi DRR180427_human_MinION.wf_snp.vcf.gz.tbi
      # create an empty snpEff_genes file
      touch DRR180427_human_MinION.wf_snp.snpEff_genes.txt
      # create an empty ClinVar VCF
      touch DRR180427_human_MinION.wf_snp_clinvar.vcf
  else
      # do some annotation
      if [[ "hg38" == "hg38" ]]; then
          snpeff_db="GRCh38.p13"
          clinvar_vcf="${CLINVAR_PATH}/clinvar_GRCh38.vcf.gz"

      elif [[ "hg38" == "hg19" ]]; then
          snpeff_db="GRCh37.p13"
          clinvar_vcf="${CLINVAR_PATH}/clinvar_GRCh37.vcf.gz"
      fi
executor >  local (8664)
[8c/6e9f13] process > bam_ingress:check_for_alignment (1)   [100%] 1 of 1, cached: 1 ✔
[-        ] process > bam_ingress:cram_to_bam               -
[-        ] process > bam_ingress:minimap2_alignment        -
[c4/58401c] process > getGenome (1)                         [100%] 1 of 1, cached: 1 ✔
[22/d408fd] process > cram_cache (1)                        [100%] 1 of 1, cached: 1 ✔
[ca/822321] process > sanitise_bed (1)                      [100%] 1 of 1, cached: 1 ✔
[6e/f0b0e0] process > mosdepth_input (1)                    [100%] 1 of 1, cached: 1 ✔
[00/db107f] process > readStats (1)                         [100%] 1 of 1, cached: 1 ✔
[44/1d4b9c] process > getVersions                           [100%] 1 of 1, cached: 1 ✔
[8b/d4ab0d] process > getParams                             [100%] 1 of 1, cached: 1 ✔
[2d/787422] process > get_region_coverage (1)               [100%] 1 of 1, cached: 1 ✔
[61/ed5a51] process > makeAlignmentReport                   [100%] 1 of 1 ✔
[-        ] process > failedQCReport                        -
[e5/0a4781] process > lookup_clair3_model (1)               [100%] 1 of 1, cached: 1 ✔
[b7/d17fd8] process > snp:make_chunks (1)                   [100%] 1 of 1, cached: 1 ✔
[d2/05a741] process > snp:pileup_variants (563)             [100%] 723 of 723, cached: 598 ✔
[92/9038d3] process > snp:aggregate_pileup_variants (1)     [100%] 1 of 1 ✔
[2b/c4d75d] process > snp:select_het_snps (1)               [100%] 116 of 116 ✔
[10/35032a] process > snp:phase_contig (116)                [100%] 116 of 116 ✔
[55/4db9e6] process > snp:get_qual_filter (1)               [100%] 1 of 1 ✔
[49/88246b] process > snp:create_candidates (2)             [100%] 116 of 116 ✔
[61/d82190] process > snp:evaluate_candidates (8049)        [100%] 8056 of 8056 ✔
[6f/abac39] process > snp:aggregate_full_align_variants (1) [100%] 1 of 1 ✔
[24/01c0df] process > snp:merge_pileup_and_full_vars (1)    [100%] 116 of 116 ✔
[fe/4f5053] process > snp:aggregate_all_variants (1)        [100%] 1 of 1 ✔
[54/6b7715] process > sv:variantCall:filterBam (1)          [100%] 1 of 1 ✔
[98/c945bc] process > sv:variantCall:sniffles2 (1)          [100%] 1 of 1 ✔
[6d/e6feae] process > sv:variantCall:filterCalls (1)        [100%] 1 of 1 ✔
[b3/314ef7] process > sv:variantCall:sortVCF (1)            [100%] 1 of 1 ✔
[c2/e55f60] process > sv:annotate_sv_vcf (1)                [100%] 1 of 1 ✔
[d9/56b3bc] process > sv:runReport:getVersions              [100%] 1 of 1, cached: 1 ✔
[9b/b293d6] process > sv:runReport:getParams                [100%] 1 of 1, cached: 1 ✔
[5c/7f260c] process > sv:runReport:report (1)               [100%] 1 of 1 ✔
[b0/8c5efb] process > output_sv (4)                         [100%] 4 of 4 ✔
[fa/aeb6dc] process > refine_with_sv (1)                    [100%] 1 of 1 ✔
[0f/af3eec] process > bed_filter (1)                        [100%] 1 of 1 ✔
[7c/d829af] process > annotate_snp_vcf (1)                  [100%] 1 of 1, failed: 1 ✘
[-        ] process > vcfStats                              -
[39/200cb9] process > report_snp:getVersions                [100%] 1 of 1, cached: 1 ✔
[fa/2be406] process > report_snp:getParams                  [100%] 1 of 1, cached: 1 ✔
[-        ] process > report_snp:makeReport                 -
[-        ] process > output_snp                            -
[ba/2a65a0] process > configure_jbrowse (1)                 [100%] 1 of 1, cached: 1 ✔
[69/e170c7] process > publish_artifact (12)                 [100%] 12 of 12, cached: 11 ✔
ERROR ~ Error executing process > 'annotate_snp_vcf (1)'

Caused by:
  Process `annotate_snp_vcf (1)` terminated with an error exit status (255)

Command executed:

  # deal with samples which aren't hg19 or hg38
  if [[ "hg38" != "hg38" ]] && [[ "hg38" != "hg19" ]]; then
      # return the original VCF and index as the outputs
      cp input.vcf.gz DRR180427_human_MinION.wf_snp.vcf.gz
      cp input.vcf.gz.tbi DRR180427_human_MinION.wf_snp.vcf.gz.tbi
      # create an empty snpEff_genes file
      touch DRR180427_human_MinION.wf_snp.snpEff_genes.txt
      # create an empty ClinVar VCF
      touch DRR180427_human_MinION.wf_snp_clinvar.vcf
  else
      # do some annotation
      if [[ "hg38" == "hg38" ]]; then
          snpeff_db="GRCh38.p13"
          clinvar_vcf="${CLINVAR_PATH}/clinvar_GRCh38.vcf.gz"

      elif [[ "hg38" == "hg19" ]]; then
          snpeff_db="GRCh37.p13"
          clinvar_vcf="${CLINVAR_PATH}/clinvar_GRCh37.vcf.gz"
      fi
executor >  local (8664)
[8c/6e9f13] process > bam_ingress:check_for_alignment (1)   [100%] 1 of 1, cached: 1 ✔
[-        ] process > bam_ingress:cram_to_bam               -
[-        ] process > bam_ingress:minimap2_alignment        -
[c4/58401c] process > getGenome (1)                         [100%] 1 of 1, cached: 1 ✔
[22/d408fd] process > cram_cache (1)                        [100%] 1 of 1, cached: 1 ✔
[ca/822321] process > sanitise_bed (1)                      [100%] 1 of 1, cached: 1 ✔
[6e/f0b0e0] process > mosdepth_input (1)                    [100%] 1 of 1, cached: 1 ✔
[00/db107f] process > readStats (1)                         [100%] 1 of 1, cached: 1 ✔
[44/1d4b9c] process > getVersions                           [100%] 1 of 1, cached: 1 ✔
[8b/d4ab0d] process > getParams                             [100%] 1 of 1, cached: 1 ✔
[2d/787422] process > get_region_coverage (1)               [100%] 1 of 1, cached: 1 ✔
[61/ed5a51] process > makeAlignmentReport                   [100%] 1 of 1 ✔
[-        ] process > failedQCReport                        -
[e5/0a4781] process > lookup_clair3_model (1)               [100%] 1 of 1, cached: 1 ✔
[b7/d17fd8] process > snp:make_chunks (1)                   [100%] 1 of 1, cached: 1 ✔
[d2/05a741] process > snp:pileup_variants (563)             [100%] 723 of 723, cached: 598 ✔
[92/9038d3] process > snp:aggregate_pileup_variants (1)     [100%] 1 of 1 ✔
[2b/c4d75d] process > snp:select_het_snps (1)               [100%] 116 of 116 ✔
[10/35032a] process > snp:phase_contig (116)                [100%] 116 of 116 ✔
[55/4db9e6] process > snp:get_qual_filter (1)               [100%] 1 of 1 ✔
[49/88246b] process > snp:create_candidates (2)             [100%] 116 of 116 ✔
[61/d82190] process > snp:evaluate_candidates (8049)        [100%] 8056 of 8056 ✔
[6f/abac39] process > snp:aggregate_full_align_variants (1) [100%] 1 of 1 ✔
[24/01c0df] process > snp:merge_pileup_and_full_vars (1)    [100%] 116 of 116 ✔
[fe/4f5053] process > snp:aggregate_all_variants (1)        [100%] 1 of 1 ✔
[54/6b7715] process > sv:variantCall:filterBam (1)          [100%] 1 of 1 ✔
[98/c945bc] process > sv:variantCall:sniffles2 (1)          [100%] 1 of 1 ✔
[6d/e6feae] process > sv:variantCall:filterCalls (1)        [100%] 1 of 1 ✔
[b3/314ef7] process > sv:variantCall:sortVCF (1)            [100%] 1 of 1 ✔
[c2/e55f60] process > sv:annotate_sv_vcf (1)                [100%] 1 of 1 ✔
[d9/56b3bc] process > sv:runReport:getVersions              [100%] 1 of 1, cached: 1 ✔
[9b/b293d6] process > sv:runReport:getParams                [100%] 1 of 1, cached: 1 ✔
[5c/7f260c] process > sv:runReport:report (1)               [100%] 1 of 1 ✔
[b0/8c5efb] process > output_sv (4)                         [100%] 4 of 4 ✔
[fa/aeb6dc] process > refine_with_sv (1)                    [100%] 1 of 1 ✔
[0f/af3eec] process > bed_filter (1)                        [100%] 1 of 1 ✔
[7c/d829af] process > annotate_snp_vcf (1)                  [100%] 1 of 1, failed: 1 ✘
[-        ] process > vcfStats                              -
[39/200cb9] process > report_snp:getVersions                [100%] 1 of 1, cached: 1 ✔
[fa/2be406] process > report_snp:getParams                  [100%] 1 of 1, cached: 1 ✔
[-        ] process > report_snp:makeReport                 -
[-        ] process > output_snp                            -
[ba/2a65a0] process > configure_jbrowse (1)                 [100%] 1 of 1, cached: 1 ✔
[69/e170c7] process > publish_artifact (12)                 [100%] 12 of 12, cached: 11 ✔
ERROR ~ Error executing process > 'annotate_snp_vcf (1)'

Caused by:
  Process `annotate_snp_vcf (1)` terminated with an error exit status (255)

Command executed:

  # deal with samples which aren't hg19 or hg38
  if [[ "hg38" != "hg38" ]] && [[ "hg38" != "hg19" ]]; then
      # return the original VCF and index as the outputs
      cp input.vcf.gz DRR180427_human_MinION.wf_snp.vcf.gz
      cp input.vcf.gz.tbi DRR180427_human_MinION.wf_snp.vcf.gz.tbi
      # create an empty snpEff_genes file
      touch DRR180427_human_MinION.wf_snp.snpEff_genes.txt
      # create an empty ClinVar VCF
      touch DRR180427_human_MinION.wf_snp_clinvar.vcf
  else
      # do some annotation
      if [[ "hg38" == "hg38" ]]; then
          snpeff_db="GRCh38.p13"
          clinvar_vcf="${CLINVAR_PATH}/clinvar_GRCh38.vcf.gz"

      elif [[ "hg38" == "hg19" ]]; then
          snpeff_db="GRCh37.p13"
          clinvar_vcf="${CLINVAR_PATH}/clinvar_GRCh37.vcf.gz"
      fi

      # Specify 4G of memory otherwise SnpEff will crash with the default 1G
      snpEff -Xmx4g ann $snpeff_db input.vcf.gz > DRR180427_human_MinION.snpeff_annotated.vcf
      # Add ClinVar annotations
      SnpSift annotate $clinvar_vcf DRR180427_human_MinION.snpeff_annotated.vcf > DRR180427_human_MinION.wf_snp.vcf
      # Get the ClinVar-annotated variants into a separate VCF
      cat DRR180427_human_MinION.wf_snp.vcf | SnpSift filter "( exists CLNSIG )" > DRR180427_human_MinION.wf_snp_clinvar.vcf

      bgzip -c DRR180427_human_MinION.wf_snp.vcf > DRR180427_human_MinION.wf_snp.vcf.gz
      tabix DRR180427_human_MinION.wf_snp.vcf.gz

      # tidy up
      rm DRR180427_human_MinION.snpeff_annotated.vcf
      rm DRR180427_human_MinION.wf_snp.vcf
      mv snpEff_genes.txt DRR180427_human_MinION.wf_snp.snpEff_genes.txt
  fi

Command exit status:
  255

Command output:
  (empty)

Command error:
  Picked up JAVA_TOOL_OPTIONS: -Xlog:disable -Xlog:all=warning:stderr
  ERROR: Error while processing VCF entry (line 10602523) :
    chr12   27658842    .   GA  G   3.45    PASS    F   GT:GQ:DP:AD:AF  1/1:3:32:8,8:0.2500
  java.lang.OutOfMemoryError: Java heap space
  ERROR: Error while processing VCF entry (line 10602525) :
    chr12   27659447    .   CAAAA   C   19.25   PASS    P   GT:GQ:DP:AD:AF  1/1:19:28:9,16:0.5714
  java.lang.OutOfMemoryError: Java heap space
  ERROR: Error while processing VCF entry (line 10602529) :
    chr12   27659943    .   TAAA    T   19.61   PASS    P   GT:GQ:DP:AD:AF  1/1:19:30:7,12:0.4000
  java.lang.OutOfMemoryError: Java heap space
  ERROR: Error while processing VCF entry (line 10602533) :
    chr12   27660224    .   GT  G   14.95   PASS    P   GT:GQ:DP:AD:AF  1/1:14:31:7,14:0.4516
  java.lang.OutOfMemoryError: Java heap space
  ERROR: Error while processing VCF entry (line 10602551) :
    chr12   27661709    .   TA  T   7.28    PASS    F   GT:GQ:DP:AD:AF  1/1:7:24:6,8:0.3333
  java.lang.OutOfMemoryError: Java heap space
  ERROR: Error while processing VCF entry (line 10602582) :
    chr12   27666058    .   GA  G   11.81   PASS    P   GT:GQ:DP:AD:AF  1/1:11:25:4,11:0.4400
  java.lang.OutOfMemoryError: Java heap space
  ERROR: Error while processing VCF entry (line 10602598) :
    chr12   27667015    .   T   TTG 8.51    PASS    F   GT:GQ:DP:AD:AF  1/1:8:22:9,10:0.4545
  java.lang.OutOfMemoryError: Java heap space
  java.lang.OutOfMemoryError: Java heap space

Work dir:
  /data_ngs4/hjk/data/2023/nanopore_epi2mewf-human-variation_test_human_minion/epi2me-human-variation3_NGS9/workspace/7c/d829af13ff44c0a5944b3fd003cfbe

Tip: view the complete command output by changing to the process work dir and entering the command `cat .command.out`

 -- Check '.nextflow.log' file for details

Could you please tell me what is the problem? How can I avoid this kind of error? This server has 64 cores (128 with hyperthreading) and 4 Tb memory.

I attach trace.txt file here. trace.txt

Thank you.

HJK

SamStudio8 commented 6 months ago

Hi @hyunjokoo, we have an upcoming version that will allow finer control over the memory allocated to the annotation process. I will update this issue once it has been released. Thanks for your patience!

hyunjokoo commented 6 months ago

Is there any way we can setup memory allocation using java -Xms256m -Xmx4g etc.

I tested some, and found that when I use 48 Gb data, there was no error and the process was finished in 50 minutes, but when I used about 86 Gb data, the process was stopped with error. For now we plan to use the data from one Nanopore cell (about 90 Gb), but this workflow seems not allow such amount of data.

================================== I also tried in another server. This server uses Centos (128 cores -> 256 threads with hyperthreading, 2 Tb memory). When I tried the same data (48 Gb) which was ok with Ubuntu server (64 cores -> 128 threads with hyperthreading, 4 Tb memory), it failed in Centos server. The error memssage is like this. Do you think I should setup something in Centos server?

--------------------------------------------------------------------------------
This is epi2me-labs/wf-human-variation v1.9.1-gdfde912.
--------------------------------------------------------------------------------
executor >  local (157)
[a9/8084b0] process > bam_ingress:check_for_alignment (1) [100%] 1 of 1 ✔
executor >  local (210)
[a9/8084b0] process > bam_ingress:check_for_alignment (1) [100%] 1 of 1 ✔
executor >  local (210)
[a9/8084b0] process > bam_ingress:check_for_alignment (1) [100%] 1 of 1 ✔
executor >  local (210)
[a9/8084b0] process > bam_ingress:check_for_alignment (1) [100%] 1 of 1 ✔
[-        ] process > bam_ingress:cram_to_bam             -
[-        ] process > bam_ingress:minimap2_alignment      -
[d0/21be68] process > getGenome (1)                       [100%] 1 of 1 ✔
[4e/42e71d] process > cram_cache (1)                      [100%] 1 of 1 ✔
[18/675fa9] process > sanitise_bed (1)                    [100%] 1 of 1 ✔
[27/3f66bb] process > mosdepth_input (1)                  [100%] 1 of 1 ✔
[97/649c40] process > readStats (1)                       [  0%] 0 of 1
[47/5c642f] process > getVersions                         [100%] 1 of 1 ✔
[06/03f563] process > getParams                           [100%] 1 of 1 ✔
[4d/387f80] process > get_region_coverage (1)             [100%] 1 of 1 ✔
[-        ] process > makeAlignmentReport                 -
[-        ] process > failedQCReport                      -
[c0/ef96e1] process > lookup_clair3_model (1)             [100%] 1 of 1 ✔
[5f/9f8f52] process > snp:make_chunks (1)                 [100%] 1 of 1 ✔
[86/721aad] process > snp:pileup_variants (254)           [  0%] 1 of 696
[-        ] process > snp:aggregate_pileup_variants       -
[-        ] 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:aggregate_all_variants          -
[a2/9f6248] process > sv:variantCall:filterBam (1)        [  0%] 0 of 1
[-        ] process > sv:variantCall:sniffles2            -
[-        ] process > sv:variantCall:filterCalls          -
[-        ] process > sv:variantCall:sortVCF              -
[-        ] process > sv:annotate_sv_vcf                  -
[0f/8f47e3] process > sv:runReport:getVersions            [100%] 1 of 1 ✔
[1b/7b4d39] process > sv:runReport:getParams              [100%] 1 of 1 ✔
[-        ] process > sv:runReport:report                 -
[-        ] process > output_sv                           -
[-        ] process > refine_with_sv                      -
[-        ] process > bed_filter                          -
[-        ] process > annotate_snp_vcf                    -
[-        ] process > vcfStats                            -
[97/5a341e] process > report_snp:getVersions              [100%] 1 of 1 ✔
[e6/4b55b5] process > report_snp:getParams                [100%] 1 of 1 ✔
[-        ] process > report_snp:makeReport               -
[-        ] process > output_snp                          -
[cb/a144ad] process > configure_jbrowse (1)               [100%] 1 of 1 ✔
[a4/ea52a5] process > publish_artifact (9)                [100%] 9 of 9
ERROR ~ Execution aborted due to an unexpected error

 -- Check '.nextflow.log' file for details
ERROR ~ Execution aborted due to an unexpected error

 -- Check '.nextflow.log' file for details
[363.634s][warning][os,thread] Failed to start thread "Unknown thread" - pthread_create failed (EAGAIN) for attributes: stacksize: 1024k, guardsize: 0k, detached.
[363.635s][warning][os,thread] Failed to start the native thread for java.lang.Thread "HandshakeCompletedNotify-Thread"
[365.300s][warning][os,thread] Failed to start thread "Unknown thread" - pthread_create failed (EAGAIN) for attributes: stacksize: 1024k, guardsize: 0k, detached.
[365.301s][warning][os,thread] Failed to start the native thread for java.lang.Thread "HandshakeCompletedNotify-Thread"
ERROR ~ java.lang.OutOfMemoryError: unable to create native thread: possibly out of memory or process/resource limits reached

 -- Check script '/home/hjk/.nextflow/assets/epi2me-labs/wf-human-variation/main.nf' at line: 663 or see '.nextflow.log' file for more details
[365.316s][warning][os,thread] Failed to start thread "Unknown thread" - pthread_create failed (EAGAIN) for attributes: stacksize: 1024k, guardsize: 0k, detached.
[365.317s][warning][os,thread] Failed to start the native thread for java.lang.Thread "Thread-0"

Thank you. HJK

hyunjokoo commented 6 months ago

Before the run of wf-human-variation process, I ran export _JAVA_OPTIONS=-Xmx1000g. When the process starts, it prints the following line showing that maximum java heap memory is adjusted correctly as I entered. Picked up _JAVA_OPTIONS: -Xmx1000g But, the process failed in the java process again.

I found that the java process use only 4 Gb memory, and my previous setting is useless. When I checked using top -c, I saw that it set up the maximum heap memory as 4 Gb. java -Xmx4g -jar /home/epi2melabs/conda/share/snpeff-5.1-2/snpEff.jar ann GRCh38.p13 input.vcf.gz

I think you can simply add option for this process, or adjust the parameters. For example, if JAVA_OPTIONS were picked up, do not add -Xmx4g in this process, etc.

I hope this issue can be solved quickly.

Thank you. HJK

P.S. After downloading snpEff.jar, I executed the following in the corresponding workspace folder, and the process was finished in 3 hrs without error. But I do not know how to incorporate the result to the overall process. [hjk@ngs9:/data_ngs10/hjk/data/2023/nanopore_epi2mewf-human-variation_test_human_minion/epi2me-human-variation4_NGS9/workspace/24/9a8899bc20cd2a751a0ce037a46db8]$ java -Xmx1000g -jar /home/hjk/utils/SnpEff/snpEff/snpEff.jar ann GRCh38.p13 input.vcf.gz

SamStudio8 commented 6 months ago

Hi @hyunjokoo, thanks for raising this. We have fixed this internally as part of work for our next release which overhauls the CPU and Memory directives.

On Thu, 14 Dec 2023, 00:08 hyunjokoo, @.***> wrote:

Before the run of wf-human-variation process, I ran export _JAVA_OPTIONS=-Xmx1000g. When the process starts, it prints the following line showing that maximum java heap memory is adjusted correctly as I entered. Picked up _JAVA_OPTIONS: -Xmx1000g But, the process failed in the java process again.

I found that the java process use only 4 Gb memory, and my previous setting is useless. When I checked using top -c, I saw that it set up the maximum heap memory as 4 Gb. java -Xmx4g -jar /home/epi2melabs/conda/share/snpeff-5.1-2/snpEff.jar ann GRCh38.p13 input.vcf.gz

I think you can simply add option for this process, or adjust the parameters. For example, if JAVA_OPTIONS were picked up, do not add -Xmx4g in this process, etc.

I hope this issue can be solved quickly.

Thank you. HJK

— Reply to this email directly, view it on GitHub https://github.com/epi2me-labs/wf-human-variation/issues/125#issuecomment-1854882867, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIN6OSNDY5LWMM4EVVBXO3YJI7P5AVCNFSM6AAAAABAL4SYC2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNJUHA4DEOBWG4 . You are receiving this because you commented.Message ID: @.***>

hyunjokoo commented 6 months ago

hank you. I hope the next version comes quickly. ^^