Skip to content

Commit 536e7d3

Browse files
committed
rebuild
1 parent d5548ba commit 536e7d3

File tree

3 files changed

+53
-7
lines changed

3 files changed

+53
-7
lines changed

chakin/commands/expression/add_expression.py

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,36 @@
1919
help="The units associated with the loaded values (ie, FPKM, RPKM, raw counts)",
2020
type=str
2121
)
22+
@click.option(
23+
"--query_type",
24+
help="The feature type (e.g. 'gene', 'mRNA', 'polypeptide', 'contig') of the query. It must be a valid Sequence Ontology term.",
25+
default="mRNA",
26+
show_default=True,
27+
type=str
28+
)
29+
@click.option(
30+
"--match_on_name",
31+
help="Match features using their name instead of their uniquename",
32+
is_flag=True
33+
)
34+
@click.option(
35+
"--re_name",
36+
help="Regular expression to extract the feature name from the input file (first capturing group will be used).",
37+
type=str
38+
)
39+
@click.option(
40+
"--skip_missing",
41+
help="Skip lines with unknown features or GO id instead of aborting everything.",
42+
is_flag=True
43+
)
2244
@pass_context
2345
@custom_exception
2446
@str_output
25-
def cli(ctx, organism_id, analysis_id, file_path, separator=" ", unit=""):
47+
def cli(ctx, organism_id, analysis_id, file_path, separator=" ", unit="", query_type="mRNA", match_on_name=False, re_name="", skip_missing=False):
2648
"""Add an expression matrix file to the database
2749
2850
Output:
2951
3052
Number of expression data loaded
3153
"""
32-
return ctx.gi.expression.add_expression(organism_id, analysis_id, file_path, separator=separator, unit=unit)
54+
return ctx.gi.expression.add_expression(organism_id, analysis_id, file_path, separator=separator, unit=unit, query_type=query_type, match_on_name=match_on_name, re_name=re_name, skip_missing=skip_missing)

docs/commands/expression.rst

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,19 @@ Add an expression matrix file to the database
5454
**Options**::
5555

5656

57-
--separator TEXT Separating character in the matrix file (ex : ','). Default
58-
character is tab. [default: ]
59-
--unit TEXT The units associated with the loaded values (ie, FPKM, RPKM,
60-
raw counts)
61-
-h, --help Show this message and exit.
57+
--separator TEXT Separating character in the matrix file (ex : ','). Default
58+
character is tab. [default: ]
59+
--unit TEXT The units associated with the loaded values (ie, FPKM,
60+
RPKM, raw counts)
61+
--query_type TEXT The feature type (e.g. 'gene', 'mRNA', 'polypeptide',
62+
'contig') of the query. It must be a valid Sequence
63+
Ontology term. [default: mRNA]
64+
--match_on_name Match features using their name instead of their uniquename
65+
--re_name TEXT Regular expression to extract the feature name from the
66+
input file (first capturing group will be used).
67+
--skip_missing Skip lines with unknown features or GO id instead of
68+
aborting everything.
69+
-h, --help Show this message and exit.
6270
6371

6472
``delete_all_biomaterials`` command

galaxy/expression_add_expression.xml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,18 @@ chakin expression add_expression
1717
#if $unit:
1818
--unit '$unit'
1919
#end if
20+
#if $query_type:
21+
--query_type '$query_type'
22+
#end if
23+
#if $match_on_name:
24+
$match_on_name
25+
#end if
26+
#if $re_name:
27+
--re_name '$re_name'
28+
#end if
29+
#if $skip_missing:
30+
$skip_missing
31+
#end if
2032

2133
| jq -S . > $results
2234
</command>
@@ -29,6 +41,10 @@ chakin expression add_expression
2941
<!-- options -->
3042
<param name="separator" label="Separator" argument="separator" type="text" help="Separating character in the matrix file (ex : ','). Default character is tab." />
3143
<param name="unit" label="Unit" argument="unit" type="text" help="The units associated with the loaded values (ie, FPKM, RPKM, raw counts)" />
44+
<param name="query_type" label="Query Type" argument="query_type" type="text" help="The feature type (e.g. 'gene', 'mRNA', 'polypeptide', 'contig') of the query. It must be a valid Sequence Ontology term." />
45+
<param name="match_on_name" label="Match On Name" argument="match_on_name" type="boolean" truevalue="--match_on_name" falsevalue="" help="Match features using their name instead of their uniquename" />
46+
<param name="re_name" label="Re Name" argument="re_name" type="text" help="Regular expression to extract the feature name from the input file (first capturing group will be used)." />
47+
<param name="skip_missing" label="Skip Missing" argument="skip_missing" type="boolean" truevalue="--skip_missing" falsevalue="" help="Skip lines with unknown features or GO id instead of aborting everything." />
3248

3349
</inputs>
3450
<outputs>

0 commit comments

Comments
 (0)