comparison flowclr_sample_name.xml @ 0:fddd754b8bcb draft default tip

"planemo upload for repository https://github.com/AstraZeneca-Omics/immport-galaxy-tools/tree/develop/flowtools/flowclr_sample_name commit 0d94c83066ae8396ffa2821a6cb751ed471e7bf5"
author azomics
date Thu, 23 Jul 2020 07:50:53 -0400
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:fddd754b8bcb
1 <tool id="flclr_sample_name" name="Add sample information and merge" version="1.0+galaxy1" profile="18.01">
2 <description>a flow clustered or tabular text file collection.</description>
3 <requirements>
4 <requirement type="package" version="4.4">sed</requirement>
5 </requirements>
6 <stdio>
7 <exit_code range="1:" level="fatal" description="See stderr for more details." />
8 </stdio>
9 <command><![CDATA[
10 #set $first = $inputs[0]
11 head -n 1 '$first' | sed "s/\$/\t$header/" > '$output';
12
13 #if $sample_names
14 #set $identifiers = [ x.strip() for x in $sample_names.split(",") ]
15 #else
16 #set $identifiers = [ i.element_identifier for i in $inputs ]
17 #end if
18
19 #if len($identifiers) != len($inputs)
20 # echo "Error, number of file identifiers/samples doesn't match the number of files.";
21 # exit(1)
22 #end if
23
24 #for $i, $input in enumerate($inputs)
25 tail -n +2 '$input' | sed "s/\$/\t$identifiers[$i]/" >> '$output';
26 #end for#
27 ]]>
28 </command>
29 <inputs>
30 <param name="inputs" format="flowclr,tabular" type="data" multiple="true" min="2" label="Clustered flowtext or tabular file collection"/>
31 <param name="sample_names" type="text" label="Sample names" optional="true" help="Supply the sample names of each flowtext file in order of the flowtext files in the data collection, comma separated, to override the collection identifier. Please see below for more information on formatting."/>
32 <param name="header" type="text" value="Sample" optional="true" label="Column name for identifier" help="Sample by default, names the new column added with the identifier for each file."/>
33 </inputs>
34 <outputs>
35 <data format="flowtext" name="output" label="Merged output"/>
36 </outputs>
37 <tests>
38 <test>
39 <param name="inputs" value="input1.flowclr,input2.flowclr,input3.flowclr"/>
40 <output name="output" file="output1.flowtext"/>
41 </test>
42 <test>
43 <param name="inputs" value="input1.flowclr,input2.flowclr,input3.flowclr"/>
44 <param name="sample_names" value="S1,S2,S3"/>
45 <output name="output" file="output2.flowtext"/>
46 </test>
47 </tests>
48 <help><![CDATA[
49 Flowclr Sample Name
50 -------------------
51
52 This tool adds a column to a tabular file (including a flowtext or flowclustered file) with the sample information.
53
54 **Input files**
55 This tool requires a valid collection of tabular files such as flowtext files or clustered flowtext files. Files are processed serially.
56
57 .. class:: warningmark
58
59 By default the full file name will be used as sample name. Alternatively file names can be manually changed prior to running this tool.
60 If inputing sample names manually, then you must supply a comma separated list of sample names in order of the files in the dataset collection.
61
62 **Output file**
63 The output is a single merged tabular file (e.g. flowtext file) containing rows for each input tabular file; with a column containing the sample information
64
65 -----
66
67 **Example**
68
69 *File 1*::
70
71 FSC SSC Marker1 Marker2 Marker3 Marker4 Population
72 449 157 551 129 169 292 1
73 894 1023 199 277 320 227 3
74 262 73 437 69 0 146 6
75 340 115 509 268 0 74 1
76 ... ... ... ... ... ... ...
77
78 *File 2*::
79
80 FSC SSC Marker1 Marker2 Marker3 Marker4 Population
81 523 354 554 176 213 185 2
82 678 8096 98 74 417 267 6
83 226 89 467 123 0 324 2
84 660 175 589 178 1 89 7
85 ... ... ... ... ... ... ...
86
87 *Output*::
88
89 FSC SSC Marker1 Marker2 Marker3 Marker4 Population Sample
90 449 157 551 129 169 292 1 sample1
91 894 1023 199 277 320 227 3 sample1
92 262 73 437 69 0 146 6 sample1
93 340 115 509 268 0 74 1 sample1
94 ... ... ... ... ... ... ... ...
95 523 354 554 176 213 185 2 sample2
96 678 8096 98 74 417 267 6 sample2
97 226 89 467 123 0 324 2 sample2
98 660 175 589 178 1 89 7 sample2
99 ... ... ... ... ... ... ... ...
100 ]]>
101 </help>
102 </tool>