summaryrefslogtreecommitdiff
path: root/python-bioclients.spec
blob: 2bb1b71f0ebe4d759eb750f5157fa3385576abfe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
%global _empty_manifest_terminate_build 0
Name:		python-BioClients
Version:	0.2.11
Release:	1
Summary:	Clients for online biomedical resources, usually REST APIs.
License:	MIT License
URL:		https://github.com/jeremyjyang/BioClients
Source0:	https://mirrors.nju.edu.cn/pypi/web/packages/5b/3b/d8e72d59166c43ba184fb4ea3d040a6b5b0b6408d88e2e232c882aa53d92/BioClients-0.2.11.tar.gz
BuildArch:	noarch


%description
# `BioClients` <img align="right" src="doc/images/BioClients_logo.png" height="120" alt="BioClients logo">

Python package for access to online biomedical resources,
usually via REST APIs. Modules generally include
`Client.py` for command-line use and `Utils.py` for
integration into other code. With the advent of HTTP web services,
first SOAP/XML and then mostly REST/JSON, many online APIs
require very similar methods for data search, requests
and transforms into usable formats, often TSV.

## Availability and installation

Source at <https://github.com/jeremyjyang/BioClients>;
releases available via `pypi.org`:
<https://pypi.org/project/BioClients/>
(`pip3 install BioClients`).

However, current development snapshot recommended.

___(First download or clone.)___
```
$ cd BioClients
$ python3 setup.py install
```

## Dependencies

* Python 3.7+
* Python packages: `pandas`, `requests`, `urllib`, `json`, `xml`, `yaml`, `psycopg2`, `tqdm`, etc.

## Modules

 [__Allen__](doc/allen.md) &#8226; [__AMP-T2D__](doc/amp__t2d.md) &#8226; [__BindingDb__](doc/bindingdb.md) &#8226; [__BioGrid__](doc/biogrid.md) &#8226; [__Bioregistry__](doc/bioregistry.md) &#8226; [__BRENDA__](doc/brenda.md) &#8226; [__CAS__](doc/cas.md) &#8226; [__CDC__](doc/cdc.md) &#8226; [__CFDE__](doc/cfde.md) &#8226; [__Chem2Bio2RDF__](doc/chem2bio2rdf.md) &#8226; [__ChEBI__](doc/chebi.md) &#8226; [__ChEMBL__](doc/chembl.md) &#8226; [__ChemIdPlus__](doc/chemidplus.md) &#8226; [__ClinicalTrials.gov__](doc/clinicaltrials.md) &#8226; [__Disease Ontology__](doc/diseaseontology.md) &#8226; [__DisGeNet__](doc/disgenet.md) &#8226; [__DNorm__](doc/dnorm.md) &#8226; [__DrugCentral__](doc/drugcentral.md) &#8226; [__EMBL-EBI__](doc/emblebi.md) &#8226; [__EnsEMBL__](doc/ensembl.md) &#8226; [__FDA__](doc/fda.md) &#8226; [__Gene Ontology__](doc/geneontology.md) &#8226; [__GTEx__](doc/gtex.md) &#8226; [__GWAS Catalog__](doc/gwascatalog.md) &#8226; [__HUGO__](doc/hugo.md) &#8226; [__HumanBase__](doc/humanbase.md) &#8226; [__iCite__](doc/icite.md) &#8226; [__IDG__](doc/idg.md) &#8226; [__JensenLab__](doc/jensenlab.md) &#8226; [__LINCS__](doc/lincs.md) &#8226; [__MaayanLab__](doc/maayanlab.md) &#8226; [__Medline__](doc/medline.md) &#8226; [__MeSH__](doc/mesh.md) &#8226; [__MONARCH__](doc/monarch.md) &#8226; [__MyGene__](doc/mygene.md) &#8226; [__NCBO__](doc/ncbo.md) &#8226; [__NCATS__](doc/ncats.md) &#8226; [__OMIM__](doc/omim.md) &#8226; [__Open Targets__](doc/opentargets.md) &#8226; [__Panther__](doc/panther.md) &#8226; [__PDB__](doc/pdb.md) &#8226; [__PubChem__](doc/pubchem.md) &#8226; [__PubMed__](doc/pubmed.md) &#8226; [__PubTator__](doc/pubtator.md) &#8226; [__Reactome__](doc/reactome.md) &#8226; [__RXNorm__](doc/rxnorm.md) &#8226; [__STRINGDB__](doc/stringdb.md) &#8226; [__TCGA__](doc/tcga.md) &#8226; [__UMLS__](doc/umls.md) &#8226; [__UniProt__](doc/uniprot.md) &#8226; [__Wikidata__](doc/wikidata.md) &#8226; [__WikiPathways__](doc/wikipathways.md) 

Miscellaneous utilities: [__UTIL__](doc/util.md) 

## Usage Example

```
$ python3 -m BioClients.pubchem.Client -h
```

## Design pattern

Generally each module includes command-line app `Client.py` which calls 
functions in a corresponding `Utils.py`, providing all capabilities
by import of the module. Command-line apps not API clients are generally 
named `App.py`. Functions can write to an output file
or return a Pandas dataframe (if output file unspecified).

## Data structures and formats, XML, JSON, and TSV

BioClients is designed to be simple and practical, and XML, JSON
and TSV are likewise simple in many respects, yet a great deal
of conceptual and technological progress is reflected. XML and JSON
can represent arbitrarily complex data objects, comprised of nested lists,
dictionaries, and trees of primary types. TSV represents tables of
rows and columns, related by common keys, reflecting the development
of SQL and relational databases. Transforming JSON to TSV, as these
clients generally do, projects data objects to tables useful for many
applications (e.g. machine learning).




%package -n python3-BioClients
Summary:	Clients for online biomedical resources, usually REST APIs.
Provides:	python-BioClients
BuildRequires:	python3-devel
BuildRequires:	python3-setuptools
BuildRequires:	python3-pip
%description -n python3-BioClients
# `BioClients` <img align="right" src="doc/images/BioClients_logo.png" height="120" alt="BioClients logo">

Python package for access to online biomedical resources,
usually via REST APIs. Modules generally include
`Client.py` for command-line use and `Utils.py` for
integration into other code. With the advent of HTTP web services,
first SOAP/XML and then mostly REST/JSON, many online APIs
require very similar methods for data search, requests
and transforms into usable formats, often TSV.

## Availability and installation

Source at <https://github.com/jeremyjyang/BioClients>;
releases available via `pypi.org`:
<https://pypi.org/project/BioClients/>
(`pip3 install BioClients`).

However, current development snapshot recommended.

___(First download or clone.)___
```
$ cd BioClients
$ python3 setup.py install
```

## Dependencies

* Python 3.7+
* Python packages: `pandas`, `requests`, `urllib`, `json`, `xml`, `yaml`, `psycopg2`, `tqdm`, etc.

## Modules

 [__Allen__](doc/allen.md) &#8226; [__AMP-T2D__](doc/amp__t2d.md) &#8226; [__BindingDb__](doc/bindingdb.md) &#8226; [__BioGrid__](doc/biogrid.md) &#8226; [__Bioregistry__](doc/bioregistry.md) &#8226; [__BRENDA__](doc/brenda.md) &#8226; [__CAS__](doc/cas.md) &#8226; [__CDC__](doc/cdc.md) &#8226; [__CFDE__](doc/cfde.md) &#8226; [__Chem2Bio2RDF__](doc/chem2bio2rdf.md) &#8226; [__ChEBI__](doc/chebi.md) &#8226; [__ChEMBL__](doc/chembl.md) &#8226; [__ChemIdPlus__](doc/chemidplus.md) &#8226; [__ClinicalTrials.gov__](doc/clinicaltrials.md) &#8226; [__Disease Ontology__](doc/diseaseontology.md) &#8226; [__DisGeNet__](doc/disgenet.md) &#8226; [__DNorm__](doc/dnorm.md) &#8226; [__DrugCentral__](doc/drugcentral.md) &#8226; [__EMBL-EBI__](doc/emblebi.md) &#8226; [__EnsEMBL__](doc/ensembl.md) &#8226; [__FDA__](doc/fda.md) &#8226; [__Gene Ontology__](doc/geneontology.md) &#8226; [__GTEx__](doc/gtex.md) &#8226; [__GWAS Catalog__](doc/gwascatalog.md) &#8226; [__HUGO__](doc/hugo.md) &#8226; [__HumanBase__](doc/humanbase.md) &#8226; [__iCite__](doc/icite.md) &#8226; [__IDG__](doc/idg.md) &#8226; [__JensenLab__](doc/jensenlab.md) &#8226; [__LINCS__](doc/lincs.md) &#8226; [__MaayanLab__](doc/maayanlab.md) &#8226; [__Medline__](doc/medline.md) &#8226; [__MeSH__](doc/mesh.md) &#8226; [__MONARCH__](doc/monarch.md) &#8226; [__MyGene__](doc/mygene.md) &#8226; [__NCBO__](doc/ncbo.md) &#8226; [__NCATS__](doc/ncats.md) &#8226; [__OMIM__](doc/omim.md) &#8226; [__Open Targets__](doc/opentargets.md) &#8226; [__Panther__](doc/panther.md) &#8226; [__PDB__](doc/pdb.md) &#8226; [__PubChem__](doc/pubchem.md) &#8226; [__PubMed__](doc/pubmed.md) &#8226; [__PubTator__](doc/pubtator.md) &#8226; [__Reactome__](doc/reactome.md) &#8226; [__RXNorm__](doc/rxnorm.md) &#8226; [__STRINGDB__](doc/stringdb.md) &#8226; [__TCGA__](doc/tcga.md) &#8226; [__UMLS__](doc/umls.md) &#8226; [__UniProt__](doc/uniprot.md) &#8226; [__Wikidata__](doc/wikidata.md) &#8226; [__WikiPathways__](doc/wikipathways.md) 

Miscellaneous utilities: [__UTIL__](doc/util.md) 

## Usage Example

```
$ python3 -m BioClients.pubchem.Client -h
```

## Design pattern

Generally each module includes command-line app `Client.py` which calls 
functions in a corresponding `Utils.py`, providing all capabilities
by import of the module. Command-line apps not API clients are generally 
named `App.py`. Functions can write to an output file
or return a Pandas dataframe (if output file unspecified).

## Data structures and formats, XML, JSON, and TSV

BioClients is designed to be simple and practical, and XML, JSON
and TSV are likewise simple in many respects, yet a great deal
of conceptual and technological progress is reflected. XML and JSON
can represent arbitrarily complex data objects, comprised of nested lists,
dictionaries, and trees of primary types. TSV represents tables of
rows and columns, related by common keys, reflecting the development
of SQL and relational databases. Transforming JSON to TSV, as these
clients generally do, projects data objects to tables useful for many
applications (e.g. machine learning).




%package help
Summary:	Development documents and examples for BioClients
Provides:	python3-BioClients-doc
%description help
# `BioClients` <img align="right" src="doc/images/BioClients_logo.png" height="120" alt="BioClients logo">

Python package for access to online biomedical resources,
usually via REST APIs. Modules generally include
`Client.py` for command-line use and `Utils.py` for
integration into other code. With the advent of HTTP web services,
first SOAP/XML and then mostly REST/JSON, many online APIs
require very similar methods for data search, requests
and transforms into usable formats, often TSV.

## Availability and installation

Source at <https://github.com/jeremyjyang/BioClients>;
releases available via `pypi.org`:
<https://pypi.org/project/BioClients/>
(`pip3 install BioClients`).

However, current development snapshot recommended.

___(First download or clone.)___
```
$ cd BioClients
$ python3 setup.py install
```

## Dependencies

* Python 3.7+
* Python packages: `pandas`, `requests`, `urllib`, `json`, `xml`, `yaml`, `psycopg2`, `tqdm`, etc.

## Modules

 [__Allen__](doc/allen.md) &#8226; [__AMP-T2D__](doc/amp__t2d.md) &#8226; [__BindingDb__](doc/bindingdb.md) &#8226; [__BioGrid__](doc/biogrid.md) &#8226; [__Bioregistry__](doc/bioregistry.md) &#8226; [__BRENDA__](doc/brenda.md) &#8226; [__CAS__](doc/cas.md) &#8226; [__CDC__](doc/cdc.md) &#8226; [__CFDE__](doc/cfde.md) &#8226; [__Chem2Bio2RDF__](doc/chem2bio2rdf.md) &#8226; [__ChEBI__](doc/chebi.md) &#8226; [__ChEMBL__](doc/chembl.md) &#8226; [__ChemIdPlus__](doc/chemidplus.md) &#8226; [__ClinicalTrials.gov__](doc/clinicaltrials.md) &#8226; [__Disease Ontology__](doc/diseaseontology.md) &#8226; [__DisGeNet__](doc/disgenet.md) &#8226; [__DNorm__](doc/dnorm.md) &#8226; [__DrugCentral__](doc/drugcentral.md) &#8226; [__EMBL-EBI__](doc/emblebi.md) &#8226; [__EnsEMBL__](doc/ensembl.md) &#8226; [__FDA__](doc/fda.md) &#8226; [__Gene Ontology__](doc/geneontology.md) &#8226; [__GTEx__](doc/gtex.md) &#8226; [__GWAS Catalog__](doc/gwascatalog.md) &#8226; [__HUGO__](doc/hugo.md) &#8226; [__HumanBase__](doc/humanbase.md) &#8226; [__iCite__](doc/icite.md) &#8226; [__IDG__](doc/idg.md) &#8226; [__JensenLab__](doc/jensenlab.md) &#8226; [__LINCS__](doc/lincs.md) &#8226; [__MaayanLab__](doc/maayanlab.md) &#8226; [__Medline__](doc/medline.md) &#8226; [__MeSH__](doc/mesh.md) &#8226; [__MONARCH__](doc/monarch.md) &#8226; [__MyGene__](doc/mygene.md) &#8226; [__NCBO__](doc/ncbo.md) &#8226; [__NCATS__](doc/ncats.md) &#8226; [__OMIM__](doc/omim.md) &#8226; [__Open Targets__](doc/opentargets.md) &#8226; [__Panther__](doc/panther.md) &#8226; [__PDB__](doc/pdb.md) &#8226; [__PubChem__](doc/pubchem.md) &#8226; [__PubMed__](doc/pubmed.md) &#8226; [__PubTator__](doc/pubtator.md) &#8226; [__Reactome__](doc/reactome.md) &#8226; [__RXNorm__](doc/rxnorm.md) &#8226; [__STRINGDB__](doc/stringdb.md) &#8226; [__TCGA__](doc/tcga.md) &#8226; [__UMLS__](doc/umls.md) &#8226; [__UniProt__](doc/uniprot.md) &#8226; [__Wikidata__](doc/wikidata.md) &#8226; [__WikiPathways__](doc/wikipathways.md) 

Miscellaneous utilities: [__UTIL__](doc/util.md) 

## Usage Example

```
$ python3 -m BioClients.pubchem.Client -h
```

## Design pattern

Generally each module includes command-line app `Client.py` which calls 
functions in a corresponding `Utils.py`, providing all capabilities
by import of the module. Command-line apps not API clients are generally 
named `App.py`. Functions can write to an output file
or return a Pandas dataframe (if output file unspecified).

## Data structures and formats, XML, JSON, and TSV

BioClients is designed to be simple and practical, and XML, JSON
and TSV are likewise simple in many respects, yet a great deal
of conceptual and technological progress is reflected. XML and JSON
can represent arbitrarily complex data objects, comprised of nested lists,
dictionaries, and trees of primary types. TSV represents tables of
rows and columns, related by common keys, reflecting the development
of SQL and relational databases. Transforming JSON to TSV, as these
clients generally do, projects data objects to tables useful for many
applications (e.g. machine learning).




%prep
%autosetup -n BioClients-0.2.11

%build
%py3_build

%install
%py3_install
install -d -m755 %{buildroot}/%{_pkgdocdir}
if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
pushd %{buildroot}
if [ -d usr/lib ]; then
	find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/lib64 ]; then
	find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/bin ]; then
	find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/sbin ]; then
	find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
fi
touch doclist.lst
if [ -d usr/share/man ]; then
	find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
fi
popd
mv %{buildroot}/filelist.lst .
mv %{buildroot}/doclist.lst .

%files -n python3-BioClients -f filelist.lst
%dir %{python3_sitelib}/*

%files help -f doclist.lst
%{_docdir}/*

%changelog
* Mon May 15 2023 Python_Bot <Python_Bot@openeuler.org> - 0.2.11-1
- Package Spec generated