pysec2pri 0.0.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
pysec2pri/__init__.py ADDED
@@ -0,0 +1,78 @@
1
+ """Secondary to primary identifier mapping.
2
+
3
+ This package provides tools for converting secondary (retired/withdrawn)
4
+ identifiers to primary (current) identifiers across various biological
5
+ databases including ChEBI, HMDB, HGNC, NCBI Gene, and UniProt.
6
+ """
7
+
8
+ from pysec2pri.api import (
9
+ generate_chebi,
10
+ generate_chebi_synonyms,
11
+ generate_hgnc,
12
+ generate_hgnc_primary_ids,
13
+ generate_hgnc_symbols,
14
+ generate_hmdb,
15
+ generate_hmdb_proteins,
16
+ generate_ncbi,
17
+ generate_ncbi_symbols,
18
+ generate_uniprot,
19
+ generate_wikidata,
20
+ generate_wikidata_symbols,
21
+ resolve_ids,
22
+ resolve_symbols,
23
+ write_json,
24
+ write_name2synonym,
25
+ write_output,
26
+ write_owl,
27
+ write_rdf,
28
+ write_sec2pri,
29
+ write_sssom,
30
+ write_symbol_sec2pri,
31
+ )
32
+ from pysec2pri.parsers.base import (
33
+ WITHDRAWN_ENTRY,
34
+ WITHDRAWN_ENTRY_LABEL,
35
+ IdMappingSet,
36
+ LabelMappingSet,
37
+ Sec2PriMappingSet,
38
+ )
39
+ from pysec2pri.update_ids import build_lookup, build_symbol_lookup, update_ids, update_symbols
40
+
41
+ __all__ = [
42
+ # Sentinel values
43
+ "WITHDRAWN_ENTRY",
44
+ "WITHDRAWN_ENTRY_LABEL",
45
+ # Mapping Set classes
46
+ "IdMappingSet",
47
+ "LabelMappingSet",
48
+ "Sec2PriMappingSet",
49
+ # ID resolution
50
+ "build_lookup",
51
+ "build_symbol_lookup",
52
+ # generate_* (download + parse in one call)
53
+ "generate_chebi",
54
+ "generate_chebi_synonyms",
55
+ "generate_hgnc",
56
+ "generate_hgnc_primary_ids",
57
+ "generate_hgnc_symbols",
58
+ "generate_hmdb",
59
+ "generate_hmdb_proteins",
60
+ "generate_ncbi",
61
+ "generate_ncbi_symbols",
62
+ "generate_uniprot",
63
+ "generate_wikidata",
64
+ "generate_wikidata_symbols",
65
+ "resolve_ids",
66
+ "resolve_symbols",
67
+ "update_ids",
68
+ "update_symbols",
69
+ # Export functions
70
+ "write_json",
71
+ "write_name2synonym",
72
+ "write_output",
73
+ "write_owl",
74
+ "write_rdf",
75
+ "write_sec2pri",
76
+ "write_sssom",
77
+ "write_symbol_sec2pri",
78
+ ]
pysec2pri/__main__.py ADDED
@@ -0,0 +1,12 @@
1
+ """Entrypoint module, in case you use `python -m pysec2pri`.
2
+
3
+ Why does this file exist, and why ``__main__``? For more info, read:
4
+
5
+ - https://www.python.org/dev/peps/pep-0338/
6
+ - https://docs.python.org/3/using/cmdline.html#cmdoption-m
7
+ """
8
+
9
+ from .cli import main
10
+
11
+ if __name__ == "__main__":
12
+ main()