InPreD / PRONTO

rePort geneRator fOr iNpred Tumor bOards
GNU General Public License v3.0
0 stars 4 forks source link

Crash when DNA and RNA for a sample are from different runs #17

Closed torben-uio closed 8 months ago

torben-uio commented 8 months ago

When creating reports for a sample where DNA and RNA are from different runs PRONTO will crash (see traceback below). It seems the actual problem is this line line (1058) though:

RNA_run_dir_short = RNA_run_dir.split('/')[4]

Assuming that all nodes have the same level of folders in their analysis structure with the -analysis folder as the fifth level will not work. However, this should always be the last part of the path so using RNA_run_dir.split('/')[-1] should work.

Traceback (most recent call last):
  File "/pronto/Script/PRONTO.py", line 1321, in <module>
    main(sys.argv[1:])
  File "/pronto/Script/PRONTO.py", line 1240, in main
    stable_text = update_ppt_variant_summary_table(slide6_table_nrows,DNA_sampleID,RNA_sampleID,TMB_DRUP,TMB_DRUP_str,DNA_variant_summary_file,RNA_variant_summary_file,output_file_preMTB_AppendixTable,output_table_file_filterResults_AllReporVariants_CodingRegion,output_ppt_file)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/pronto/Script/PRONTO.py", line 603, in update_ppt_variant_summary_table
    RNA_summary_file = open(RNA_variant_summary_file)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/pronto/tsoppi_data/TSO500_analyses_TSO_500_LocalApp_postprocessing_results/TSO500_analyses_variant_summary.tsv'
xiaoliz0 commented 8 months ago

Thanks for feedback. This is fixed by changing "RNA_run_dir_short = RNA_run_dir.split('/')[4]" to "RNA_run_dir_short = RNA_run_dir.split('/')[-1]" in the script.