Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

📝 Add symbol mapping FAQ reference to Gene #149

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
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
14 changes: 7 additions & 7 deletions bionty/base/_public_ontology.py
Original file line number Diff line number Diff line change
Expand Up @@ -473,14 +473,14 @@ def standardize(
return_mapper: `bool = False` If `True`, returns `{input_synonym1:
standardized_name1}`.
case_sensitive: `bool = False` Whether the mapping is case sensitive.
keep: `Literal["first", "last", False] = "first"` When a synonym maps to
multiple names, determines which duplicates to mark as
`pd.DataFrame.duplicated`
keep: {'first', 'last', False}, default 'first'.
When a synonym maps to multiple standardized values, determines
which duplicates to mark as `pandas.DataFrame.duplicated`.

- "first": returns the first mapped standardized value
- "last": returns the last mapped standardized value
- False: returns all mapped standardized value
mute: Whether to mute logging. Defaults to False.
Keep: Which standardized name to keep.
- "first": returns the first mapped standardized name
- "last": returns the last mapped standardized name
- `False`: returns all mapped standardized name
synonyms_field: `str = "synonyms"` A field containing the concatenated synonyms.

Returns:
Expand Down
3 changes: 3 additions & 0 deletions bionty/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -554,6 +554,9 @@ class Gene(BioRecord, TracksRun, TracksUpdates):
Bulk create Gene records via :meth:`~docs:lamindb.core.CanValidate.from_values`.
Map legacy ensembl IDs to current ensembl IDs using :meth:`bionty.base.Gene.map_legacy_ids`.

We discourage validating gene symbols and to work with unique identifiers such as ENSEMBL IDs instead.
For more details, see :doc:`docs:faq/symbol-mapping`.

Examples:
>>> record = bionty.Gene.from_source(symbol="TCF7", organism="human")
"""
Expand Down
Loading