pdxgx / neoepiscope

predicts neoepitopes from phased somatic mutations detected using tumor/normal DNA-seq data
Other
26 stars 17 forks source link

transcript_to_gene_info.pickle is not loaded #9

Closed ThijsMaas closed 4 years ago

ThijsMaas commented 4 years ago

When you use your own index with -x and -d, the "transcript_to_gene_info.pickle" file is never loaded and the code crashed after trying to write the "info_dict" variable that is never created.

Easy fix, load the file after "transcript_to_CDS.pickle" is loaded at line 465 in init.py. Add something like:

info_path = os.path.join(args.dicts, "transcript_to_gene_info.pickle")   
    if os.path.isfile(info_path):  
       with open(info_path, "rb") as info_stream:  
          info_dict = pickle.load(info_stream)  
             else:  
                raise RuntimeError(  
                   "".join(  
                      [  
                          "Cannot find ",  
                            info_path,  
                             "; have you indexed your GTF with neoepiscope index?",  
                       ]  
                    )  
                )  
maryawood commented 4 years ago

We've approved your pull request with the fix for this - thank you so much for catching this bug!