Skip to content

Commit

Permalink
Merge pull request #37 from multimeric/regenerate-2024-08
Browse files Browse the repository at this point in the history
Regenerate 2024-08
  • Loading branch information
multimeric authored Aug 14, 2024
2 parents 736dd25 + 5e6d806 commit 2ba4238
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 20 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@

## Changelog

### 1.4.0

#### Changed

* Auto-generated type definitions for the datasets have been regenerated [[#37](https://github.com/multimeric/Unipressed/pull/37)]. This pulls upstream changes from Uniprot. For a full list of changes [view this commit diff](https://github.com/multimeric/Unipressed/pull/31/commits/7e620c46175b6ec03e073fc78444a43e96821c31).
* Uniref's `created` `query` parameter has been replaced by `last_modified`
* UniprotKB has lost various `fields`: `xref_genevisible`, `xref_dosac-cobs-2dpage"`, `xref_swiss-2dpage`, `xref_ucd-2dpage`, `xref_world-2dpage`, `xref_epd`, `xref_maxqb`, `xref_ko` and `xref_genevisible`

### 1.3.0

#### Changed
Expand Down
1 change: 1 addition & 0 deletions test/test_dataset/test_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ def test_main_example():
).each_record():
assert isinstance(record, dict)
assert set(record.keys()) == {
"extraAttributes",
"primaryAccession",
"genes",
"sequence",
Expand Down
2 changes: 1 addition & 1 deletion test/test_id_mapping/test_id_mapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def test_gene_names():
)
# At this point it might be already finished
assert request.get_status() in {"RUNNING", "FINISHED"}
sleep(1)
sleep(5)
# At this point it should definitely be finished
assert request.get_status() == "FINISHED"
for result in request.each_result():
Expand Down
2 changes: 2 additions & 0 deletions unipressed/dataset/generated_types/uniparc.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ class UniparcQueryDict(TypedDict):
"Feature ID\ne.g. IPR004251"
proteomecomponent: NotRequired[str]
"Proteome Component\ne.g. chromosome"
organism_id: NotRequired[int]
"Organism ID\ne.g. 10254"


UniparcQuery: TypeAlias = Union[UniparcQueryDict, str]
Expand Down
18 changes: 2 additions & 16 deletions unipressed/dataset/generated_types/uniprotkb.py
Original file line number Diff line number Diff line change
Expand Up @@ -728,7 +728,6 @@ class UniprotkbQueryDict(TypedDict):
UniprotkbProteinFamilygroup: TypeAlias = Literal[
"xref_allergome",
"xref_cazy",
"xref_clae",
"xref_esther",
"xref_imgt_gene-db",
"xref_merops",
Expand All @@ -755,19 +754,11 @@ class UniprotkbQueryDict(TypedDict):
"xref_alzforum", "xref_biomuta", "xref_dmdm", "xref_dbsnp"
]
UniprotkbTwodGel: TypeAlias = Literal[
"xref_compluyeast-2dpage",
"xref_dosac-cobs-2dpage",
"xref_ogp",
"xref_reproduction-2dpage",
"xref_swiss-2dpage",
"xref_ucd-2dpage",
"xref_world-2dpage",
"xref_compluyeast-2dpage", "xref_ogp", "xref_reproduction-2dpage"
]
UniprotkbProteomic: TypeAlias = Literal[
"xref_cptac",
"xref_epd",
"xref_massive",
"xref_maxqb",
"xref_pride",
"xref_paxdb",
"xref_peptideatlas",
Expand Down Expand Up @@ -841,7 +832,6 @@ class UniprotkbQueryDict(TypedDict):
"xref_genetree",
"xref_hogenom",
"xref_inparanoid",
"xref_ko",
"xref_oma",
"xref_orthodb",
"xref_phylomedb",
Expand Down Expand Up @@ -875,11 +865,7 @@ class UniprotkbQueryDict(TypedDict):
"xref_emind",
]
UniprotkbGeneExpression: TypeAlias = Literal[
"xref_bgee",
"xref_cleanex",
"xref_collectf",
"xref_expressionatlas",
"xref_genevisible",
"xref_bgee", "xref_cleanex", "xref_collectf", "xref_expressionatlas"
]
UniprotkbFamilyAndDomain: TypeAlias = Literal[
"xref_cdd",
Expand Down
6 changes: 3 additions & 3 deletions unipressed/dataset/generated_types/uniref.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class UnirefQueryDict(TypedDict):
]
]
"Sequence length\ne.g. [100 TO 300]"
created: NotRequired[
date_modified: NotRequired[
tuple[
Union[
date,
Expand All @@ -59,7 +59,7 @@ class UnirefQueryDict(TypedDict):
],
]
]
"Date published\ne.g. [2011-10-10 TO 2019-10-10]"
"Date of last modification\ne.g. [2011-10-10 TO 2019-10-10]"
uniprot_id: NotRequired[str]
"UniProtKB ID/AC\ne.g. sample uniprot id"
upi: NotRequired[str]
Expand All @@ -78,7 +78,7 @@ class UnirefQueryDict(TypedDict):
]
UnirefSequences: TypeAlias = Literal["identity", "length", "sequence"]
UnirefMiscellaneous: TypeAlias = Literal["types", "members", "count"]
UnirefDateOf: TypeAlias = Literal["created",]
UnirefDateOf: TypeAlias = Literal["date_modified",]
UnirefFields: TypeAlias = Literal[
UnirefNamesTaxonomy, UnirefSequences, UnirefMiscellaneous, UnirefDateOf
]

0 comments on commit 2ba4238

Please sign in to comment.