Skip to content

PCGR error  #178

Closed
Closed

Description

@adbeggs

pcgr 0.10.14

singularity exec ~/beggsa-clinicalnanopore/software/pcgr.sif pcgr --input_vcf /rds/projects/b/beggsa-clinicalnanopore/software/pcgr/test/D0263.vcf.gz --pcgr_dir /rds/projects/b/beggsa-clinicalnanopore/software/pcgr --output_dir /rds/projects/b/beggsa-clinicalnanopore/software/pcgr/test/pcgr_results/ --genome_assembly grch38 --sample_id D0263 --tumor_only --input_cna /rds/projects/b/beggsa-clinicalnanopore/software/pcgr/test/D0263.sorted2.txt --tumor_site 17 --include_trials --no_docker

2022-02-07 09:37:29 - pcgr-start - INFO - --- Personal Cancer Genome Reporter workflow ----
2022-02-07 09:37:29 - pcgr-start - INFO - Sample name: D0263
2022-02-07 09:37:29 - pcgr-start - INFO - Tumor type: Myeloid
2022-02-07 09:37:29 - pcgr-start - INFO - Sequencing assay - type: WES
2022-02-07 09:37:29 - pcgr-start - INFO - Sequencing assay - mode: Tumor-Only
2022-02-07 09:37:29 - pcgr-start - INFO - Sequencing assay - coding target size: 34Mb
2022-02-07 09:37:29 - pcgr-start - INFO - Genome assembly: grch38
2022-02-07 09:37:29 - pcgr-start - INFO - Mutational signature estimation: OFF
2022-02-07 09:37:29 - pcgr-start - INFO - MSI classification: OFF
2022-02-07 09:37:29 - pcgr-start - INFO - Mutational burden estimation: OFF
2022-02-07 09:37:29 - pcgr-start - INFO - Include molecularly targeted clinical trials (beta): ON
Traceback (most recent call last):
File "/opt/conda/envs/pcgr/bin/pcgr", line 10, in
sys.exit(cli())
File "/opt/conda/envs/pcgr/lib/python3.7/site-packages/pcgr/main.py", line 144, in cli
run_pcgr(arg_dict, host_directories, config_options, DOCKER_IMAGE_VERSION)
File "/opt/conda/envs/pcgr/lib/python3.7/site-packages/pcgr/main.py", line 377, in run_pcgr
vep_main_command = f'{docker_cmd_run1} {utils.get_perl_exports()} && vep --input_file {input_vcf_pcgr_ready} --output_file {vep_vcf} {vep_options} --fasta {fasta_assembly} {docker_cmd_run_end}'
File "/opt/conda/envs/pcgr/lib/python3.7/site-packages/pcgr/utils.py", line 130, in get_perl_exports
perl_path = os.path.dirname(perl_cmd())
File "/opt/conda/envs/pcgr/lib/python3.7/site-packages/pcgr/utils.py", line 121, in perl_cmd
perl = which(os.path.join(get_pcgr_bin(), "perl"))
File "/opt/conda/envs/pcgr/lib/python3.7/site-packages/pcgr/utils.py", line 25, in which
for path in get_all_conda_bins():
NameError: name 'get_all_conda_bins' is not defined

Activity

  1. sigven commented on Feb 7, 2022

    @sigven
    Owner

    Thanks for the report, @adbeggs. Looking into this right now

  2. pdiakumis commented on Feb 7, 2022

    @pdiakumis
    Collaborator

    I'll patch this soon, I wanted to use Python's shutil.which instead of

    def which(program, env=None):

  3. pdiakumis commented on Feb 7, 2022

    @pdiakumis
    Collaborator

    @adbeggs I've pushed a fix for this, I'll bump PCGR to v0.10.15 so if you could please let us know if you get the same (or a different) problem.

  4. self-assigned this
    on Feb 7, 2022
  5. adbeggs commented on Feb 8, 2022

    @adbeggs
    Author

    That's fixed, but now have this:

    2022-02-08 03:56:02 - pcgr-writer - INFO - PCGR - STEP 4: Generation of output files - variant interpretation report for precision oncology
    2022-02-08 03:56:19 - pcgr-report-generation - INFO - Tumor primary site: Myeloid
    2022-02-08 03:56:19 - pcgr-report-generation - INFO - Initializing PCGR report - sample D0263
    2022-02-08 03:56:19 - pcgr-report-generation - INFO - ------
    2022-02-08 04:02:43 - pcgr-report-generation - INFO - Verifying data integrity of input callset
    2022-02-08 04:03:26 - pcgr-report-generation - INFO - Excluding 71 variants from non-nuclear chromosomes/scaffolds
    2022-02-08 04:03:30 - pcgr-report-generation - INFO - Updating MAF file with information regarding variant sequencing depths and allelic support
    2022-02-08 04:03:30 - pcgr-report-generation - INFO - Filtering tumor variants based on allelic depth/fraction (min_dp_tumor=0, min_af_tumor=0)
    2022-02-08 04:03:30 - pcgr-report-generation - INFO - Filtering tumor variants based on allelic depth/fraction (min_dp_control=0, max_af_control=1)
    2022-02-08 04:03:30 - pcgr-report-generation - INFO - Removed 0 tumor variants (0%) based on thresholds for allelic depth/fraction
    2022-02-08 04:03:30 - pcgr-report-generation - INFO - Extending annotation descriptions related to UniprotKB/SwissProt protein features
    2022-02-08 04:04:36 - pcgr-report-generation - INFO - Number of PASS variants: 5356482
    2022-02-08 04:04:45 - pcgr-report-generation - INFO - Number of SNVs: 4775799
    2022-02-08 04:04:45 - pcgr-report-generation - INFO - Number of deletions: 348670
    2022-02-08 04:04:45 - pcgr-report-generation - INFO - Number of insertions: 230944
    2022-02-08 04:04:45 - pcgr-report-generation - INFO - Number of block substitutions: 1069
    2022-02-08 04:05:29 - pcgr-report-generation - INFO - Extending annotation descriptions related to KEGG pathways
    2022-02-08 04:05:45 - pcgr-report-generation - INFO - Extending annotation descriptions related to ClinVar
    2022-02-08 04:05:58 - pcgr-report-generation - INFO - Adding annotation links - dbNSFP
    2022-02-08 04:06:06 - pcgr-report-generation - INFO - Adding annotation links - TCGA
    2022-02-08 04:06:26 - pcgr-report-generation - INFO - Adding annotation links - DBSNP
    2022-02-08 04:08:57 - pcgr-report-generation - INFO - Adding annotation links - CLINVAR
    2022-02-08 04:09:01 - pcgr-report-generation - INFO - Adding annotation links - GENE_NAME
    2022-02-08 04:10:34 - pcgr-report-generation - INFO - Adding annotation links - PROTEIN_DOMAIN
    2022-02-08 04:10:38 - pcgr-report-generation - INFO - Adding annotation links - COSMIC
    2022-02-08 04:10:46 - pcgr-report-generation - INFO - Adding annotation links - NCBI_REFSEQ
    2022-02-08 04:11:43 - pcgr-report-generation - INFO - Adding annotation links - targeted cancer drugs
    2022-02-08 04:12:10 - pcgr-report-generation - INFO - Adding annotation links - gene-cancer type associations (OpenTargets Platform)
    2022-02-08 04:15:12 - pcgr-report-generation - INFO - Excluding coinciding germline variants in 1000 Genomes Project populations
    2022-02-08 04:15:12 - pcgr-report-generation - INFO - Total sample calls remaining: 771692
    2022-02-08 04:15:14 - pcgr-report-generation - INFO - Excluding coinciding germline variants in any population in the genome aggregation database (gnomAD)
    2022-02-08 04:15:14 - pcgr-report-generation - INFO - Total sample calls remaining: 768029
    2022-02-08 04:15:15 - pcgr-report-generation - INFO - Excluding coinciding germline variants in ClinVar
    2022-02-08 04:15:15 - pcgr-report-generation - INFO - Total sample calls remaining: 767008
    2022-02-08 04:15:16 - pcgr-report-generation - INFO - ------
    2022-02-08 04:15:16 - pcgr-report-generation - INFO - Generating data for tiered cancer genome report - germline-filtered callset tier model 'pcgr_acmg'
    2022-02-08 04:15:17 - pcgr-report-generation - INFO - Number of protein-coding variants: 1853
    2022-02-08 04:15:17 - pcgr-report-generation - INFO - Loading MUT biomarkers for precision oncology - any tumortype
    2022-02-08 04:15:17 - pcgr-report-generation - INFO - Found n = 0 clinical evidence item(s) at the exact level, 0 unique variant(s)
    2022-02-08 04:15:17 - pcgr-report-generation - INFO - Found n = 0 clinical evidence item(s) at the codon level, 0 unique variant(s)
    2022-02-08 04:15:17 - pcgr-report-generation - INFO - Found n = 0 clinical evidence item(s) at the exon level, 0 unique variant(s)
    2022-02-08 04:15:17 - pcgr-report-generation - INFO - Loading MUT biomarkers for precision oncology - Myeloid
    2022-02-08 04:15:17 - pcgr-report-generation - INFO - Found n = 0 clinical evidence item(s) at the exact level, 0 unique variant(s)
    2022-02-08 04:15:17 - pcgr-report-generation - INFO - Found n = 0 clinical evidence item(s) at the codon level, 0 unique variant(s)
    2022-02-08 04:15:17 - pcgr-report-generation - INFO - Found n = 0 clinical evidence item(s) at the exon level, 0 unique variant(s)
    2022-02-08 04:15:17 - pcgr-report-generation - INFO - Generating tiered set of result variants for output in tab-separated values (TSV) file
    2022-02-08 04:15:24 - pcgr-report-generation - INFO - ------
    2022-02-08 04:15:24 - pcgr-report-generation - INFO - Calculating data for rainfall plot
    2022-02-08 04:15:26 - pcgr-report-generation - INFO - ------
    2022-02-08 04:15:26 - pcgr-report-generation - INFO - Generating report data for copy number segment file /rds/projects/b/beggsa-clinicalnanopore/software/pcgr/test/D0263.sorted2.txt
    2022-02-08 04:15:26 - pcgr-report-generation - INFO - Adding annotation links - gene-cancer type associations (OpenTargets Platform)
    2022-02-08 04:15:26 - pcgr-report-generation - INFO - Detected 3 segments subject to amplification/deletion (1 deletions, 2 gains according to user-defined log(2) ratio thresholds)
    2022-02-08 04:15:26 - pcgr-report-generation - INFO - Retrieving targeted drugs (on-label and off-label) for indications relevant for tumor type - Myeloid
    2022-02-08 04:15:27 - pcgr-report-generation - INFO - Detected 0 drug targets to amplification (log(2) ratio >= 0.8):
    2022-02-08 04:15:27 - pcgr-report-generation - INFO - Detected 0 proto-oncogenes subject to amplification (log(2) ratio >= 0.8
    2022-02-08 04:15:27 - pcgr-report-generation - INFO - Detected 8 tumor suppressor gene(s) subject to homozygous deletions (log(2) ratio <= -0.8): CEBPA, UPK1A, ZFP82, SPINT2, SIRT2, ZFP36, CIC, CEACAM1
    2022-02-08 04:15:27 - pcgr-report-generation - INFO - Loading CNA biomarkers for precision oncology - any tumortype
    2022-02-08 04:15:27 - pcgr-report-generation - INFO - Loading CNA biomarkers for precision oncology - Myeloid
    2022-02-08 04:15:27 - pcgr-report-generation - INFO - ------
    2022-02-08 04:15:27 - pcgr-report-generation - INFO - Assigning elements to PCGR value boxes
    2022-02-08 04:15:34 - pcgr-report-generation - INFO - ------
    2022-02-08 04:15:34 - pcgr-report-generation - INFO - Writing JSON file (.json) with report contents
    Error in collapse(tmp, inner = FALSE, indent = indent) :
      R character strings are limited to 2^31-1 bytes
    Calls: <Anonymous> ... .local -> vapply -> FUN -> FUN -> .local -> collapse
    Execution halted
    
  6. sigven commented on Feb 8, 2022

    @sigven
    Owner

    OK, that's an issue that's been observed before. Obviously the previous fix was not robust enough. Would you be able to share your VCF with me somehow, so I can reproduce the error, and see how to fix it?

    best,
    Sigve

  7. sigven commented on Feb 8, 2022

    @sigven
    Owner

    Looking at the log, I believe the reason for the crash must be your huge input set (tumor-only, even after variant filtering, it contains ~770,000 variants). This is a setting we have not been testing to a great extent, I might have to e.g. focus on the protein-coding parts when writing the report to JSON.

  8. adbeggs commented on Feb 8, 2022

    @adbeggs
    Author

    The VCF is unfortunately from a clinical sample - I agree it is a huge input set! It is from a high read depth nanopore WGS. I could pre-filter the VCF to exome only if that is helpful?

  9. sigven commented on Feb 8, 2022

    @sigven
    Owner

    Got it.. makes sense. I was actually suggesting you could do that, filtering against the exome only. I suspect the error might still take place (due to the large number of intronic variants), but give it a try, and get back to us:-)

  10. adbeggs commented on Feb 8, 2022

    @adbeggs
    Author

    Done it - works great now - thank you for a great bit of software!

  11. sigven commented on Feb 8, 2022

    @sigven
    Owner

    Nice! Reach out again if you run into trouble - closing the issue for now.

  12. sigven commented on Feb 9, 2022

    @sigven
    Owner

    Btw, @adbeggs, out of curiosity: to what extend was the variant set reduced by pre-filtering against the exome?

    I'm thinking I might add this as a step prior to the final reporting step (for tumor-only WGS cases, that is). In this way, you will still get the completely PCGR-annotated input VCF + TSV (with all coding + noncoding variants), while the final reporting step gets more managable, focusing on the coding, exonic parts.

    best,
    Sigve

  13. reopened this on Feb 9, 2022
  14. adbeggs commented on Feb 9, 2022

    @adbeggs
    Author

    Hi Sigve,

    It went from 6283689 variants to 113837.

    Best wishes

    Andrew

  15. YingYa commented on Mar 6, 2022

    @YingYa

    Hi sigven,

    I have few samples that still with the same errors.
    total somatic mutation number is 2195781 in whole genome, while that is 13581 in exonic (that used for MSI prediction).

    [v1.0.0] Version of PCGR.
    [grch38] Genome build (grch37/grch38).
    [/share/app/singularity/3.8.1/bin/singularity exec -e -B /share/app/PCGR/data-20220203:/data -B /share/user/workdir:/workdir /share/app/PCGR/pcgr-v1.0.0.sif /opt/mambaforge/envs/pcgr/bin/pcgr --input_vcf /workdir/Normal-VS-Tumor.vcf.gz --input_cna /workdir/Normal-VS-Tumor.seg.tsv --logr_gain 0.8 --logr_homdel -0.8 --cna_overlap_pct 50 --pcgr_dir /data --output_dir /workdir --genome_assembly grch38 --sample_id Tumor --vcfanno_n_proc 4 --vep_n_forks 4 --vep_regulatory --estimate_tmb --estimate_msi_status --estimate_signatures --all_reference_signatures --tumor_dp_tag TDP --tumor_af_tag TVAF --control_dp_tag NDP --control_af_tag NVAF --call_conf_tag TAL --tumor_site 9 --tumor_purity 0.33 --tumor_ploidy 2.4 --assay WGS --include_trials --force_overwrite --no_docker] the complete command you used to invoke pcgr (including all explicit options)
    [2022-03-06 15:40:06 - pcgr-report-generation - INFO - Writing JSON file (.json) with report contents
    Error in collapse(tmp, inner = FALSE, indent = indent) :
    R character strings are limited to 2^31-1 bytes
    Calls: ... .local -> vapply -> FUN -> FUN -> .local -> collapse
    Execution halted] the full error message

  16. sigven commented on Mar 6, 2022

    @sigven
    Owner

    Hi @YingYa ,

    Did you filter your input VCF against the exome prior to your analysis, as @adbeggs did? See important note 2 here: https://sigven.github.io/pcgr/articles/running.html#tumor-control-vs--tumor-only

    best,
    Sigve

  17. reopened this on Mar 6, 2022
  18. YingYa commented on Mar 6, 2022

    @YingYa

    Hi sigven,

    Thanks for your quickly respond.
    No, I have not filter the VCF against the exome prior. The sample is hypermutated that may casued POLE mutated.
    Is the parameter '--show_noncoding List non-coding (i.e. non protein-altering) variants in report, default: False' for solving this issue?

    Best,
    Yingya

  19. sigven commented on Mar 6, 2022

    @sigven
    Owner

    You can try, but I believe these variants (non protein-altering) are also propagated towards the JSON output. I will have to figure out a way to fix this, it is a recurring event for large (WGS) samples. If you can share any data with me (VCF) I would be grateful, but I understand if if it's not possible.

    best,
    Sigve

  20. YingYa commented on Mar 6, 2022

    @YingYa

    Yes, the data have been share with you by google drive.

    best,
    Yingya

  21. sigven commented on Mar 6, 2022

    @sigven
    Owner

    Thanks a lot Yingya, I am looking into the data, and will get back to you.

    best,
    Sigve

  22. sigven commented on Mar 6, 2022

    @sigven
    Owner

    Could you alse share (in the same folder), the files that are produced before the crash, i.e:

    • Tumor.pcgr_acmg.grch38.pass.tsv.gz
    • Tumor.pcgr_acmg.grch38.pass.vcf.gz (.tbi)
    • Tumor.pcgr_config.rds

    best,
    Sigve

  23. YingYa commented on Mar 7, 2022

    @YingYa

    The other files have been uploaded to the same folder.

    best,
    Yingya

  24. sigven commented on Mar 10, 2022

    @sigven
    Owner

    Resolved in v1.0.1, see CHANGELOG

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions