-
Notifications
You must be signed in to change notification settings - Fork 509
Expand file tree
/
Copy pathscuttle_addpercellqcmetrics.xml
More file actions
110 lines (101 loc) · 3.98 KB
/
scuttle_addpercellqcmetrics.xml
File metadata and controls
110 lines (101 loc) · 3.98 KB
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
<?xml version="1.0"?>
<tool id="scuttle_addpercellqcmetrics" name="Scuttle: Add per-cell QC metrics"
version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
<description>to a SingleCellExperiment object</description>
<macros>
<import>macros.xml</import>
</macros>
<expand macro="requirements"/>
<command detect_errors="exit_code"><![CDATA[
@CMD@
]]></command>
<configfiles>
<configfile name="script_file"><![CDATA[
@CMD_imports@
@CMD_read_inputs@
subsets <- list()
#for $s in $subsets_repeat
subsets[['${s.name}']] <- which(rownames(sce) %in% readLines('$s.feature_file'))
#end for
sce <- scuttle::addPerCellQCMetrics(
x = sce,
subsets = subsets,
assay.type = '$assay_type'
)
@CMD_loom_write_outputs@
]]></configfile>
</configfiles>
<inputs>
<expand macro="input_sce"/>
<param name="assay_type" type="text" value="counts"
label="Assay to use for QC computation"/>
<repeat name="subsets_repeat" title="Gene subset" min="0">
<param name="name" type="text" label="Subset name"
help="Short label, e.g. MT"/>
<param name="feature_file" type="data" format="txt"
label="Feature list"
help="Plain text file with one rowname per line, no header"/>
</repeat>
<expand macro="inputs_common_advanced"/>
</inputs>
<outputs>
<expand macro="output_sce"/>
</outputs>
<tests>
<test expect_num_outputs="2">
<!-- test1: no subsets -->
<param name="input_loom" location="https://zenodo.org/records/19665848/files/sce_with_mitochondrial_features.loom" ftype="loom"/>
<section name="advanced_common">
<param name="show_log" value="true"/>
</section>
<output name="hidden_output">
<assert_contents>
<has_text_matching expression="addPerCellQCMetrics"/>
</assert_contents>
</output>
<output name="output_loom" ftype="loom">
<assert_contents>
<has_size size="34822" delta="10"/>
</assert_contents>
</output>
</test>
<test expect_num_outputs="2">
<!-- test2: MT subset -->
<param name="input_loom" location="https://zenodo.org/records/19665848/files/sce_with_mitochondrial_features.loom" ftype="loom"/>
<repeat name="subsets_repeat">
<param name="name" value="MT"/>
<param name="feature_file" value="mitochondrial_gene_ids.txt" ftype="txt"/>
</repeat>
<section name="advanced_common">
<param name="show_log" value="true"/>
</section>
<output name="hidden_output">
<assert_contents>
<has_text_matching expression="addPerCellQCMetrics"/>
</assert_contents>
</output>
<output name="output_loom" ftype="loom">
<assert_contents>
<has_size size="45032" delta="10"/>
</assert_contents>
</output>
</test>
</tests>
<help><![CDATA[
**What it does**
Runs ``scuttle::addPerCellQCMetrics()`` on a ``SingleCellExperiment`` object
and returns the same object with new columns appended to ``colData``:
- ``sum`` – total counts per cell
- ``detected`` – number of detected features per cell
- ``subsets_<name>_sum``, ``subsets_<name>_detected``, ``subsets_<name>_percent``
for each user-defined gene subset (e.g. mitochondrial genes)
**Inputs**
- A ``SingleCellExperiment`` object saved as a loom file.
- Optionally, one or more named gene subsets, each defined by a plain text file
listing the rownames to include (one per line, no header).
**Outputs**
- The same ``SingleCellExperiment`` with QC columns added to ``colData``,
saved as a loom file.
]]></help>
<expand macro="citations"/>
</tool>