Skip to content

Commit 1362bd0

Browse files
committed
make all _id params int instead of str
1 parent 536e7d3 commit 1362bd0

24 files changed

+86
-83
lines changed

chado/expression/__init__.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,19 @@ def get_biomaterials(self, provider_id="", biomaterial_id="", organism_id="", bi
2828
"""
2929
List biomaterials in the database
3030
31-
:type organism_id: str
31+
:type organism_id: int
3232
:param organism_id: Limit query to the selected organism
3333
34-
:type biomaterial_id: str
34+
:type biomaterial_id: int
3535
:param biomaterial_id: Limit query to the selected biomaterial id
3636
37-
:type provider_id: str
37+
:type provider_id: int
3838
:param provider_id: Limit query to the selected provider
3939
4040
:type biomaterial_name: str
4141
:param biomaterial_name: Limit query to the selected biomaterial name
4242
43-
:type analysis_id: str
43+
:type analysis_id: int
4444
:param analysis_id: Limit query to the selected analysis_id
4545
4646
:rtype: list
@@ -87,7 +87,7 @@ def add_biomaterial(self, biomaterial_name, organism_id,
8787
:type biomaterial_name: str
8888
:param biomaterial_name: Biomaterial name
8989
90-
:type organism_id: str
90+
:type organism_id: int
9191
:param organism_id: The id of the associated organism
9292
9393
:type description: str
@@ -157,10 +157,10 @@ def add_expression(self, organism_id, analysis_id, file_path, separator="\t", un
157157
"""
158158
Add an expression matrix file to the database
159159
160-
:type organism_id: str
160+
:type organism_id: int
161161
:param organism_id: The id of the associated organism
162162
163-
:type analysis_id: str
163+
:type analysis_id: int
164164
:param analysis_id: The id of the associated analysis
165165
166166
:type file_path: str
@@ -226,10 +226,10 @@ def delete_biomaterials(self, names=None, ids=None, organism_id="", analysis_id=
226226
:type ids: str
227227
:param ids: JSON list of biomaterial ids to delete.
228228
229-
:type organism_id: str
229+
:type organism_id: int
230230
:param organism_id: Delete all biomaterial associated with this organism id.
231231
232-
:type analysis_id: str
232+
:type analysis_id: int
233233
:param analysis_id: Delete all biomaterial associated with this analysis id.
234234
235235
:rtype: str
@@ -623,7 +623,7 @@ def _expression_create_biomaterial_structure(self, biomaterial, organism_id, ana
623623
channel_id = self._create_generic_channel()
624624
self._create_assay_biomaterial(assay_id, biomaterial_id, channel_id)
625625
# Try to add the unit to cvterm list
626-
if(unit):
626+
if (unit):
627627
try:
628628
cvterm_id = self.ci.get_cvterm_id('unit_of_measure', 'sep')
629629
except chado.RecordNotFoundError:

chado/feature/__init__.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@ def get_features(self, organism_id=None, analysis_id=None, name=None, uniquename
4343
"""
4444
Get all or some features
4545
46-
:type organism_id: str
46+
:type organism_id: int
4747
:param organism_id: organism_id filter
4848
49-
:type analysis_id: str
49+
:type analysis_id: int
5050
:param analysis_id: analysis_id filter
5151
5252
:type name: str
@@ -94,7 +94,7 @@ def get_feature_cvterms(self, feature_id):
9494
"""
9595
Get cvterms associated with a feature
9696
97-
:type feature_id: str
97+
:type feature_id: int
9898
:param feature_id: Id of the feature
9999
100100
:rtype: list
@@ -128,7 +128,7 @@ def get_feature_analyses(self, feature_id):
128128
"""
129129
Get analyses associated with a feature
130130
131-
:type feature_id: str
131+
:type feature_id: int
132132
:param feature_id: Id of the feature
133133
134134
:rtype: list
@@ -190,10 +190,10 @@ def delete_features(self, organism_id=None, analysis_id=None, name=None, uniquen
190190
"""
191191
Get all or some features
192192
193-
:type organism_id: str
193+
:type organism_id: int
194194
:param organism_id: organism_id filter
195195
196-
:type analysis_id: str
196+
:type analysis_id: int
197197
:param analysis_id: analysis_id filter
198198
199199
:type name: str

chado/load/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def blast(self, analysis_id, organism_id, input, blastdb=None, blastdb_id=None,
5252
:type blastdb: str
5353
:param blastdb: Name of the database blasted against (must be in the Chado db table)
5454
55-
:type blastdb_id: str
55+
:type blastdb_id: int
5656
:param blastdb_id: ID of the database blasted against (must be in the Chado db table)
5757
5858
:type query_type: str

chakin/commands/expression/add_biomaterial.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
@click.command('add_biomaterial')
77
@click.argument("biomaterial_name", type=str)
8-
@click.argument("organism_id", type=str)
8+
@click.argument("organism_id", type=int)
99
@click.option(
1010
"--description",
1111
help="Description of the biomaterial",

chakin/commands/expression/add_expression.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55

66
@click.command('add_expression')
7-
@click.argument("organism_id", type=str)
8-
@click.argument("analysis_id", type=str)
7+
@click.argument("organism_id", type=int)
8+
@click.argument("analysis_id", type=int)
99
@click.argument("file_path", type=str)
1010
@click.option(
1111
"--separator",

chakin/commands/expression/delete_biomaterials.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@
1717
@click.option(
1818
"--organism_id",
1919
help="Delete all biomaterial associated with this organism id.",
20-
type=str
20+
type=int
2121
)
2222
@click.option(
2323
"--analysis_id",
2424
help="Delete all biomaterial associated with this analysis id.",
25-
type=str
25+
type=int
2626
)
2727
@pass_context
2828
@custom_exception

chakin/commands/expression/get_biomaterials.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,17 @@
77
@click.option(
88
"--provider_id",
99
help="Limit query to the selected provider",
10-
type=str
10+
type=int
1111
)
1212
@click.option(
1313
"--biomaterial_id",
1414
help="Limit query to the selected biomaterial id",
15-
type=str
15+
type=int
1616
)
1717
@click.option(
1818
"--organism_id",
1919
help="Limit query to the selected organism",
20-
type=str
20+
type=int
2121
)
2222
@click.option(
2323
"--biomaterial_name",
@@ -27,7 +27,7 @@
2727
@click.option(
2828
"--analysis_id",
2929
help="Limit query to the selected analysis_id",
30-
type=str
30+
type=int
3131
)
3232
@pass_context
3333
@custom_exception

chakin/commands/feature/delete_features.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
@click.option(
88
"--organism_id",
99
help="organism_id filter",
10-
type=str
10+
type=int
1111
)
1212
@click.option(
1313
"--analysis_id",
1414
help="analysis_id filter",
15-
type=str
15+
type=int
1616
)
1717
@click.option(
1818
"--name",

chakin/commands/feature/get_feature_analyses.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55

66
@click.command('get_feature_analyses')
7-
@click.argument("feature_id", type=str)
7+
@click.argument("feature_id", type=int)
88
@pass_context
99
@custom_exception
1010
@list_output

chakin/commands/feature/get_feature_cvterms.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55

66
@click.command('get_feature_cvterms')
7-
@click.argument("feature_id", type=str)
7+
@click.argument("feature_id", type=int)
88
@pass_context
99
@custom_exception
1010
@list_output

0 commit comments

Comments
 (0)