comparison edger-repenrich2.xml @ 1:6d59fbca2db4 draft

planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/main/tools/repenrich2 commit 4dd520dee5c3c0c526e8319a74c4890da032300f
author artbio
date Sat, 20 Apr 2024 14:46:12 +0000
parents
children
comparison
equal deleted inserted replaced
0:4905a332a094 1:6d59fbca2db4
1 <tool id="edger-repenrich2" name="edgeR-repenrich2" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
2 <description>Determines differentially expressed features from RepEnrich2 counts</description>
3 <macros>
4 <import>macros.xml</import>
5 </macros>
6 <expand macro="edgeR_requirements"/>
7 <stdio>
8 <regex match="Execution halted"
9 source="both"
10 level="fatal"
11 description="Execution halted." />
12 <regex match="Error in"
13 source="both"
14 level="fatal"
15 description="An undefined error occurred, please check your input carefully and contact your administrator." />
16 <regex match="Fatal error"
17 source="both"
18 level="fatal"
19 description="An undefined error occurred, please check your input carefully and contact your administrator." />
20 </stdio>
21 <version_command>
22 <![CDATA[
23 echo $(R --version | grep version | grep -v GNU)", edgeR version" $(R --vanilla --slave -e "library(edgeR) &&
24 cat(sessionInfo()\$otherPkgs\$edgeR\$Version)" 2> /dev/null | grep -v -i "WARNING: ")
25 ]]>
26 </version_command>
27 <command>
28 <![CDATA[
29 #import json
30 Rscript '${__tool_directory__}/edgeR_repenrich2.R'
31 --factorName '$factorName'
32
33 --levelNameA '$factorLevel_A'
34 #set $factorlevelsA = list()
35 #for $file in $countsFiles_A:
36 $factorlevelsA.append(str($file))
37 #end for
38 $factorlevelsA.reverse()
39 --levelAfiles '#echo json.dumps(factorlevelsA)#'
40
41 --levelNameB '$factorLevel_B'
42 #set $factorlevelsB = list()
43 #for $file in $countsFiles_B:
44 $factorlevelsB.append(str($file))
45 #end for
46 $factorlevelsB.reverse()
47 --levelBfiles '#echo json.dumps(factorlevelsB)#'
48
49 -o 'edger_out'
50
51 -p '$plots'
52 #if $normCounts:
53 -n '$counts_out'
54 #end if
55 -o '$edger_out'
56 ]]>
57 </command>
58 <inputs>
59 <param name="factorName" type="text" value="FactorName" label="Specify a factor name, e.g. genotype or age or drug_x"
60 help="Only letters, numbers and underscores will be retained in this field">
61 <sanitizer>
62 <valid initial="string.letters,string.digits"><add value="_" /></valid>
63 </sanitizer>
64 </param>
65 <param name="factorLevel_A" type="text" value="FactorLevel1" label="Specify a factor level, typical values could be 'mutant' or 'Drug_X'"
66 help="Only letters, numbers and underscores will be retained in this field">
67 <sanitizer>
68 <valid initial="string.letters,string.digits"><add value="_" /></valid>
69 </sanitizer>
70 </param>
71 <param name="countsFiles_A" type="data" format="tabular" multiple="true" label="Counts file(s)" help="Count files must have been generated by repenrich" />
72 <param name="factorLevel_B" type="text" value="FactorLevel2" label="Specify a factor level, typical values could be 'wildtype' or 'control'"
73 help="Only letters, numbers and underscores will be retained in this field">
74 <sanitizer>
75 <valid initial="string.letters,string.digits"><add value="_" /></valid>
76 </sanitizer>
77 </param>
78 <param name="countsFiles_B" type="data" format="tabular" multiple="true" label="Counts file(s)" help="Count files must have been generated by repenrich tool" />
79 <param name="normCounts" type="boolean" truevalue="1" falsevalue="0" checked="false"
80 label="Output normalized counts table" />
81 </inputs>
82 <outputs>
83 <data format="tabular" name="edger_out" label="edgeR: ${factorLevel_A} compared to ${factorLevel_B}">
84 <actions>
85 <action name="column_names" type="metadata" default="Tag,log2(FC),FDR,Class,Type" />
86 </actions>
87 </data>
88 <data format="pdf" name="plots" label="edgeR plots" />
89 <data format="tabular" name="counts_out" label="Normalized counts file">
90 <filter>normCounts == True</filter>
91 </data>
92 </outputs>
93 <tests>
94 <test expect_num_outputs="3">
95 <param name="factorName" value="Genotype"/>
96 <param name="factorLevel_A" value="Mutant"/>
97 <param name="countsFiles_A" value="355_fraction_counts.tab,356_fraction_counts.tab"/>
98 <param name="factorLevel_B" value="Wildtype"/>
99 <param name="countsFiles_B" value="353_fraction_counts.tab,354_fraction_counts.tab"/>
100 <param name="normCounts" value="True"/>
101 <output name="counts_out" file="Normalized_counts_file.tab"/>
102 <output name="plots" file="edgeR_plots.pdf"/>
103 <output name="edger_out" file="edgeR_result_file.tab"/>
104
105 </test>
106 </tests>
107 <help>
108 <![CDATA[
109 .. class:: infomark
110
111 **What it does**
112
113 Estimate Distance between samples (MDS) and Biological Coefficient Variation (BCV) in count
114 data from high-throughput sequencing assays and test for differential expression using edgeR_.
115
116 **Inputs**
117
118 edger-repenrich takes count tables generated by repenrich as inputs. A repenrich count table looks
119 like:
120
121 ============== ========== ========== ==========
122 LSU-rRNA_Dme rRNA rRNA 3659329
123 -------------- ---------- ---------- ----------
124 FW3_DM LINE Jockey 831
125 -------------- ---------- ---------- ----------
126 DMTOM1_LTR LTR Gypsy 1004
127 -------------- ---------- ---------- ----------
128 R1_DM LINE R1 7343
129 -------------- ---------- ---------- ----------
130 TAHRE LINE Jockey 4560
131 -------------- ---------- ---------- ----------
132 G4_DM LINE Jockey 3668
133 -------------- ---------- ---------- ----------
134 BS LINE Jockey 7296
135 -------------- ---------- ---------- ----------
136 Stalker2_I-int LTR Gypsy 12252
137 -------------- ---------- ---------- ----------
138 Stalker3_LTR LTR Gypsy 593
139 -------------- ---------- ---------- ----------
140 TABOR_I-int LTR Gypsy 3947
141 -------------- ---------- ---------- ----------
142 G7_DM LINE Jockey 162
143 -------------- ---------- ---------- ----------
144 BEL_I-int LTR Pao 23757
145 -------------- ---------- ---------- ----------
146 Gypsy6_I-int LTR Gypsy 7489
147 ============== ========== ========== ==========
148
149 Count tables must be generated for each sample individually. Here, edgeR_ is handling a
150 single factor (genotype, age, treatment, etc) that effect your experiment. This factor has
151 two levels/states (for instance, "wild-type" and "mutant". You need to select appropriate
152 count table from your history for each factor level.
153
154 The following table gives some examples of factors and their levels:
155
156 ========= ============== ===============
157 Factor Factorlevel1 Factorlevel2
158 --------- -------------- ---------------
159 Treatment Treated Untreated
160 --------- -------------- ---------------
161 Genotype Knockdown Wildtype
162 --------- -------------- ---------------
163 TimePoint Day4 Day1
164 --------- -------------- ---------------
165 Gender Female Male
166 ========= ============== ===============
167
168 *Note*: Output log2 fold changes are based on primary factor level 1 vs. factor level2.
169 Here the order of factor levels is important. For example, for the factor 'Treatment' given
170 in above table, edgeR computes fold changes of 'Treated' samples against 'Untreated',
171 i.e. the values correspond to up or down regulations of genes in Treated samples.
172
173 **Output**
174
175 edgeR_ generates a tabular file containing the different columns and results visualized in
176 a PDF:
177
178 ====== =============================================================================
179 Column Description
180 ------ -----------------------------------------------------------------------------
181 1 Tag (transposon element ID)
182 2 the logarithm (to basis 2) of the fold change (See the note in inputs section)
183 3 p value adjusted for multiple testing with the Benjamini-Hochberg procedure
184 which controls false discovery rate (FDR)
185 4 Class the transposon belongs to
186 5 Type the transposon belongs to
187 ====== =============================================================================
188
189 .. _edgeR: http://www.bioconductor.org/packages/release/bioc/html/edgeR.html
190 ]]>
191
192 **Note**: This edgeR_ wrapper was adapted from code available at
193 https://github.com/nskvir/RepEnrich
194
195 </help>
196 <citations>
197 <citation type="doi">10.1093/bioinformatics/btp616</citation>
198 </citations>
199 </tool>