Notice:
If you happen to see a question you know the answer to, please do chime in and help your fellow community members. We encourage our fourm members to be more involved, jump in and help out your fellow researchers with their questions. GATK forum is a community forum and helping each other with using GATK tools and research is the cornerstone of our success as a genomics research community.We appreciate your help!

Test-drive the GATK tools and Best Practices pipelines on Terra


Check out this blog post to learn how you can get started with GATK and try out the pipelines in preconfigured workspaces (with a user-friendly interface!) without having to install anything.
Attention:
We will be out of the office on November 11th and 13th 2019, due to the U.S. holiday(Veteran's day) and due to a team event(Nov 13th). We will return to monitoring the GATK forum on November 12th and 14th respectively. Thank you for your patience.

GATK Determine Contig Ploidy Error: ValueError: invalid literal for int() with base 10: '0 PLOIDY_P

mtkk94mtkk94 Member
edited June 26 in Ask the GATK team

Hi,

I am running GATK4 Germline CNV pipeline on 203 WES samples, and have gotten the following error during the Determine Contig Ploidy step:

   15:29:38.431 DEBUG ScriptExecutor - Executing:
    15:29:38.431 DEBUG ScriptExecutor -   python
    15:29:38.431 DEBUG ScriptExecutor -   /tmp/cohort_determine_ploidy_and_depth.5886214504352644800.py
    15:29:38.431 DEBUG ScriptExecutor -   --sample_coverage_metadata=/tmp/samples-by-coverage-per-contig8026198779202597096.tsv
    15:29:38.431 DEBUG ScriptExecutor -   --output_calls_path=/mnt/data/smb_share/Mandal_project/PCa_WES/mcdowell#Bailey-Wilson_NF_AAPC/SampleBams/ploidy-calls
    15:29:38.431 DEBUG ScriptExecutor -   --mapping_error_rate=1.000000e-02
    15:29:38.431 DEBUG ScriptExecutor -   --psi_s_scale=1.000000e-04
    15:29:38.431 DEBUG ScriptExecutor -   --mean_bias_sd=1.000000e-02
    15:29:38.431 DEBUG ScriptExecutor -   --psi_j_scale=1.000000e-03
    15:29:38.432 DEBUG ScriptExecutor -   --learning_rate=5.000000e-02
    15:29:38.432 DEBUG ScriptExecutor -   --adamax_beta1=9.000000e-01
    15:29:38.432 DEBUG ScriptExecutor -   --adamax_beta2=9.990000e-01
    15:29:38.432 DEBUG ScriptExecutor -   --log_emission_samples_per_round=2000
    15:29:38.432 DEBUG ScriptExecutor -   --log_emission_sampling_rounds=100
    15:29:38.432 DEBUG ScriptExecutor -   --log_emission_sampling_median_rel_error=5.000000e-04
    15:29:38.432 DEBUG ScriptExecutor -   --max_advi_iter_first_epoch=1000
    15:29:38.432 DEBUG ScriptExecutor -   --max_advi_iter_subsequent_epochs=1000
    15:29:38.432 DEBUG ScriptExecutor -   --min_training_epochs=20
    15:29:38.432 DEBUG ScriptExecutor -   --max_training_epochs=100
    15:29:38.432 DEBUG ScriptExecutor -   --initial_temperature=2.000000e+00
    15:29:38.432 DEBUG ScriptExecutor -   --num_thermal_advi_iters=5000
    15:29:38.432 DEBUG ScriptExecutor -   --convergence_snr_averaging_window=5000
    15:29:38.432 DEBUG ScriptExecutor -   --convergence_snr_trigger_threshold=1.000000e-01
    15:29:38.432 DEBUG ScriptExecutor -   --convergence_snr_countdown_window=10
    15:29:38.432 DEBUG ScriptExecutor -   --max_calling_iters=1
    15:29:38.432 DEBUG ScriptExecutor -   --caller_update_convergence_threshold=1.000000e-03
    15:29:38.432 DEBUG ScriptExecutor -   --caller_internal_admixing_rate=7.500000e-01
    15:29:38.432 DEBUG ScriptExecutor -   --caller_external_admixing_rate=7.500000e-01
    15:29:38.432 DEBUG ScriptExecutor -   --disable_caller=false
    15:29:38.432 DEBUG ScriptExecutor -   --disable_sampler=false
    15:29:38.432 DEBUG ScriptExecutor -   --disable_annealing=false
    15:29:38.432 DEBUG ScriptExecutor -   --interval_list=/tmp/intervals8489974735940571592.tsv
    15:29:38.432 DEBUG ScriptExecutor -   --contig_ploidy_prior_table=/mnt/data/smb_share/Mandal_project/PCa_WES/mcdowell#Bailey-Wilson_NF_AAPC/SampleBams/contigPloidyPriorsTable4.tsv
    15:29:38.432 DEBUG ScriptExecutor -   --output_model_path=/mnt/data/smb_share/Mandal_project/PCa_WES/mcdowell#Bailey-Wilson_NF_AAPC/SampleBams/ploidy-model
    Traceback (most recent call last):
      File "/tmp/cohort_determine_ploidy_and_depth.5886214504352644800.py", line 79, in <module>
        args.contig_ploidy_prior_table)
      File "/usr/miniconda3/envs/gatk/lib/python3.6/site-packages/gcnvkernel/io/io_ploidy.py", line 190, in get_contig_ploidy_prior_map_from_tsv_file
        ploidy_values = [int(column[len(io_consts.ploidy_prior_prefix):]) for column in columns[1:]]
      File "/usr/miniconda3/envs/gatk/lib/python3.6/site-packages/gcnvkernel/io/io_ploidy.py", line 190, in <listcomp>
        ploidy_values = [int(column[len(io_consts.ploidy_prior_prefix):]) for column in columns[1:]]
 ValueError: invalid literal for int() with base 10: '0  PLOIDY_PRIOR_1  PLOIDY_PRIOR_2  PLOIDY_PRIOR_3
            15:29:52.389 DEBUG ScriptExecutor - Result: 1
            15:29:52.390 INFO  DetermineGermlineContigPloidy - Shutting down engine
            [June 26, 2019 3:29:52 PM CDT] org.broadinstitute.hellbender.tools.copynumber.DetermineGermlineContigPloidy done. Elapsed time: 5.24 minutes.
            Runtime.totalMemory()=6116343808
            org.broadinstitute.hellbender.utils.python.PythonScriptExecutorException: 
            python exited with 1
            Command Line: python /tmp/cohort_determine_ploidy_and_depth.5886214504352644800.py --sample_coverage_metadata=/tmp/samples-by-coverage-per-contig8026198779202597096.tsv --output_calls_path=/mnt/data/smb_share/Mandal_project/PCa_WES/mcdowell#Bailey-Wilson_NF_AAPC/SampleBams/ploidy-calls --mapping_error_rate=1.000000e-02 --psi_s_scale=1.000000e-04 --mean_bias_sd=1.000000e-02 --psi_j_scale=1.000000e-03 --learning_rate=5.000000e-02 --adamax_beta1=9.000000e-01 --adamax_beta2=9.990000e-01 --log_emission_samples_per_round=2000 --log_emission_sampling_rounds=100 --log_emission_sampling_median_rel_error=5.000000e-04 --max_advi_iter_first_epoch=1000 --max_advi_iter_subsequent_epochs=1000 --min_training_epochs=20 --max_training_epochs=100 --initial_temperature=2.000000e+00 --num_thermal_advi_iters=5000 --convergence_snr_averaging_window=5000 --convergence_snr_trigger_threshold=1.000000e-01 --convergence_snr_countdown_window=10 --max_calling_iters=1 --caller_update_convergence_threshold=1.000000e-03 --caller_internal_admixing_rate=7.500000e-01 --caller_external_admixing_rate=7.500000e-01 --disable_caller=false --disable_sampler=false --disable_annealing=false --interval_list=/tmp/intervals8489974735940571592.tsv --contig_ploidy_prior_table=/mnt/data/smb_share/Mandal_project/PCa_WES/mcdowell#Bailey-Wilson_NF_AAPC/SampleBams/contigPloidyPriorsTable4.tsv --output_model_path=/mnt/data/smb_share/Mandal_project/PCa_WES/mcdowell#Bailey-Wilson_NF_AAPC/SampleBams/ploidy-model
                at org.broadinstitute.hellbender.utils.python.PythonExecutorBase.getScriptException(PythonExecutorBase.java:75)
                at org.broadinstitute.hellbender.utils.runtime.ScriptExecutor.executeCuratedArgs(ScriptExecutor.java:126)
                at org.broadinstitute.hellbender.utils.python.PythonScriptExecutor.executeArgs(PythonScriptExecutor.java:170)
                at org.broadinstitute.hellbender.utils.python.PythonScriptExecutor.executeScript(PythonScriptExecutor.java:151)
                at org.broadinstitute.hellbender.utils.python.PythonScriptExecutor.executeScript(PythonScriptExecutor.java:121)
                at org.broadinstitute.hellbender.tools.copynumber.DetermineGermlineContigPloidy.executeDeterminePloidyAndDepthPythonScript(DetermineGermlineContigPloidy.java:411)
                at org.broadinstitute.hellbender.tools.copynumber.DetermineGermlineContigPloidy.doWork(DetermineGermlineContigPloidy.java:288)
                at org.broadinstitute.hellbender.cmdline.CommandLineProgram.runTool(CommandLineProgram.java:138)
                at org.broadinstitute.hellbender.cmdline.CommandLineProgram.instanceMainPostParseArgs(CommandLineProgram.java:191)
                at org.broadinstitute.hellbender.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:210)
                at org.broadinstitute.hellbender.Main.runCommandLineProgram(Main.java:162)
                at org.broadinstitute.hellbender.Main.mainEntry(Main.java:205)
                at org.broadinstitute.hellbender.Main.main(Main.java:291)

We are using this contig ploidy table below:

CONTIG_NAME     PLOIDY_PRIOR_0  PLOIDY_PRIOR_1  PLOIDY_PRIOR_2  PLOIDY_PRIOR_3
chr1      0.01    0.02    0.95    0.02
chr2      0.01    0.02    0.95    0.02
chr3      0.01    0.02    0.95    0.02
chr4      0.01    0.02    0.95    0.02
chr5      0.01    0.02    0.95    0.02
chr6      0.01    0.02    0.95    0.02
chr7      0.01    0.02    0.95    0.02
chr8      0.01    0.02    0.95    0.02
chr9      0.01    0.02    0.95    0.02
chr10    0.01    0.02    0.95    0.02
chr11    0.01    0.02    0.95    0.02
chr12    0.01    0.02    0.95    0.02
chr13    0.01    0.02    0.95    0.02
chr14    0.01    0.02    0.95    0.02
chr15    0.01    0.02    0.95    0.02
chr16    0.01    0.02    0.95    0.02
chr17    0.01    0.02    0.95    0.02
chr18    0.01    0.02    0.95    0.02
chr19    0.01    0.02    0.95    0.02
chr20    0.01    0.02    0.95    0.02
chr21    0.01    0.02    0.95    0.02
chr22    0.01    0.02    0.95    0.02
chrX      0.01    0.49    0.48    0.02
chrY      0.49    0.49    0.02    0

Any help would be appreciated.

Thanks,
Tarun

Post edited by mtkk94 on

Best Answers

  • mtkk94mtkk94
    Accepted Answer

    I replaced all the spaces with tabs and it is working fine. Thank you @slee.

Answers

  • mtkk94mtkk94 Member
    edited June 27

    @slee, thank you for the response. It worked.

    Post edited by mtkk94 on
  • mtkk94mtkk94 Member
    Accepted Answer

    I replaced all the spaces with tabs and it is working fine. Thank you @slee.

Sign In or Register to comment.