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

Uploaded
author brenninc
date Tue, 21 Jun 2016 04:42:16 -0400
parents 97a9636974bc
children
comparison
equal deleted inserted replaced
0:97a9636974bc 1:2470f3968557
7 --new_ending .${directory.fields.galaxy_extension} 7 --new_ending .${directory.fields.galaxy_extension}
8 #if $results.required=="data" 8 #if $results.required=="data"
9 --new_ending .${directory.fields.galaxy_extension} 9 --new_ending .${directory.fields.galaxy_extension}
10 --decompress ${directory.fields.decompress} 10 --decompress ${directory.fields.decompress}
11 #if $results.start 11 #if $results.start
12 --start $results.start 12 --start "$results.start"
13 #end if 13 #end if
14 #if $results.last 14 #if $results.last
15 --last $results.last 15 --last "$results.last"
16 #end if
17 #if $results.regex
18 --regex "$results.regex"
16 #end if 19 #end if
17 #end if 20 #end if
18 --path ${directory.fields.path} 21 --path ${directory.fields.path}
19 --list ${listing} 22 --list ${listing}
20 ]]> 23 ]]>
31 <option value="listing">Get listing of selected file types </option> 34 <option value="listing">Get listing of selected file types </option>
32 </param> 35 </param>
33 <when value="data"> 36 <when value="data">
34 <param name="start" type="text" value="" label="String which must be at the start of each file name" /> 37 <param name="start" type="text" value="" label="String which must be at the start of each file name" />
35 <param name="last" type="text" value="" label="String which must be at the end of the file name (excluding the file type)" /> 38 <param name="last" type="text" value="" label="String which must be at the end of the file name (excluding the file type)" />
39 <param name="regex" type="text" value="" label="Regex pattern which must somewhere in the file name (excluding the file type)" >
40 <sanitizer>
41 <valid initial="string.printable"/>
42 </sanitizer>
43 </param>
36 </when> 44 </when>
37 <when value="listing"/> 45 <when value="listing"/>
38 </conditional> 46 </conditional>
39 </inputs> 47 </inputs>
40 <outputs> 48 <outputs>
74 <param name="directory" value="fastq_files_id" /> 82 <param name="directory" value="fastq_files_id" />
75 <param name="results|start" value="sam" /> 83 <param name="results|start" value="sam" />
76 <output name="listing_fastq"> 84 <output name="listing_fastq">
77 <assert_contents> 85 <assert_contents>
78 <has_line line="sample1.fastq" /> 86 <has_line line="sample1.fastq" />
79 <not_has_text text="other.fasta" /> 87 <not_has_text text="other.fastq" />
88 </assert_contents>
89 </output>
90 <output_collection name="data_collection" type="list">
91 <element name="sample1" ftype="fastq" file="sample1.fastq" />
92 </output_collection>
93 </test>
94 <test>
95 <param name="directory" value="fastq_files_id" />
96 <param name="results|regex" value="le.?" />
97 <output name="listing_fastq">
98 <assert_contents>
99 <has_line line="sample1.fastq" />
100 <not_has_text text="other.fastq" />
80 </assert_contents> 101 </assert_contents>
81 </output> 102 </output>
82 <output_collection name="data_collection" type="list"> 103 <output_collection name="data_collection" type="list">
83 <element name="sample1" ftype="fastq" file="sample1.fastq" /> 104 <element name="sample1" ftype="fastq" file="sample1.fastq" />
84 </output_collection> 105 </output_collection>
105 The files can be filtered by setting a specific start string for the file name. 126 The files can be filtered by setting a specific start string for the file name.
106 Only files that start with this string (case senstive) will be included. 127 Only files that start with this string (case senstive) will be included.
107 128
108 Files can also be filter for the last part before the file extsentions. 129 Files can also be filter for the last part before the file extsentions.
109 130
131 Files can also be filtered by a regex pattern.
132 Only files that contain the regex string will be included.
133 This uses the python search funtion so as long as the Regex pattern is found somewhere in file name (excluding extension).
134
135 The three filter start, last and regex if supplied work indepently, so only files that pass all supplied test will be included.
136
137 Note: Before applying the last and regex test the ending (includig the . just before the ending are removed)
138
110 Assuming the directory has: 139 Assuming the directory has:
111 C01_R1_001.fasta C01_R2_001.fatsa C02_R1_001.fasta C02_R2_001.fatsa 140 C01_R1_001.fasta C01_R2_001.fatsa C02_R1_001.fasta C02_R2_002.fatsa
112 141
113 Setting start C01 will return just the C01 files: C01_R1_001.fasta C01_R2_001.fatsa 142 Setting start C01 will return just the C01 files: C01_R1_001.fasta C01_R2_002.fatsa
114 143
115 Setting last R1_001 will return the read1 files: C01_R1_001.fasta C02_R1_001.fasta 144 Setting last R1_001 will return the read1 files: C01_R1_001.fasta C02_R1_001.fasta
145
146 Setting regex R2_00.$ will return the R2 files: C01_R2_001.fatsa C02_R2_002.fatsa
116 147
117 As Galaxy detects the file type based on the extension this tool will change the exstension as setup by the admin. 148 As Galaxy detects the file type based on the extension this tool will change the exstension as setup by the admin.
118 149
119 This tool will unzip gz files if requested to by the admin, 150 This tool will unzip gz files if requested to by the admin,
120 151