Skip to content
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

purple fails with R error in nf-core/oncoanalyser #641

Open
bounlu opened this issue Nov 18, 2024 · 1 comment · May be fixed by #642
Open

purple fails with R error in nf-core/oncoanalyser #641

bounlu opened this issue Nov 18, 2024 · 1 comment · May be fixed by #642

Comments

@bounlu
Copy link
Contributor

bounlu commented Nov 18, 2024

I was testing pipeline_v6.0 branch of nf-core/oncoanalyser in targeted mode. purple failed as below only for some of the samples. Same issue as before. Wondering what could be wrong with these samples?

ERROR ~ Error executing process > 'NFCORE_ONCOANALYSER:TARGETED:PURPLE_CALLING:PURPLE (220034479)'

Caused by:
  Process `NFCORE_ONCOANALYSER:TARGETED:PURPLE_CALLING:PURPLE (220034479)` terminated with an error exit status (1)


Command executed:

  purple \
      -Xmx12240656794 \
       \
      -tumor 220034479 \
       \
      -amber amber \
      -cobalt cobalt \
      -somatic_sv_vcf 220034479.esvee.somatic.vcf.gz \
       \
      -somatic_vcf 220034479.sage.somatic.pave.vcf.gz \
       \
      -ref_genome GCA_000001405.15_GRCh38_no_alt_analysis_set.fna \
      -ref_genome_version 38 \
      -driver_gene_panel DriverGenePanel.tso500.38.tsv \
      -ensembl_data_dir ensembl_data \
      -somatic_hotspots KnownHotspots.somatic.38.vcf.gz \
      -germline_hotspots KnownHotspots.germline.38.vcf.gz \
      -target_regions_bed target_regions_definition.tso500.38.bed.gz \
      -target_regions_ratios target_regions_ratios.tso500.38.tsv \
      -target_regions_msi_indels target_regions_msi_indels.tso500.38.tsv \
      -germline_del_freq_file cohort_germline_del_freq.38.csv \
      -gc_profile GC_profile.1000bp.38.cnp \
      -circos $(which circos) \
      -threads 2 \
      -output_dir purple/
  
  cat <<-END_VERSIONS > versions.yml
  "NFCORE_ONCOANALYSER:TARGETED:PURPLE_CALLING:PURPLE":
      purple: $(purple -version | sed 's/^.* //')
  END_VERSIONS

Command exit status:
  1

Command output:
  09:09:01.788 [INFO ] Purple version 4.1
  09:09:01.796 [INFO ] output directory: purple/
  09:09:01.808 [INFO ] reference(NONE) tumor(220034479) running on target-regions only
  09:09:01.995 [INFO ] using ref genome: V38
  09:09:07.919 [INFO ] loaded 0 germline deletions frequencies from file: cohort_germline_del_freq.38.csv
  09:09:07.926 [INFO ] loaded 130 MSI indels from file(target_regions_msi_indels.tso500.38.tsv)
  09:09:07.926 [INFO ] target regions: tml(1.0) tmb(0.05) msiIndels(220.0) msiAF(2-3 base=0.15 4 base=0.08) codingBaseFactor(150000)
  09:09:08.420 [INFO ] loaded 7282 target regions bases(total=1314771 coding=1309730) from file(target_regions_definition.tso500.38.bed.gz)
  09:09:08.422 [INFO ] reading GC Profiles from GC_profile.1000bp.38.cnp
  09:09:14.001 [INFO ] reading Amber QC from amber/220034479.amber.qc
  09:09:14.028 [INFO ] reading Amber BAFs from amber/220034479.amber.baf.tsv.gz
  09:09:14.055 [INFO ] reading Amber PCFs from amber/220034479.amber.baf.pcf
  09:09:14.360 [INFO ] Amber average tumor depth(2064) ambiguous BAF(0.510)
  09:09:14.361 [INFO ] reading Cobalt tumor segments from cobalt/220034479.cobalt.ratio.pcf
  09:09:14.392 [INFO ] reading Cobalt ratios from cobalt/220034479.cobalt.ratio.tsv.gz
  09:09:23.398 [INFO ] loaded 191 somatic SVs from 220034479.esvee.somatic.vcf.gz
  09:09:25.556 [INFO ] loaded 14747 somatic variants from 220034479.sage.somatic.pave.vcf.gz
  09:09:25.557 [INFO ] sample gender is female
  09:09:25.557 [INFO ] purple output directory: purple/
  09:09:25.588 [INFO ] applying segmentation
  09:09:25.588 [INFO ] merging reference and tumor ratio break points
  09:09:29.829 [INFO ] fitting purity
  09:09:32.984 [INFO ] enriching somatic variants
  09:09:33.400 [INFO ] load(3.0 tml=121.7045) msiIndels(0 perMb=0.0000) burden(5.0 perMb=6.0852)
  09:09:34.725 [INFO ] generating QC Stats
  09:09:34.822 [INFO ] generating charts
  09:09:34.907 [INFO ] generating 220034479.circos.png via command: /usr/local/bin/circos -nosvg -conf purple/circos/220034479.circos.conf -outputdir purple/plot -outputfile 220034479.circos.png
  09:09:34.907 [INFO ] generating 220034479.input.png via command: /usr/local/bin/circos -nosvg -conf purple/circos/220034479.input.conf -outputdir purple/plot -outputfile 220034479.input.png
  09:09:56.444 [FATAL] error executing R script
  09:09:56.447 [WARN ] error generating charts
  09:09:56.448 [ERROR] charting error: java.lang.Exception: charting failed

Command error:
  Fontconfig error: No writable cache directories
  Error in `scale_y_continuous()`:
  ! Discrete values supplied to continuous scale.
  i Example values: NA, NA, NA, NA, and NA
  Backtrace:
       x
    1. \-global clonality_plot(somaticBuckets, clonalityModel)
    2.   \-cowplot::plot_grid(...)
    3.     \-cowplot::align_plots(...)
    4.       \-base::lapply(...)
    5.         \-cowplot (local) FUN(X[[i]], ...)
    6.           +-cowplot::as_gtable(x)
    7.           \-cowplot:::as_gtable.default(x)
    8.             +-cowplot::as_grob(plot)
    9.             \-cowplot:::as_grob.ggplot(plot)
   10.               \-ggplot2::ggplotGrob(plot)
   11.                 +-ggplot2::ggplot_gtable(ggplot_build(x))
   12.                 | \-ggplot2:::attach_plot_env(data$plot$plot_env)
   13.                 |   \-base::options(ggplot2_plot_env = env)
   14.                 +-ggplot2::ggplot_build(x)
   15.                 \-ggplot2:::ggplot_build.ggplot(x)
   16.                   \-layout$train_position(data, scale_x(), scale_y())
   17.                     \-ggplot2 (local) train_position(..., self = self)
   18.                       \-self$facet$train_scales(...)
   19.                         \-ggplot2 (local) train_scales(...)
   20.                           \-ggplot2:::scale_apply(layer_data, y_vars, "train", SCALE_Y, y_scales)
   21.                             \-base::lapply(...)
   22.                               \-ggplot2 (local) FUN(X[[i]], ...)
   23.                                 \-base::lapply(...)
   24.                                   \-ggplot2 (local) FUN(X[[i]], ...)
   25.                                     \-scales[[i]][[method]](data[[var]][scale_index[[i]]])
   26.                                       \-ggplot2 (local) train(..., self = self)
   27.                                         \-cli::cli_abort(...)
   28.                                           \-rlang::abort(...)
  Warning messages:
  1: Removed 201 rows containing non-finite outside the scale range
  (`stat_align()`). 
  2: Removed 1 row containing missing values or values outside the scale range
  (`geom_bar()`). 
  3: Removed 201 rows containing missing values or values outside the scale range
  (`geom_line()`). 
  4: Removed 331 rows containing missing values or values outside the scale range
  (`geom_line()`). 
  Execution halted
  sh: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
  java.lang.Exception: charting failed
  	at com.hartwig.hmftools.purple.plot.Charts.write(Charts.java:61)
  	at com.hartwig.hmftools.purple.PurpleApplication.performFit(PurpleApplication.java:322)
  	at com.hartwig.hmftools.purple.PurpleApplication.run(PurpleApplication.java:128)
  	at com.hartwig.hmftools.purple.PurpleApplication.main(PurpleApplication.java:465)

Work dir:
  /data/nextflow/oncoanalyser/work/81/c2c7x8bc5afcd3786df0a23d0c42c3

Container:
  quay.io/biocontainers/hmftools-purple:4.1_beta--hdfd78af_2

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

 -- 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
@bounlu
Copy link
Contributor Author

bounlu commented Nov 19, 2024

It turns out that the error is coming from these lines where $sample.purple.somatic.clonality.tsv file is not filtered properly as it contains bucketWeight column with NaN values but isValid column is still TRUE. This causes error later in the clonality_plot with NA values.

bounlu added a commit to bounlu/hmftools that referenced this issue Nov 19, 2024
@bounlu bounlu linked a pull request Nov 19, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant