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

🚚 Rename .bionty to .public #335

Merged
merged 1 commit into from
Jan 9, 2024
Merged
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
16 changes: 8 additions & 8 deletions lnschema_core/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ def standardize(
return_mapper: bool = False,
case_sensitive: bool = False,
mute: bool = False,
bionty_aware: bool = True,
public_aware: bool = True,
keep: Literal["first", "last", False] = "first",
synonyms_field: str = "synonyms",
**kwargs,
Expand All @@ -210,7 +210,7 @@ def standardize(
return_mapper: If `True`, returns `{input_value: standardized_name}`.
case_sensitive: Whether the mapping is case sensitive.
mute: Mute logging.
bionty_aware: Whether to standardize from Bionty reference. Defaults to `True` for Bionty registries.
public_aware: Whether to standardize from Bionty reference. Defaults to `True` for Bionty registries.
keep: When a synonym maps to multiple names, determines which duplicates to mark as `pd.DataFrame.duplicated`:
- `"first"`: returns the first mapped standardized name
- `"last"`: returns the last mapped standardized name
Expand Down Expand Up @@ -286,7 +286,7 @@ def add_synonym(

Examples:
>>> import lnschema_bionty as lb
>>> lb.CellType.from_bionty(name="T cell").save()
>>> lb.CellType.from_public(name="T cell").save()
>>> lookup = lb.CellType.lookup()
>>> record = lookup.t_cell
>>> record.synonyms
Expand All @@ -309,7 +309,7 @@ def remove_synonym(self, synonym: Union[str, ListLike]):

Examples:
>>> import lnschema_bionty as lb
>>> lb.CellType.from_bionty(name="T cell").save()
>>> lb.CellType.from_public(name="T cell").save()
>>> lookup = lb.CellType.lookup()
>>> record = lookup.t_cell
>>> record.synonyms
Expand All @@ -331,7 +331,7 @@ def set_abbr(self, value: str):

Examples:
>>> import lnschema_bionty as lb
>>> lb.ExperimentalFactor.from_bionty(name="single-cell RNA sequencing").save()
>>> lb.ExperimentalFactor.from_public(name="single-cell RNA sequencing").save()
>>> scrna = lb.ExperimentalFactor.filter(name="single-cell RNA sequencing").one()
>>> scrna.abbr
None
Expand Down Expand Up @@ -374,7 +374,7 @@ def view_parents(

Examples:
>>> import lnschema_bionty as lb
>>> lb.Tissue.from_bionty(name="subsegmental bronchus").save()
>>> lb.Tissue.from_public(name="subsegmental bronchus").save()
>>> record = lb.Tissue.filter(name="respiratory tube").one()
>>> record.view_parents()
>>> tissue.view_parents(with_children=True)
Expand Down Expand Up @@ -426,7 +426,7 @@ def from_values(cls, values: ListLike, field: Optional[StrField] = None, **kwarg
... type="pipeline", version="1")
>>> pipelines

Bulk create records from bionty:
Bulk create records from public reference:

>>> import lnschema_bionty as lb
>>> records = lb.CellType.from_values(["T cell", "B cell"], field="name")
Expand Down Expand Up @@ -456,7 +456,7 @@ def lookup(
Examples:
>>> import lnschema_bionty as lb
>>> lb.settings.organism = "human"
>>> lb.Gene.from_bionty(symbol="ADGB-DT").save()
>>> lb.Gene.from_public(symbol="ADGB-DT").save()
>>> lookup = lb.Gene.lookup()
>>> lookup.adgb_dt
>>> lookup_dict = lookup.dict()
Expand Down
Loading