annotate data_reader.xml @ 0:97a9636974bc draft

Uploaded first version
author brenninc
date Mon, 09 May 2016 02:52:47 -0400
parents
children 2470f3968557
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
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
12 --start $results.start
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
13 #end if
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
14 #if $results.last
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
15 --last $results.last
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
16 #end if
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
17 #end if
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
18 --path ${directory.fields.path}
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
19 --list ${listing}
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
20 ]]>
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
21 </command>
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
22 <inputs>
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
23 <param name="directory" type="select" label="Directory to import data from">
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
24 <options from_data_table="directory_data"/>
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
25 <validator type="no_options" message="No Data Directory Setup"/>
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
26 </param>
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
27 <param name="list_name" type="text" size="25" label="output name" value="input data"/>
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
28 <conditional name="results">
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
29 <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
30 <option value="data" selected="true">Data and listing of selected type</option>
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
31 <option value="listing">Get listing of selected file types </option>
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
32 </param>
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
33 <when value="data">
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
34 <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
35 <param name="last" type="text" value="" label="String which must be at the end of the file name (excluding the file type)" />
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
36 </when>
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
37 <when value="listing"/>
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
38 </conditional>
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
39 </inputs>
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
40 <outputs>
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
41 <data format="txt" name="listing" label="List of files in $list_name">
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
42 </data>
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
43 <!-- 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
44 <collection type="list" label="$list_name" name="data_collection">
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
45 <filter>(results['required'] == 'data')</filter>
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
46 <discover_datasets pattern="__designation_and_ext__" directory="output" visible="true" />
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
47 </collection>
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
48 </outputs>
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
49 <tests>
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
50 <test>
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
51 <param name="directory" value="fastq.gz_files_id" />
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
52 <param name="list_name" value="test_files" />
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
53 <param name="results|required" value="listing"/>
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
54 <output name="listing">
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
55 <assert_contents>
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
56 <has_line line="sample1.fastqsanger" />
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
57 <has_line line="other.fastqsanger" />
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
58 </assert_contents>
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
59 </output>
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
60 </test>
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
61 <test>
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
62 <param name="directory" value="fastq.gz_files_id" />
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
63 <output name="listing_fastq_gz">
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
64 <assert_contents>
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
65 <has_line line="sample1.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 <output_collection name="data_collection" type="list">
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
69 <element name="sample1" ftype="fastqsanger" file="sample1.fastq" />
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
70 <element name="other" ftype="fastqsanger" file="other.fastq" />
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
71 </output_collection>
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
72 </test>
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
73 <test>
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
74 <param name="directory" value="fastq_files_id" />
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
75 <param name="results|start" value="sam" />
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
76 <output name="listing_fastq">
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
77 <assert_contents>
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
78 <has_line line="sample1.fastq" />
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
79 <not_has_text text="other.fasta" />
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
80 </assert_contents>
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
81 </output>
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
82 <output_collection name="data_collection" type="list">
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
83 <element name="sample1" ftype="fastq" file="sample1.fastq" />
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
84 </output_collection>
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
85 </test>
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
86 </tests>
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
87
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
88 <help>
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
89 <![CDATA[
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
90 This tool will lookup files on the Galaxy server machine, including mounted directories.
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
91
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
92 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
93 These endings are case senitive.
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
94
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
95 ====
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
96
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
97 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
98
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
99 The tool will return two things.
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
100
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
101 1. A Dataset collection of all the detected files. (If data requested)
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
102
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
103 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
104
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
105 The files can be filtered by setting a specific start string for the file name.
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
106 Only files that start with this string (case senstive) will be included.
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
107
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
108 Files can also be filter for the last part before the file extsentions.
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
109
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
110 Assuming the directory has:
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
111 C01_R1_001.fasta C01_R2_001.fatsa C02_R1_001.fasta C02_R2_001.fatsa
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
112
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
113 Setting start C01 will return just the C01 files: C01_R1_001.fasta C01_R2_001.fatsa
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
114
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
115 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
116
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
117 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
118
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
119 This tool will unzip gz files if requested to by the admin,
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
120
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
121 ]]>
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
122 </help>
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
123 <citations>
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
124 </citations>
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
125
97a9636974bc Uploaded first version
brenninc
parents:
diff changeset
126 </tool>