/tools/maf/interval2maf.xml
XML | 106 lines | 99 code | 6 blank | 1 comment | 0 complexity | 7b12dd7524d1f2a323b3d48a0bbf8791 MD5 | raw file
1<tool id="Interval2Maf1" name="Extract MAF blocks" version="1.0.1">
2 <description>given a set of genomic intervals</description>
3 <command interpreter="python">
4 #if $maf_source_type.maf_source == "user":#interval2maf.py --dbkey=${input1.dbkey} --chromCol=${input1.metadata.chromCol} --startCol=${input1.metadata.startCol} --endCol=${input1.metadata.endCol} --strandCol=${input1.metadata.strandCol} --mafFile=$maf_source_type.mafFile --mafIndex=$maf_source_type.mafFile.metadata.maf_index --interval_file=$input1 --output_file=$out_file1 --mafIndexFile=${GALAXY_DATA_INDEX_DIR}/maf_index.loc --species=$maf_source_type.species
5 #else:#interval2maf.py --dbkey=${input1.dbkey} --chromCol=${input1.metadata.chromCol} --startCol=${input1.metadata.startCol} --endCol=${input1.metadata.endCol} --strandCol=${input1.metadata.strandCol} --mafType=$maf_source_type.mafType --interval_file=$input1 --output_file=$out_file1 --mafIndexFile=${GALAXY_DATA_INDEX_DIR}/maf_index.loc --species=$maf_source_type.species
6 #end if
7 --split_blocks_by_species=$split_blocks_by_species_selector.split_blocks_by_species
8 #if $split_blocks_by_species_selector.split_blocks_by_species == "split_blocks_by_species":# --remove_all_gap_columns=$split_blocks_by_species_selector.remove_all_gap_columns
9 #end if
10 </command>
11 <inputs>
12 <param format="interval" name="input1" type="data" label="Choose intervals">
13 <validator type="unspecified_build" />
14 </param>
15 <conditional name="maf_source_type">
16 <param name="maf_source" type="select" label="MAF Source">
17 <option value="cached" selected="true">Locally Cached Alignments</option>
18 <option value="user">Alignments in Your History</option>
19 </param>
20 <when value="user">
21 <param format="maf" name="mafFile" label="Choose alignments" type="data">
22 <options>
23 <filter type="data_meta" ref="input1" key="dbkey" />
24 </options>
25 <validator type="dataset_ok_validator" />
26 </param>
27 <param name="species" type="select" display="checkboxes" multiple="true" label="Choose species" help="Select species to be included in the final alignment">
28 <options>
29 <filter type="data_meta" ref="mafFile" key="species" />
30 </options>
31 </param>
32 </when>
33 <when value="cached">
34 <param name="mafType" type="select" label="Choose alignments">
35 <options from_file="maf_index.loc">
36 <column name="name" index="0"/>
37 <column name="value" index="1"/>
38 <column name="dbkey" index="2"/>
39 <column name="species" index="3"/>
40 <filter type="data_meta" ref="input1" key="dbkey" column="2" multiple="True" separator=","/>
41 <validator type="no_options" message="No alignments are available for the build associated with the selected interval file"/>
42 </options>
43 </param>
44 <param name="species" type="select" display="checkboxes" multiple="true" label="Choose species" help="Select species to be included in the final alignment">
45 <options from_file="maf_index.loc">
46 <column name="uid" index="1"/>
47 <column name="value" index="3"/>
48 <column name="name" index="3"/>
49 <filter type="param_value" ref="mafType" name="uid" column="1"/>
50 <filter type="multiple_splitter" column="3" separator=","/>
51 </options>
52 </param>
53 </when>
54 </conditional>
55 <conditional name="split_blocks_by_species_selector">
56 <param name="split_blocks_by_species" type="select" label="Split blocks by species" help="See the Split MAF blocks by Species tool for more information.">
57 <option value="split_blocks_by_species">Split by species</option>
58 <option value="dont_split_blocks_by_species" selected="true">Do not split</option>
59 </param>
60 <when value="dont_split_blocks_by_species">
61 <!-- do nothing here -->
62 </when>
63 <when value="split_blocks_by_species">
64 <param name="remove_all_gap_columns" type="select" label="Collapse empty alignment columns">
65 <option value="remove_all_gap_columns" selected="true">Collapse empty columns</option>
66 <option value="do_not_remove_all_gap_columns">Do not collapse</option>
67 </param>
68 </when>
69 </conditional>
70 </inputs>
71 <outputs>
72 <data format="maf" name="out_file1"/>
73 </outputs>
74 <tests>
75 <test>
76 <param name="input1" value="1.bed"/>
77 <param name="maf_source" value="cached"/>
78 <param name="mafType" value="ENCODE_TBA_hg17"/>
79 <param name="species" value="hg17,panTro1,baboon,marmoset,galago,rn3,mm6,rabbit,cow,canFam1,rfbat,shrew,armadillo,tenrec,monDom1,tetNig1,fr1,rheMac1,galGal2,xenTro1,danRer2,elephant,platypus,hedgehog,colobus_monkey,dusky_titi,owl_monkey,mouse_lemur"/>
80 <param name="split_blocks_by_species" value="dont_split_blocks_by_species"/>
81 <output name="out_file1" file="fsa_interval2maf.dat" />
82 </test>
83 <test>
84 <param name="input1" value="1.bed"/>
85 <param name="maf_source" value="user"/>
86 <param name="mafFile" value="fsa_interval2maf.dat"/>
87 <param name="species" value="hg17,panTro1,baboon,marmoset,galago,rn3,mm6,rabbit,cow,canFam1,rfbat,shrew,armadillo,tenrec,monDom1,tetNig1,fr1,rheMac1,galGal2,xenTro1,danRer2,elephant,platypus,hedgehog,colobus_monkey,dusky_titi,owl_monkey,mouse_lemur"/>
88 <param name="split_blocks_by_species" value="dont_split_blocks_by_species"/>
89 <output name="out_file1" file="fsa_interval2maf.dat" />
90 </test>
91 </tests>
92 <help>
93**What it does**
94
95This tool takes genomic coordinates, superimposes them on multiple alignments (in MAF format) stored on the Galaxy site or from your history, and excises alignment blocks corresponding to each set of coordinates. Alignment blocks that extend past START and/or END positions of an interval are trimmed. Note that a single genomic interval may correspond to two or more alignment blocks.
96
97-----
98
99**Example**
100
101Here a single interval is superimposed on three MAF blocks. Blocks 1 and 3 are trimmed because they extend beyond boundaries of the interval:
102
103.. image:: ../static/images/maf_icons/interval2maf.png
104
105 </help>
106</tool>