Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion cmat/consequence_prediction/common/biomart.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ def build_biomart_request_template(key_column, query_columns):

Note `identifier_list` is left to be filled in later, to ensure the identifiers can be chunked appropriately.
"""
biomart_request_template = f"""http://www.ensembl.org/biomart/martservice?query=<?xml version="1.0" encoding="UTF-8"?>
# TODO BioMart not available on new Ensembl
biomart_request_template = f"""https://jun2026.archive.ensembl.org/biomart/martservice?query=<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Query>
<Query virtualSchemaName="default" formatter="TSV" header="0" uniqueRows="0" count="" datasetConfigVersion="0.6">
<Dataset name = "hsapiens_gene_ensembl" interface = "default" >
Expand Down
17 changes: 16 additions & 1 deletion docs/manual-curation/step2-manual-curation.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ the filtered selection.
* 2.2.2 Determine if the mapping in "Replacement mapping" is suitable, if not find a new term to use as mapping
* 2.3 **Exact synonym matches**
* 2.3.1 Remove "Blank" from "Exact synonym matches" column
* 2.3.2 Determine if the mapping is suitable, if not find a new term to use as mapping
* 2.3.2 Determine if the mapping is suitable, if not find a new term to use as mapping.
See [below](#notes-on-exact-synonym-matches) for more details.
3. **Low-confidence mappings or unmapped terms**
* 3.1 Set the "Status" column to only include "Blank" entries
* 3.2 Look for suitable mappings from the "All other mappings" columns, or perform your own searches
Expand Down Expand Up @@ -114,6 +115,20 @@ at the top. Any comments will become available in the "Notes" field within the n
Comments from previous iterations that need to be kept for subsequent ones should be copy/pasted from the "Notes" to
the "Comments" cell.

### Notes on exact synonym matches

Terms listed as exact synonyms are not always accurate so they need to be checked one by one.

One case to look for is when the exact match can be imported (yellow cell in the "Exact match" column) but an exact
synonym match exists and is in EFO already (green cell in the "Exact synonym match" column). Here it is likely that EFO
has already made the decision to not import the new term. We should double-check that the synonym does mean the same
thing as the label, and if it does use the existing EFO term with synonym match over the imported exact match.

An example is "multiple myeloma", an exact match for http://purl.obolibrary.org/obo/HP_0006775 which would need
to be imported. However it is marked as an exact synonym for "plasma cell myeloma" http://purl.obolibrary.org/obo/MONDO_0009693
which is already in EFO. In this case the synonym is accurate and so should be used directly rather than importing a new
term.

### Note on multiple mappings

Sometimes the source string contains two or more traits. In this case it is necessary to map that string to two or more
Expand Down
2 changes: 0 additions & 2 deletions docs/manual-curation/step3-export-results.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ nextflow run ${CODE_ROOT}/pipelines/export_curation_spreadsheet.nf \
-resume
```

## Check and correct known problematic mappings
There is a [spreadsheet](https://docs.google.com/spreadsheets/d/1m4ld3y3Pfust5JSOJOX9ZmImRCKRGi-fGYj_dExoGj8/edit) which was created to track trait-to-ontology mappings which were especially problematic in the past to users of Open Targets platform. Prior to running subsequent steps, make sure that all traits mentioned in that spreadsheet are mapped to the correct ontology terms in `${BATCH_ROOT_BASE}/manual_curation/latest_mappings.tsv`.

## Submit feedback to EFO
Tables for IMPORT and NEW terms will be created by curators during [step 2](step2-manual-curation.md).
Expand Down
2 changes: 1 addition & 1 deletion tests/output_generation/test_consequence_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ def test_repeat_expansion_so_term():

def test_get_so_accession_dict():
results = get_so_accession_dict(page_size=100)
assert len(results) == 232
assert len(results) == 237
7 changes: 3 additions & 4 deletions tests/trait_mapping/test_trait_processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ def test_with_clinvar_xrefs(self):
trait = Trait('frontotemporal lobar degeneration with tdp43 inclusions, tardbp-related', None, None, xrefs)
processed_trait = self.run_process_trait(trait)
assert not processed_trait.is_finished
assert len(processed_trait.candidate_mappings) == 2
for mapping in processed_trait.candidate_mappings:
if isinstance(mapping, ClinVarXrefMapping):
assert mapping.uri == xrefs[0]
clinvar_xref_candidates = [m for m in processed_trait.candidate_mappings if isinstance(m, ClinVarXrefMapping)]
assert len(clinvar_xref_candidates) == 1
assert clinvar_xref_candidates[0].uri == xrefs[0]
Loading