comparison crossmap_bed.xml @ 2:b0d8635e0161 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/crossmap commit 93bc570011b7cad70abf36695823478f819b81f1
author iuc
date Thu, 19 Oct 2017 12:37:43 -0400
parents 235ab3277db1
children e5c951338c64
comparison
equal deleted inserted replaced
1:12ad33a9d3bf 2:b0d8635e0161
5 </macros> 5 </macros>
6 <expand macro="requirements"/> 6 <expand macro="requirements"/>
7 <expand macro="stdio"/> 7 <expand macro="stdio"/>
8 <expand macro="version_command"/> 8 <expand macro="version_command"/>
9 9
10 <!--
11 1. CrossMap bed x.chain in.bed > out.bed
12 stdout/out.bed: valid and invalid combined
13
14 2. CrossMap bed x.chain in.bed out.bed
15 out.bed: valid only
16 out.bed.unmap: invalid only
17 -->
10 <command><![CDATA[ 18 <command><![CDATA[
11 #set $input_file = str($seq_source.input) 19 CrossMap.py bed
20 '${chain_source.input_chain}'
12 21
13 CrossMap.py bed 22 '${input}'
14 '${chain_source.input_chain}'
15 23
16 '${input_file}' 24 #if $merge_unmapped_entries:
25 > '${output_combined}'
26 #else:
27 '${output_valid}'
28 && mv '${output_valid}.unmap' '${output_failed}'
29 #end if
17 30
18 #if str($include_fails) == "True"
19 >
20 #end if
21
22 '${output}'
23 ]]></command> 31 ]]></command>
24 32
25 33
26 <inputs> 34 <inputs>
27 <conditional name="seq_source"> 35 <param name="input" type="data" format="bed" label="BED file"
28 <expand macro="source" /> 36 help="BED format file must have at least 3 columns (chrom, start, end) and no more than 12 columns"/>
29 37
30 <when value="cached">
31 <param format="bed" name="input" type="data" label="BED file"
32 help="BED format file must have at least 3 columns (chrom, start, end) and no more than 12 columns.">
33 <validator type="unspecified_build"/>
34 <!-- Gives error in tests
35 <validator type="dataset_metadata_in_file" filename="liftOver.loc" metadata_name="dbkey" metadata_column="0" message="LiftOver mapping (chain file) is not available for the specified build."/>
36 -->
37 </param>
38 </when>
39 <when value="history">
40 <param type="data" format="bed" name="input" label="BED file"
41 help="BED format file must have at least 3 columns (chrom, start, end) and no more than 12 columns."/>
42 </when>
43 </conditional>
44 <expand macro="chain" /> 38 <expand macro="chain" />
45 39
46 <param name="include_fails" type="boolean" truevalue="True" checked="false" falsevalue="False" label="Include failed liftovers" 40 <param name="merge_unmapped_entries" type="boolean" checked="false" truevalue="true" falsevalue="false" label="Merge failed and converted entries into single file"/>
47 help="If a coordinate can not be lift over, do you want to include it in the output (it is still being marked 'fail')"/>
48 </inputs> 41 </inputs>
49 42
50 <outputs> 43 <outputs>
51 <data format="bed" name="output" label="${tool.name} on ${on_string}" /> 44 <data name="output_valid" format="bed" label="${tool.name} (valid only) on ${on_string}">
52 <data format="text" name="output2" label="${tool.name} (bedgraph) on ${on_string}" /> 45 <filter>merge_unmapped_entries is False</filter>
46 </data>
47 <data name="output_failed" format="bed" label="${tool.name} (failed only) on ${on_string}">
48 <filter>merge_unmapped_entries is False</filter>
49 </data>
50
51 <data name="output_combined" format="bed" label="${tool.name} on ${on_string}">
52 <filter>merge_unmapped_entries is True</filter>
53 </data>
53 </outputs> 54 </outputs>
54 55
55 <tests> 56 <tests>
56 <!-- BED --> 57 <test><!-- this test only contains perfect entries that do get liftOvered (separate output) -->
57 <test> 58 <param name="input" value="test_bed_01_input_a.bed" ftype="bed"/>
58 <param name="index_source" value="history"/> 59 <param name="index_source" value="history"/>
60 <param name="input_chain" value="aToB.over.chain" ftype="csv"/>
61 <param name="merge_unmapped_entries" value="false" />
62
63 <output name="output_valid" file="test_bed_01_output_a__only-matches.bed"/>
64 <output name="output_failed" file="test_bed_01_output_a__only_fails.bed"/>
65 </test>
66 <test><!-- this test only contains perfect entries that do get liftOvered (merged output) -->
59 <param name="input" value="test_bed_01_input_a.bed" ftype="bed"/> 67 <param name="input" value="test_bed_01_input_a.bed" ftype="bed"/>
60 <param name="input_chain" value="aToB.over.chain" ftype="csv"/> 68 <param name="index_source" value="history"/>
61 <param name="include_fails" value="False"/> 69 <param name="input_chain" value="aToB.over.chain" ftype="txt"/>
70 <param name="merge_unmapped_entries" value="true" />
62 71
63 <output name="output" file="test_bed_01_output_a__only-matches.bed"/> 72 <output name="output_combined" file="test_bed_01_output_a__all.bed"/>
64 </test> 73 </test>
65 <test> 74
75 <test><!-- this test only contains imperfect entries that do get liftOvered (separate output) -->
76 <param name="input" value="test_bed_02_input_a.bed" ftype="bed"/>
66 <param name="index_source" value="history"/> 77 <param name="index_source" value="history"/>
78 <param name="input_chain" value="aToB.over.chain" ftype="txt"/>
79 <param name="merge_unmapped_entries" value="false" />
80
81 <output name="output_valid" file="test_bed_02_output_a__only-matches.bed"/>
82 <output name="output_failed" file="test_bed_02_output_a__only_fails.bed"/>
83 </test>
84 <test><!-- this test only contains imperfect entries that do get liftOvered (separate output) -->
85 <param name="input" value="test_bed_02_input_a.bed" ftype="bed"/>
86 <param name="index_source" value="history"/>
87 <param name="input_chain" value="aToB.over.chain" ftype="txt"/>
88 <param name="merge_unmapped_entries" value="true" />
89
90 <output name="output_combined" file="test_bed_02_output_a__all.bed"/>
91 </test>
92
93 <test><!-- clone of first test: tests cached reference chain file -->
67 <param name="input" value="test_bed_01_input_a.bed" ftype="bed"/> 94 <param name="input" value="test_bed_01_input_a.bed" ftype="bed"/>
68 <param name="input_chain" value="aToB.over.chain" ftype="txt"/> 95 <param name="index_source" value="cached"/>
69 <param name="include_fails" value="True"/> 96 <param name="merge_unmapped_entries" value="false" />
70 97
71 <output name="output" file="test_bed_01_output_a__all.bed"/> 98 <output name="output_valid" file="test_bed_01_output_a__only-matches.bed"/>
72 </test> 99 <output name="output_failed" file="test_bed_01_output_a__only_fails.bed"/>
73 <test>
74 <param name="index_source" value="history"/>
75 <param name="input" value="test_bed_02_input_a.bed" ftype="bed"/>
76 <param name="input_chain" value="aToB.over.chain" ftype="txt"/>
77 <param name="include_fails" value="False"/>
78
79 <output name="output" file="test_bed_02_output_a__only-matches.bed"/>
80 </test>
81 <test>
82 <param name="index_source" value="history"/>
83 <param name="input" value="test_bed_02_input_a.bed" ftype="bed"/>
84 <param name="input_chain" value="aToB.over.chain" ftype="txt"/>
85 <param name="include_fails" value="True"/>
86
87 <output name="output" file="test_bed_02_output_a__all.bed"/>
88 </test> 100 </test>
89 </tests> 101 </tests>
90 <help><![CDATA[ 102 <help><![CDATA[
91 @HELP_GENERAL@ 103 @HELP_GENERAL@
92 104
94 --- 106 ---
95 107
96 BED format file must have at least 3 columns (chrom, start, end) and no more than 12 columns. 108 BED format file must have at least 3 columns (chrom, start, end) and no more than 12 columns.
97 BED format: http://genome.ucsc.edu/FAQ/FAQformat.html#format1 109 BED format: http://genome.ucsc.edu/FAQ/FAQformat.html#format1
98 110
99 A BED (Browser Extensible Data) file is a tab-delimited text file 111 A BED (Browser Extensible Data) file is a tab-delimited text file
100 describing genome regions or gene annotations. It is the standard file 112 describing genome regions or gene annotations. It is the standard file
101 format used by UCSC. It consists of one line per feature, each containing 113 format used by UCSC. It consists of one line per feature, each containing
102 3-12 columns. CrossMap converts BED files with less than 12 columns to a 114 3-12 columns. CrossMap converts BED files with less than 12 columns to a
103 different assembly by updating the chromosome and genome coordinates only; 115 different assembly by updating the chromosome and genome coordinates only;
104 all other columns remain unchanged. Regions from old assembly mapping to 116 all other columns remain unchanged. Regions from old assembly mapping to
105 multiple locations to the new assembly will be split. For 12-columns BED 117 multiple locations to the new assembly will be split. For 12-columns BED
106 files, all columns will be updated accordingly except the 4th column (name 118 files, all columns will be updated accordingly except the 4th column (name
107 of bed line), 5th column (score value) and 9th column (RGB value describing 119 of bed line), 5th column (score value) and 9th column (RGB value describing
108 the display color). 12-column BED files usually define multiple blocks (eg. 120 the display color). 12-column BED files usually define multiple blocks (eg.
109 exon); if any of the exons fails to map to a new assembly, the whole BED 121 exon); if any of the exons fails to map to a new assembly, the whole BED
110 line is skipped. 122 line is skipped.
111 123
112 NOTE: 124 Notes:
113 125
114 1. For BED-like formats mentioned above, CrossMap only updates “chrom (1st 126 1. For BED-like formats mentioned above, CrossMap only updates “chrom (1st
115 column)”, “start (2nd column) ”, “end (3rd column) ” and “strand” (if 127 column)”, “start (2nd column) ”, “end (3rd column) ” and “strand” (if
116 any). All other columns will keep AS-IS. 128 any). All other columns will keep AS-IS.
117 2. Lines starting with ‘#’, ‘browser’, ‘track’ will be skipped. 129 2. Lines starting with ‘#’, ‘browser’, ‘track’ will be skipped.
118 3. Lines will less than 3 columns will be skipped. 130 3. Lines will less than 3 columns will be skipped.
119 4. 2nd-column and 3-column must be integer, otherwise skipped. 131 4. 2nd-column and 3-column must be integer, otherwise skipped.
120 5. “+” strand is assumed if no strand information was found. 132 5. “+” strand is assumed if no strand information was found.
121 6. For standard BED format (12 columns). If any of the defined exon blocks 133 6. For standard BED format (12 columns). If any of the defined exon blocks
122 cannot be uniquely mapped to target assembly, the whole entry will be 134 cannot be uniquely mapped to target assembly, the whole entry will be
123 skipped. 135 skipped.
124 7. If input region cannot be consecutively mapped target assembly, it will be split. 136 7. If input region cannot be consecutively mapped target assembly, it will be split.
125 8. *.unmap file contains regions that cannot be unambiguously converted. 137 8. \*.unmap file contains regions that cannot be unambiguously converted.
126 138
127 Please see `the manual <http://crossmap.sourceforge.net/#convert-bed-format-files>`__ for more details. 139 ]]></help>
128 ]]></help>
129 140
130 <citations> 141 <citations>
131 <citation type="doi">10.1093/bioinformatics/btt730</citation> 142 <citation type="doi">10.1093/bioinformatics/btt730</citation>
132 </citations> 143 </citations>
133 </tool> 144 </tool>