annotate check_id_map.xml @ 0:0d8e091eb3e1 draft

Uploaded
author davide-albanese
date Fri, 08 Mar 2013 10:35:27 -0500
parents
children 2280c43de0e2
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
1 <?xml version="1.0" ?>
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
2 <tool id="check_id_map" name="Check ID Map" version="1.6.0">
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
3 <description>
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
4 Checks user's metadata mapping file for required data, valid
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
5 format
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
6 </description>
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
7 <requirements>
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
8 <requirement type="package">qiime</requirement>
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
9 </requirements>
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
10 <command>check_id_map.py
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
11
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
12 -m $mapping_fp
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
13
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
14 #if str($char_replace):
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
15 -c $char_replace
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
16 #end if
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
17
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
18 #if $not_barcoded:
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
19 -b
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
20 #end if
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
21
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
22 #if $variable_len_barcodes:
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
23 -B
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
24 #end if
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
25
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
26 #if $disable_primer_check:
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
27 -p
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
28 #end if
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
29
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
30 #if str($added_demultiplex_field):
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
31 -j $added_demultiplex_field
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
32 #end if
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
33 ;
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
34 rm `basename $mapping_fp .txt`'.html'
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
35 ;
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
36 rm overlib.js
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
37 ;
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
38 mv `basename $mapping_fp .txt`'.log' $out_log
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
39 ;
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
40 mv `basename $mapping_fp .txt`'_corrected.txt' $out_txt
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
41 </command>
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
42 <inputs>
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
43 <param name="mapping_fp" label="Metadata mapping file" optional="False" type="data" format="tabular"/>
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
44
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
45 <param name="char_replace" value="_" label="Character used to replace invalid characters found in the mapping file. Must be a valid character (alphanumeric, period, or underscore)" optional="False" type="text"/>
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
46
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
47 <param name="not_barcoded" label="Set if barcodes are not present. BarcodeSequence header still required" selected="False" type="boolean"/>
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
48
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
49 <param name="variable_len_barcodes" label="Set if variable length barcodes are present to suppress warnings about barcodes of unequal length" selected="False" type="boolean"/>
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
50
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
51 <param name="disable_primer_check" label="Set to disable checks for primers. LinkerPrimerSequence header still required" selected="False" type="boolean"/>
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
52
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
53 <param name="added_demultiplex_field" label="Use to add a field to use in the mapping file as additional demultiplexing (can be used with or without barcodes). All combinations of barcodes/primers and the these fields must be unique. The fields must contain values that can be parsed from the fasta labels such as 'plate=R_2008_12_09'. In this case, 'plate' would be the column header and 'R_2008_12_09' would be the field data (minus quotes) in the mapping file. To use the run prefix from the fasta label, such as '>FLP3FBN01ELBSX', where 'FLP3FBN01' is generated from the run ID, use '-j run_prefix' and set the run prefix to be used as the data under the column header 'run_prefix'" optional="False" type="text" value=""/>
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
54 </inputs>
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
55 <outputs>
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
56 <data format="txt" name="out_log" label="${tool.name} on ${mapping_fp.name}"/>
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
57 <data format="tabular" name="out_txt" label="Corrected ${mapping_fp.name}"/>
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
58 </outputs>
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
59 <help>
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
60
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
61 Specifically, we check that:
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
62
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
63 1. The BarcodeSequence, LinkerPrimerSequences, and ReversePrimer fields
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
64 have valid IUPAC DNA characters, and BarcodeSequence characters
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
65 are non-degenerate (error)
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
66
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
67 2. The SampleID, BarcodeSequence, LinkerPrimerSequence, and Description
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
68 headers are present (error)
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
69
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
70 3. There are not duplicate header fields (error)
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
71
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
72 4. There are not duplicate barcodes (error)
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
73
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
74 5. Barcodes are of the same length. Suppressed when
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
75 variable_len_barcode flag is passed (warning)
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
76
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
77 6. The headers do not contain invalid characters (alphanumeric and
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
78 underscore only) (warning)
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
79
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
80 7. The data fields do not contain invalid characters (alphanumeric,
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
81 underscore, space, and +-%./:,; characters) (warning)
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
82
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
83 8. SampleID fields are MIENS compliant (only alphanumeric
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
84 and . characters). (warning)
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
85
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
86 9. There are no duplicates when the primer and variable length
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
87 barcodes are appended (error)
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
88
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
89 10. There are no duplicates when barcodes and added demultiplex
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
90 fields (-j option) are combined (error)
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
91
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
92 11. Data fields are not found beyond the Description column (warning)
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
93
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
94 Details about the metadata mapping file format can be found here:
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
95 http://www.qiime.org/documentation/file_formats.html#metadata-mapping-files
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
96
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
97 Errors and warnings are saved to a log file. Errors can be caused
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
98 by problems with the headers, invalid characters in barcodes or
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
99 primers, or by duplications in SampleIDs or barcodes.
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
100
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
101 Warnings can arise from invalid characters and variable length
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
102 barcodes that are not specified with the --variable_len_barcode.
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
103 Warnings will contain a reference to the cell (row,column) that
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
104 the warning arose from.
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
105
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
106 In addition to the log file, a 'corrected_mapping' file will be
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
107 created. Any invalid characters will be replaced with '.'
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
108 characters in the SampleID fields (to enforce MIENS compliance)
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
109 and text in other data fields will be replaced with the character
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
110 specified by the -c parameter, which is an underscore '_' by
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
111 default.
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
112
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
113 If pooled primers are used, separate with a comma. For instance,
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
114 a pooled set of three 27f primers (used to increase taxonomic
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
115 coverage) could be specified in the LinkerPrimerSequence fields as
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
116 such:
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
117 AGGGTTCGATTCTGGCTCAG,AGAGTTTGATCCTGGCTTAG,AGAATTTGATCTTGGTTCAG
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
118 </help>
0d8e091eb3e1 Uploaded
davide-albanese
parents:
diff changeset
119 </tool>