diff --git a/docs/conf.py b/docs/conf.py index 5656c04d1..b2a3afddc 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -70,7 +70,7 @@ # The short X.Y version. version = '4.0' # The full version, including alpha/beta/rc tags. -release = '4.0.3' +release = '4.0.4' # The language for content autogenerated by Sphinx. Refer to documentation diff --git a/docs/index.rst b/docs/index.rst index 55c0eb491..1543b092a 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -56,8 +56,8 @@ New in Release |release| This is a bugfix release. It fixes the following problem(s): -- The fixes in issue in the reference proteome similarity step in pVACseq - where running with non-human data would cause an error. +- This release makes various fixes to allow pVACtools to run with non-human + data. New in Version |version| ------------------------ diff --git a/docs/releases/4_0.rst b/docs/releases/4_0.rst index f2426c7eb..a9a16ffc2 100644 --- a/docs/releases/4_0.rst +++ b/docs/releases/4_0.rst @@ -106,3 +106,11 @@ This is a bugfix release. It fixes the following problem(s): - The fixes in issue in the reference proteome similarity step in pVACseq where running with non-human data would cause an error. + +New in Version 4.0.4 +-------------------- + +This is a bugfix release. It fixes the following problem(s): + +- This release makes various fixes to allow pVACtools to run with non-human + data. diff --git a/pvactools/lib/calculate_reference_proteome_similarity.py b/pvactools/lib/calculate_reference_proteome_similarity.py index 3f9097693..7375e8d74 100644 --- a/pvactools/lib/calculate_reference_proteome_similarity.py +++ b/pvactools/lib/calculate_reference_proteome_similarity.py @@ -269,13 +269,7 @@ def _input_tsv_type(self, line): def _get_full_peptide(self, line, mt_records_dict, wt_records_dict): for record_id in mt_records_dict.keys(): (rest_record_id, variant_type, aa_change) = record_id.rsplit(".", 2) - transcript_regex = '^.*(ENS[0-9|A-Z|.]+)$' - transcript_p = re.compile(transcript_regex) - m = transcript_p.match(rest_record_id) - if m: - transcript = m.group(1) - else: - raise Exception("Unexpected record_id format: {}".format(record_id)) + (count, gene, transcript) = rest_record_id.split(".", 2) (parsed_aa_change, pos, wt_aa, mt_aa) = index_to_aggregate_report_aa_change(aa_change, variant_type) if line['Best Transcript'] == transcript and line['AA Change'] == parsed_aa_change: return (mt_records_dict[record_id], wt_records_dict[record_id], variant_type, mt_aa, wt_aa) diff --git a/pvactools/tools/pvacseq/generate_protein_fasta.py b/pvactools/tools/pvacseq/generate_protein_fasta.py index f057fd767..1bab065f5 100644 --- a/pvactools/tools/pvacseq/generate_protein_fasta.py +++ b/pvactools/tools/pvacseq/generate_protein_fasta.py @@ -166,13 +166,7 @@ def parse_files(output_file, temp_dir, mutant_only, input_tsv, aggregate_report_ continue else: (rest_record_id, variant_type, aa_change) = record_id.rsplit(".", 2) - transcript_regex = '^.*(ENST[0-9|.]+)$' - transcript_p = re.compile(transcript_regex) - m = transcript_p.match(rest_record_id) - if m: - transcript = m.group(1) - else: - raise Exception("Unexpected record_id format: {}".format(record_id)) + (peptide_type, count, gene, transcript) = rest_record_id.split(".", 3) (parsed_aa_change, _, _, _) = index_to_aggregate_report_aa_change(aa_change, variant_type) matches = [i for i in tsv_indexes if i['Best Transcript'] == transcript and i['AA Change'] == parsed_aa_change and i['Evaluation'] in aggregate_report_evaluation] if len(matches) == 0: diff --git a/pvactools/tools/pvacview/server.R b/pvactools/tools/pvacview/server.R index b77ce4495..4ef1b1d6b 100644 --- a/pvactools/tools/pvacview/server.R +++ b/pvactools/tools/pvacview/server.R @@ -96,7 +96,13 @@ server <- shinyServer(function(input, output, session) { df$allele_specific_anchors <- df$metricsData$`allele_specific_anchors` df$anchor_contribution <- df$metricsData$`anchor_contribution_threshold` hla <- df$metricsData$alleles - converted_hla_names <- unlist(lapply(hla, function(x) {strsplit(x, "HLA-")[[1]][2]})) + converted_hla_names <- unlist(lapply(hla, function(x) { + if (grepl("HLA-", x)) { + strsplit(x, "HLA-")[[1]][2] + } else { + x + } + })) if (!("Ref Match" %in% colnames(df$mainTable))) { df$mainTable$`Ref Match` <- "Not Run" } @@ -172,7 +178,13 @@ server <- shinyServer(function(input, output, session) { df$allele_specific_anchors <- df$metricsData$`allele_specific_anchors` df$anchor_contribution <- df$metricsData$`anchor_contribution_threshold` hla <- df$metricsData$alleles - converted_hla_names <- unlist(lapply(hla, function(x) {strsplit(x, "HLA-")[[1]][2]})) + converted_hla_names <- unlist(lapply(hla, function(x) { + if (grepl("HLA-", x)) { + strsplit(x, "HLA-")[[1]][2] + } else { + x + } + })) if (!("Ref Match" %in% colnames(df$mainTable))) { df$mainTable$`Ref Match` <- "Not Run" } diff --git a/setup.py b/setup.py index 7e0eff6ff..3a1169535 100644 --- a/setup.py +++ b/setup.py @@ -51,7 +51,7 @@ setup( name="pvactools", - version="4.0.3", + version="4.0.4", packages=[ "pvactools.tools", "pvactools.tools.pvacbind", diff --git a/tests/test_data/calculate_reference_proteome_similarity/Test.mouse.fasta b/tests/test_data/calculate_reference_proteome_similarity/Test.mouse.fasta index d53a50074..9fc1604bf 100644 --- a/tests/test_data/calculate_reference_proteome_similarity/Test.mouse.fasta +++ b/tests/test_data/calculate_reference_proteome_similarity/Test.mouse.fasta @@ -1,4 +1,4 @@ ->WT.Rp1.ENSMUST00000027032.missense.1453N/S +>WT.1.Rp1.ENSMUST00000027032.missense.1453N/S IAGTLKFNPETDYLTGTDG ->MT.Rp1.ENSMUST00000027032.missense.1453N/S +>MT.1.Rp1.ENSMUST00000027032.missense.1453N/S IAGTLKFNPQTDYLTGTDG