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

GATK strand bias tuple index out of range #402

Closed
sage-wright opened this issue Nov 7, 2024 · 0 comments
Closed

GATK strand bias tuple index out of range #402

sage-wright opened this issue Nov 7, 2024 · 0 comments

Comments

@sage-wright
Copy link

Hey Jody! @frogtraveler and I have been testing the new GATK strand bias filter with the staphb/tbprofiler:6.4.0 docker image, and ran into the following issue where the tuple index was out of range when within the get_stand_support function.

This is the command we are running:

tb-profiler profile \
  -1  CA-OCPHL-MTB-00045D_R1.fastq.gz -2 CA-OCPHL-MTB-00045D_R2.fastq.gz \
  --prefix CA-OCPHL-MTB-00045D \
  --mapper bwa \
  --caller gatk \
  --calling_params "" \
  --depth 10 \
  --af 0.1 \
  --threads 8 \
  --csv --txt \
  --db CaliforniaDPH \
  --strand 1,3 \

And this is the particular section in the log that indicates the issue:

[18:24:37] INFO     Loading snpEff annotations                        vcf.py:163
Traceback (most recent call last):
  File "/opt/conda/bin/tb-profiler", line 645, in <module>
    args.func(args)
  File "/opt/conda/bin/tb-profiler", line 115, in main_profile
    variants_profile = pp.run_profiler(args)
                       ^^^^^^^^^^^^^^^^^^^^^
  File "/opt/conda/lib/python3.12/site-packages/pathogenprofiler/cli.py", line 207, in run_profiler
    annotated_variants = vcf_profiler(args)
                         ^^^^^^^^^^^^^^^^^^
  File "/opt/conda/lib/python3.12/site-packages/pathogenprofiler/profiler.py", line 53, in vcf_profiler
    annotated_variants = vcf_variant_profiler(conf, args.files_prefix, args.vcf, bam_for_phasing=args.supplementary_bam)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/conda/lib/python3.12/site-packages/pathogenprofiler/profiler.py", line 68, in vcf_variant_profiler
    variants = vcf_obj.load_ann(conf['variant_filters'],bed_file=conf["bed"],keep_variant_types = ["ablation","upstream","synonymous","noncoding"])
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/conda/lib/python3.12/site-packages/pathogenprofiler/vcf.py", line 220, in load_ann
    strand_support = get_stand_support(var,alt)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/conda/lib/python3.12/site-packages/pathogenprofiler/vcf.py", line 24, in get_stand_support
    forward_support = var.samples[0]['SB'][(alt_index+1)*2]
                      ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
IndexError: tuple index out of range
Cleaning up after failed run
           ERROR                                                  tb-profiler:73
                                                                                
                    ################################# ERROR                     
                    #######################################                     
                                                                                
                    This run has failed. Please check all                       
                    arguments and make sure all input files                     
                    exist. If no solution is found, please open                 
                    up an issue at                                              
                    https://github.com/jodyphelan/TBProfiler/issu               
                    es/new and paste or attach the                              
                    contents of the error log                                   
                    (CA-OCPHL-MTB-00045D.errlog.txt)                            
                                                                                
                    #############################################               
                    ##################################                          

These input parameters have worked successfully for other samples so we don't think we have an issue with the input parameters, and this sample has worked with previous versions of TBProfiler.

You can see the whole log here: tbprofiler.log -- the beginning and end are localization processes since we ran this on Terra with cromwell.

Do you need any intermediate files from us to help resolve this issue?

Thanks!

jodyphelan added a commit to jodyphelan/pathogen-profiler that referenced this issue Nov 13, 2024
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

No branches or pull requests

2 participants