annotate data_reader.xml @ 1:2470f3968557 draft default tip

Uploaded
author brenninc
date Tue, 21 Jun 2016 04:42:16 -0400
parents 97a9636974bc
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
1 <tool id="directory_table_reader" name="Directory Data Reader" version="0.2">
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
2 <description>Reads data from preconfigured directories table.</description>
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
3 <command interpreter="python">
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
4 <![CDATA[
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
5 directory_copier.py
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
6 --ending .${directory.fields.original_extension}
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
7 --new_ending .${directory.fields.galaxy_extension}
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
8 #if $results.required=="data"
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
9 --new_ending .${directory.fields.galaxy_extension}
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
10 --decompress ${directory.fields.decompress}
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
11 #if $results.start
1
2470f3968557 Uploaded
brenninc
parents: 0
diff changeset
12 --start "$results.start"
0
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
13 #end if
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
14 #if $results.last
1
2470f3968557 Uploaded
brenninc
parents: 0
diff changeset
15 --last "$results.last"
2470f3968557 Uploaded
brenninc
parents: 0
diff changeset
16 #end if
2470f3968557 Uploaded
brenninc
parents: 0
diff changeset
17 #if $results.regex
2470f3968557 Uploaded
brenninc
parents: 0
diff changeset
18 --regex "$results.regex"
0
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
19 #end if
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
20 #end if
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
21 --path ${directory.fields.path}
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
22 --list ${listing}
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
23 ]]>
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
24 </command>
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
25 <inputs>
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
26 <param name="directory" type="select" label="Directory to import data from">
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
27 <options from_data_table="directory_data"/>
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
28 <validator type="no_options" message="No Data Directory Setup"/>
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
29 </param>
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
30 <param name="list_name" type="text" size="25" label="output name" value="input data"/>
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
31 <conditional name="results">
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
32 <param name="required" type="select" label="Download data or just directory listing" help="Select type of action required.">
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
33 <option value="data" selected="true">Data and listing of selected type</option>
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
34 <option value="listing">Get listing of selected file types </option>
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
35 </param>
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
36 <when value="data">
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
37 <param name="start" type="text" value="" label="String which must be at the start of each file name" />
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
38 <param name="last" type="text" value="" label="String which must be at the end of the file name (excluding the file type)" />
1
2470f3968557 Uploaded
brenninc
parents: 0
diff changeset
39 <param name="regex" type="text" value="" label="Regex pattern which must somewhere in the file name (excluding the file type)" >
2470f3968557 Uploaded
brenninc
parents: 0
diff changeset
40 <sanitizer>
2470f3968557 Uploaded
brenninc
parents: 0
diff changeset
41 <valid initial="string.printable"/>
2470f3968557 Uploaded
brenninc
parents: 0
diff changeset
42 </sanitizer>
2470f3968557 Uploaded
brenninc
parents: 0
diff changeset
43 </param>
0
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
44 </when>
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
45 <when value="listing"/>
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
46 </conditional>
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
47 </inputs>
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
48 <outputs>
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
49 <data format="txt" name="listing" label="List of files in $list_name">
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
50 </data>
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
51 <!-- Ideally galaxy can get the type based on the file extensions. If so just add the type here -->
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
52 <collection type="list" label="$list_name" name="data_collection">
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
53 <filter>(results['required'] == 'data')</filter>
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
54 <discover_datasets pattern="__designation_and_ext__" directory="output" visible="true" />
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
55 </collection>
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
56 </outputs>
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
57 <tests>
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
58 <test>
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
59 <param name="directory" value="fastq.gz_files_id" />
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
60 <param name="list_name" value="test_files" />
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
61 <param name="results|required" value="listing"/>
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
62 <output name="listing">
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
63 <assert_contents>
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
64 <has_line line="sample1.fastqsanger" />
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
65 <has_line line="other.fastqsanger" />
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
66 </assert_contents>
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
67 </output>
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
68 </test>
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
69 <test>
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
70 <param name="directory" value="fastq.gz_files_id" />
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
71 <output name="listing_fastq_gz">
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
72 <assert_contents>
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
73 <has_line line="sample1.fastqsanger" />
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
74 </assert_contents>
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
75 </output>
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
76 <output_collection name="data_collection" type="list">
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
77 <element name="sample1" ftype="fastqsanger" file="sample1.fastq" />
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
78 <element name="other" ftype="fastqsanger" file="other.fastq" />
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
79 </output_collection>
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
80 </test>
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
81 <test>
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
82 <param name="directory" value="fastq_files_id" />
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
83 <param name="results|start" value="sam" />
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
84 <output name="listing_fastq">
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
85 <assert_contents>
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
86 <has_line line="sample1.fastq" />
1
2470f3968557 Uploaded
brenninc
parents: 0
diff changeset
87 <not_has_text text="other.fastq" />
2470f3968557 Uploaded
brenninc
parents: 0
diff changeset
88 </assert_contents>
2470f3968557 Uploaded
brenninc
parents: 0
diff changeset
89 </output>
2470f3968557 Uploaded
brenninc
parents: 0
diff changeset
90 <output_collection name="data_collection" type="list">
2470f3968557 Uploaded
brenninc
parents: 0
diff changeset
91 <element name="sample1" ftype="fastq" file="sample1.fastq" />
2470f3968557 Uploaded
brenninc
parents: 0
diff changeset
92 </output_collection>
2470f3968557 Uploaded
brenninc
parents: 0
diff changeset
93 </test>
2470f3968557 Uploaded
brenninc
parents: 0
diff changeset
94 <test>
2470f3968557 Uploaded
brenninc
parents: 0
diff changeset
95 <param name="directory" value="fastq_files_id" />
2470f3968557 Uploaded
brenninc
parents: 0
diff changeset
96 <param name="results|regex" value="le.?" />
2470f3968557 Uploaded
brenninc
parents: 0
diff changeset
97 <output name="listing_fastq">
2470f3968557 Uploaded
brenninc
parents: 0
diff changeset
98 <assert_contents>
2470f3968557 Uploaded
brenninc
parents: 0
diff changeset
99 <has_line line="sample1.fastq" />
2470f3968557 Uploaded
brenninc
parents: 0
diff changeset
100 <not_has_text text="other.fastq" />
0
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
101 </assert_contents>
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
102 </output>
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
103 <output_collection name="data_collection" type="list">
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
104 <element name="sample1" ftype="fastq" file="sample1.fastq" />
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
105 </output_collection>
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
106 </test>
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
107 </tests>
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
108
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
109 <help>
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
110 <![CDATA[
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
111 This tool will lookup files on the Galaxy server machine, including mounted directories.
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
112
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
113 Only directories and ending combinations set up by a Galaxy admin can be listed or loaded in this way.
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
114 These endings are case senitive.
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
115
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
116 ====
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
117
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
118 The data options will look for all files that have a particular ending in the selected directory.
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
119
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
120 The tool will return two things.
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
121
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
122 1. A Dataset collection of all the detected files. (If data requested)
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
123
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
124 2. A file with the names of all the detected files. These will be sorted in the same order as galaxy builds the dataset collection.
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
125
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
126 The files can be filtered by setting a specific start string for the file name.
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
127 Only files that start with this string (case senstive) will be included.
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
128
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
129 Files can also be filter for the last part before the file extsentions.
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
130
1
2470f3968557 Uploaded
brenninc
parents: 0
diff changeset
131 Files can also be filtered by a regex pattern.
2470f3968557 Uploaded
brenninc
parents: 0
diff changeset
132 Only files that contain the regex string will be included.
2470f3968557 Uploaded
brenninc
parents: 0
diff changeset
133 This uses the python search funtion so as long as the Regex pattern is found somewhere in file name (excluding extension).
2470f3968557 Uploaded
brenninc
parents: 0
diff changeset
134
2470f3968557 Uploaded
brenninc
parents: 0
diff changeset
135 The three filter start, last and regex if supplied work indepently, so only files that pass all supplied test will be included.
2470f3968557 Uploaded
brenninc
parents: 0
diff changeset
136
2470f3968557 Uploaded
brenninc
parents: 0
diff changeset
137 Note: Before applying the last and regex test the ending (includig the . just before the ending are removed)
2470f3968557 Uploaded
brenninc
parents: 0
diff changeset
138
0
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
139 Assuming the directory has:
1
2470f3968557 Uploaded
brenninc
parents: 0
diff changeset
140 C01_R1_001.fasta C01_R2_001.fatsa C02_R1_001.fasta C02_R2_002.fatsa
0
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
141
1
2470f3968557 Uploaded
brenninc
parents: 0
diff changeset
142 Setting start C01 will return just the C01 files: C01_R1_001.fasta C01_R2_002.fatsa
0
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
143
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
144 Setting last R1_001 will return the read1 files: C01_R1_001.fasta C02_R1_001.fasta
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
145
1
2470f3968557 Uploaded
brenninc
parents: 0
diff changeset
146 Setting regex R2_00.$ will return the R2 files: C01_R2_001.fatsa C02_R2_002.fatsa
2470f3968557 Uploaded
brenninc
parents: 0
diff changeset
147
0
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
148 As Galaxy detects the file type based on the extension this tool will change the exstension as setup by the admin.
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
149
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
150 This tool will unzip gz files if requested to by the admin,
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
151
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
152 ]]>
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
153 </help>
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
154 <citations>
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
155 </citations>
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
156
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
157 </tool>