Skip to content

Commit

Permalink
Update db to 2023-11-09 (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
brendanreardon authored Nov 22, 2023
1 parent 6a328cf commit f8c4501
Show file tree
Hide file tree
Showing 10 changed files with 7,421 additions and 5,166 deletions.
80 changes: 80 additions & 0 deletions example_data/example_patient.capture.sbs_contributions.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
signature contribution
SBS1 0.003389830508474576
SBS2 0.0
SBS3 0.0
SBS4 0.0
SBS5 0.22372881355932203
SBS6 0.0
SBS7a 0.423728813559322
SBS7b 0.0
SBS7c 0.0
SBS7d 0.0
SBS8 0.0
SBS9 0.0
SBS10a 0.0
SBS10b 0.11864406779661017
SBS10c 0.0
SBS10d 0.0
SBS11 0.0
SBS12 0.0
SBS13 0.0
SBS14 0.0
SBS15 0.0
SBS16 0.0
SBS17a 0.0
SBS17b 0.0
SBS18 0.0
SBS19 0.0
SBS20 0.0
SBS21 0.0
SBS22 0.0
SBS23 0.0
SBS24 0.0
SBS25 0.0
SBS26 0.0
SBS27 0.0
SBS28 0.0
SBS29 0.0
SBS30 0.2305084745762712
SBS31 0.0
SBS32 0.0
SBS33 0.0
SBS34 0.0
SBS35 0.0
SBS36 0.0
SBS37 0.0
SBS38 0.0
SBS39 0.0
SBS40 0.0
SBS41 0.0
SBS42 0.0
SBS43 0.0
SBS44 0.0
SBS45 0.0
SBS46 0.0
SBS47 0.0
SBS48 0.0
SBS49 0.0
SBS50 0.0
SBS51 0.0
SBS52 0.0
SBS53 0.0
SBS54 0.0
SBS55 0.0
SBS56 0.0
SBS57 0.0
SBS58 0.0
SBS59 0.0
SBS60 0.0
SBS84 0.0
SBS85 0.0
SBS86 0.0
SBS87 0.0
SBS88 0.0
SBS89 0.0
SBS90 0.0
SBS91 0.0
SBS92 0.0
SBS93 0.0
SBS94 0.0
SBS95 0.0
6 changes: 3 additions & 3 deletions example_data/example_patient.capture.somatic.indels.maf
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Hugo_Symbol NCBI_Build Chromosome Start_position End_position Variant_Classification Reference_Allele Tumor_Seq_Allele1 Tumor_Seq_Allele2 Tumor_Sample_Barcode Matched_Norm_Sample_Barcode Annotation_Transcript Protein_Change t_alt_count t_ref_count
PMPCA 37 9 139312448 139312449 Intron - - G example_tumor_profile example_normal_profile ENST00000371717.3 31 92
C10orf2 37 10 102748300 102748301 Frame_Shift_Del TC TC - example_tumor_profile example_normal_profile ENST00000370228.1 p.L112fs 28 294
Hugo_Symbol NCBI_Build Chromosome Start_position End_position Variant_Classification Variant_Type Reference_Allele Tumor_Seq_Allele1 Tumor_Seq_Allele2 Tumor_Sample_Barcode Matched_Norm_Sample_Barcode Annotation_Transcript Protein_Change t_alt_count t_ref_count
PMPCA 37 9 139312448 139312449 Intron INS - - G example_tumor_profile example_normal_profile ENST00000371717.3 31 92
C10orf2 37 10 102748300 102748301 Frame_Shift_Del DEL TC TC - example_tumor_profile example_normal_profile ENST00000370228.1 p.L112fs 28 294
600 changes: 300 additions & 300 deletions example_data/example_patient.capture.somatic.snvs.maf

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions moalmanac/annotator.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,14 +177,15 @@ class Almanac:
implication = datasources.Almanac.implication
implication_map = datasources.Almanac.implication_map
description = datasources.Almanac.description
preferred_assertion = datasources.Almanac.preferred_assertion

source_type = datasources.Almanac.source_type
citation = datasources.Almanac.citation
url = datasources.Almanac.url
doi = datasources.Almanac.doi
pmid = datasources.Almanac.pmid
nct = datasources.Almanac.nct
publication_date = datasources.Almanac.publication_date
last_updated = datasources.Almanac.last_updated

predictive_implication_map = datasources.Almanac.predictive_implication_map

Expand Down Expand Up @@ -820,8 +821,8 @@ def select_better_fusion_match(cls, list_of_matches):

@classmethod
def sort_and_subset_matches(cls, table, results_same_ontology, results_diff_ontology):
sort_columns = [cls.implication_map, cls.preferred_assertion]
sort_ascending = [False, False]
sort_columns = [cls.implication_map, cls.publication_date, cls.last_updated]
sort_ascending = [False, False, False]
if results_same_ontology.any():
results_same_ontology_sorted = cls.sort_dataframe(table[results_same_ontology], sort_columns, sort_ascending)
results_same_ontology_records = cls.convert_dataframe_to_records(results_same_ontology_sorted)
Expand Down
6 changes: 4 additions & 2 deletions moalmanac/colnames.ini
Original file line number Diff line number Diff line change
Expand Up @@ -165,14 +165,15 @@ resistance = therapy_resistance
prognosis = favorable_prognosis
implication = predictive_implication
implication_map = predictive_implication_map
preferred_assertion = preferred_assertion
connections = connections
source_type = source_type
citation = citation
url = url
doi = doi
pmid = pmid
nct = nct
publication_date = publication_date
last_updated = last_updated
exac_common = exac_common
exac_af = exac_af
exac_ac = exac_ac
Expand Down Expand Up @@ -459,7 +460,6 @@ implication = ${maps:implication}
implication_map = ${maps:implication_map}
connections = ${maps:connections}
description = ${maps:description}
preferred_assertion = ${maps:preferred_assertion}
sensitive_oncotree_code = ${maps:sensitive_oncotree_code}
sensitive_oncotree_term = ${maps:sensitive_oncotree_term}
sensitive_context = ${maps:sensitive_context}
Expand Down Expand Up @@ -523,6 +523,8 @@ url = ${maps:url}
doi = ${maps:doi}
pmid = ${maps:pmid}
nct = ${maps:nct}
publication_date = ${maps:publication_date}
last_updated = ${maps:last_updated}
chr = ${maps:chr}
start = ${maps:start}
end = ${maps:end}
Expand Down
4 changes: 2 additions & 2 deletions moalmanac/config.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ plot_mutational_signatures = on
plot_preclinical_efficacy = on

[versions]
interpreter = 0.4.6
database = v.2023-02-02
interpreter = 0.4.7
database = v.2023-11-09

[exac]
exac_common_af_threshold = 0.001
Expand Down
6 changes: 4 additions & 2 deletions moalmanac/datasources.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,15 @@ class Datasources:
implication_map = COLNAMES[datasources_section]['implication_map']
connections = COLNAMES[datasources_section]['connections']
description = COLNAMES[datasources_section]['description']
preferred_assertion = COLNAMES[datasources_section]['preferred_assertion']

source_type = COLNAMES[datasources_section]['source_type']
citation = COLNAMES[datasources_section]['citation']
url = COLNAMES[datasources_section]['url']
doi = COLNAMES[datasources_section]['doi']
pmid = COLNAMES[datasources_section]['pmid']
nct = COLNAMES[datasources_section]['nct']
publication_date = COLNAMES[datasources_section]['publication_date']
last_updated = COLNAMES[datasources_section]['last_updated']

sensitivity_matches = COLNAMES[datasources_section]['sensitivity_matches']
resistance_matches = COLNAMES[datasources_section]['resistance_matches']
Expand Down Expand Up @@ -122,14 +123,15 @@ class Almanac:
implication = Datasources.implication
implication_map = Datasources.implication_map
description = Datasources.description
preferred_assertion = Datasources.preferred_assertion

source_type = Datasources.source_type
citation = Datasources.citation
url = Datasources.url
doi = Datasources.doi
pmid = Datasources.pmid
nct = Datasources.nct
publication_date = Datasources.publication_date
last_updated = Datasources.last_updated

sensitivity_matches = Datasources.sensitivity_matches
resistance_matches = Datasources.resistance_matches
Expand Down
8 changes: 4 additions & 4 deletions moalmanac/datasources/moalmanac/create_almanac_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ def create_config():
'disease', 'context', 'oncotree_term', 'oncotree_code',
'therapy_name', 'therapy_strategy', 'therapy_type',
'therapy_sensitivity', 'therapy_resistance', 'favorable_prognosis',
'predictive_implication', 'description', 'last_updated', 'preferred_assertion'
'predictive_implication', 'description', 'last_updated'
]

SOURCE_FIELDS = [
'source_type', 'citation', 'url', 'doi', 'pmid', 'nct', 'last_updated'
'source_type', 'citation', 'url', 'doi', 'pmid', 'nct', 'publication_date', 'last_updated'
]

VARIANT_FIELDS = [
Expand Down Expand Up @@ -59,7 +59,7 @@ def create_config():
]

MUTATIONAL_SIGNATURE_FIELDS = [
'cosmic_signature_number', 'cosmic_signature_version'
'cosmic_signature'
]

MICROSATELLITE_FIELDS = [
Expand All @@ -86,7 +86,7 @@ def copy_number(cls, record):

@classmethod
def cosmic_mutational_signature(cls, record):
return f"Cosmic signature (version {record['cosmic_signature_version']}) {record['cosmic_signature_number']}"
return f"Cosmic signature {record['cosmic_signature']} (version 3.4)"

@classmethod
def germline_variant(cls, record):
Expand Down
Loading

0 comments on commit f8c4501

Please sign in to comment.