Mercurial > repos > bgruening > deeptools_compute_matrix_operations
comparison computeMatrixOperations.xml @ 0:db94d629b9eb draft
planemo upload for repository https://github.com/fidelram/deepTools/tree/master/galaxy/wrapper/ commit 0eeb2e1a184186ba5ac044136e71b943e2af0f09
| author | bgruening | 
|---|---|
| date | Mon, 05 Dec 2016 07:50:45 -0500 | 
| parents | |
| children | fd7e4d6a5d68 | 
   comparison
  equal
  deleted
  inserted
  replaced
| -1:000000000000 | 0:db94d629b9eb | 
|---|---|
| 1 <tool id="deeptools_compute_matrix_operations" name="computeMatrixOperations" version="@WRAPPER_VERSION@.0"> | |
| 2 <description>Modify or combine the output of computeMatrix in a variety of ways.</description> | |
| 3 <macros> | |
| 4 <token name="@BINARY@">computeMatrixOperations</token> | |
| 5 <import>deepTools_macros.xml</import> | |
| 6 </macros> | |
| 7 <expand macro="requirements"/> | |
| 8 <command> | |
| 9 <![CDATA[ | |
| 10 @BINARY@ | |
| 11 #if $submodule.command == "info": | |
| 12 info | |
| 13 -m $submodule.matrixFile | |
| 14 > $outFileTxt | |
| 15 #else if $submodule.command == "subset": | |
| 16 subset | |
| 17 -m $submodule.matrixFile | |
| 18 #if $submodule.groups is not None and str($submodule.groups) != '': | |
| 19 --groups $submodule.groups | |
| 20 #end if | |
| 21 #if $submodule.samples is not None and str($submodule.samples) != '': | |
| 22 --samples $submodule.samples | |
| 23 #end if | |
| 24 -o $outFileName | |
| 25 #else if $submodule.command == "filterStrand": | |
| 26 filterStrand | |
| 27 -m $submodule.matrixFile | |
| 28 --strand $submodule.strand | |
| 29 -o $outFileName | |
| 30 #else if $submodule.command == "rbind": | |
| 31 #set $files=[] | |
| 32 #for $f in $submodule.matrixFiles: | |
| 33 #silent $files.append(str($f.matrixFile)) | |
| 34 #end for | |
| 35 rbind | |
| 36 -m '#echo "' '".join($files)#' | |
| 37 -o $outFileName | |
| 38 #else if $submodule.command == "cbind": | |
| 39 cbind | |
| 40 #set $files=[] | |
| 41 #for $f in $submodule.matrixFiles: | |
| 42 #silent $files.append(str($f.matrixFile)) | |
| 43 #end for | |
| 44 -m '#echo "' '".join($files)#' | |
| 45 -o $outFileName | |
| 46 #else if $submodule.command == "sort": | |
| 47 sort | |
| 48 #set $files=[] | |
| 49 #for $f in $submodule.regionsFiles: | |
| 50 #silent $files.append(str($f.regionsFile)) | |
| 51 #end for | |
| 52 -m $submodule.matrixFile | |
| 53 -R '#echo "' '".join($files)#' | |
| 54 -o $outFileName | |
| 55 #end if | |
| 56 ]]> | |
| 57 </command> | |
| 58 <inputs> | |
| 59 <conditional name="submodule"> | |
| 60 <param name="command" type="select" label="Operation type"> | |
| 61 <option value="info" selected="true">Print information (info)</option> | |
| 62 <option value="subset">Subset by samples and/or groups of regions (subset)</option> | |
| 63 <option value="filterStrand">Filter by strand (filterStrand)</option> | |
| 64 <option value="rbind">Bind matrices, top to bottom (rbind)</option> | |
| 65 <option value="cbind">Bind matrices, left to right (cbind)</option> | |
| 66 <option value="sort">Sort by region order in specified files (sort)</option> | |
| 67 </param> | |
| 68 <when value="info"> | |
| 69 <param argument="matrixFile" format="deeptools_compute_matrix_archive" type="data" | |
| 70 label="Matrix file from the computeMatrix tool" help=""/> | |
| 71 </when> | |
| 72 | |
| 73 <when value="subset"> | |
| 74 <param argument="matrixFile" format="deeptools_compute_matrix_archive" type="data" | |
| 75 label="Matrix file from the computeMatrix tool" help=""/> | |
| 76 <param argument="groups" type="text" optional="true" label="Region groups to include." | |
| 77 help="If blank, all region groups are output. Alternatively, one or more groups listed in the output of the 'info' command can be used (separate groups by a space and enclose in quotes if needed)" /> | |
| 78 <param argument="samples" type="text" optional="true" label="Samples to include." | |
| 79 help="If blank, all samples are output. Alternatively, one or more samples listed in the output of the 'info' command can be used (separate sample names by a space and enclose in quotes if needed)" /> | |
| 80 </when> | |
| 81 | |
| 82 <when value="filterStrand"> | |
| 83 <param argument="matrixFile" format="deeptools_compute_matrix_archive" type="data" | |
| 84 label="Matrix file from the computeMatrix tool" help=""/> | |
| 85 <param argument="strand" type="select" label="Only include regions on this strand." | |
| 86 help="Only regions on the desired strand will be included in the output. If you desire to instead remove regions on only one strand (or the . strand), separately run this on the other strand and then use the rbind operation."> | |
| 87 <option value="+">+</option> | |
| 88 <option value="-">-</option> | |
| 89 <option value=".">. (no annotated strand)</option> | |
| 90 </param> | |
| 91 </when> | |
| 92 | |
| 93 <when value="rbind"> | |
| 94 <repeat name="matrixFiles" title="Matrix files from computeMatrix" min="2"> | |
| 95 <param argument="matrixFile" format="deeptools_compute_matrix_archive" type="data" | |
| 96 label="Matrix file from the computeMatrix tool" help=""/> | |
| 97 </repeat> | |
| 98 </when> | |
| 99 | |
| 100 <when value="cbind"> | |
| 101 <repeat name="matrixFiles" title="Matrix files from computeMatrix" min="2"> | |
| 102 <param argument="matrixFile" format="deeptools_compute_matrix_archive" type="data" | |
| 103 label="Matrix file from the computeMatrix tool" help=""/> | |
| 104 </repeat> | |
| 105 </when> | |
| 106 | |
| 107 <when value="sort"> | |
| 108 <param argument="matrixFile" format="deeptools_compute_matrix_archive" type="data" | |
| 109 label="Matrix file from the computeMatrix tool" help=""/> | |
| 110 <repeat name="regionsFiles" title="BED or GTF files of regions" min="1"> | |
| 111 <param name="regionsFile" format="bed,gtf" type="data" label="Regions to plot" | |
| 112 help="File, in BED format, containing the regions to plot."/> | |
| 113 </repeat> | |
| 114 </when> | |
| 115 </conditional> | |
| 116 </inputs> | |
| 117 <outputs> | |
| 118 <data format="deeptools_compute_matrix_archive" name="outFileName" label="${tool.name} ${submodule.command} on ${on_string}"> | |
| 119 <filter> | |
| 120 (( | |
| 121 submodule['command'] != "info" | |
| 122 )) | |
| 123 </filter> | |
| 124 </data> | |
| 125 <data format="txt" name="outFileTxt" label="${tool.name} info on ${on_string}"> | |
| 126 <filter> | |
| 127 (( | |
| 128 submodule['command'] == "info" | |
| 129 )) | |
| 130 </filter> | |
| 131 </data> | |
| 132 </outputs> | |
| 133 <tests> | |
| 134 <test> | |
| 135 <param name="command" value="info" /> | |
| 136 <param name="matrixFile" value="computeMatrix_result1.gz" ftype="deeptools_compute_matrix_archive" /> | |
| 137 <output name="outFileTxt" file="computeMatrixOperations.txt" ftype="txt" /> | |
| 138 </test> | |
| 139 <test> | |
| 140 <param name="command" value="rbind" /> | |
| 141 <param name="matrixFile" value="computeMatrix_result1.gz" ftype="deeptools_compute_matrix_archive" /> | |
| 142 <param name="matrixFile" value="computeMatrix_result1.gz" ftype="deeptools_compute_matrix_archive" /> | |
| 143 <output name="outFileName" file="computeMatrixOperations_result2.mat.gz" ftype="deeptools_compute_matrix_archive" compare="sim_size" delta="100"/> | |
| 144 </test> | |
| 145 </tests> | |
| 146 <help> | |
| 147 <![CDATA[ | |
| 148 | |
| 149 What it does | |
| 150 ------------ | |
| 151 | |
| 152 ``computeMatrixOperations`` can perform a variety of operations on one or more files produced by ``computeMatrix`` (N.B., the output is always written to a new file): | |
| 153 | |
| 154 +----------------+--------------------------------------------------------------------------------------------------------------------------+ | |
| 155 + **Subcommand** | **What it does** | | |
| 156 +----------------+--------------------------------------------------------------------------------------------------------------------------+ | |
| 157 + info | Prints out the sample and region group names in the order in which they appear. | | |
| 158 +----------------+--------------------------------------------------------------------------------------------------------------------------+ | |
| 159 + subset | Subsets a file by the desired samples/region group names. This can also change the order of these samples/region groups. | | |
| 160 +----------------+--------------------------------------------------------------------------------------------------------------------------+ | |
| 161 + filterStrand | Filters the file to only include regions annotated as being on a particular strand. | | |
| 162 +----------------+--------------------------------------------------------------------------------------------------------------------------+ | |
| 163 + rbind | Concatenates multiple matrices together, top to bottom. | | |
| 164 +----------------+--------------------------------------------------------------------------------------------------------------------------+ | |
| 165 + cbind | Merges multiple matrices, left to right. | | |
| 166 +----------------+--------------------------------------------------------------------------------------------------------------------------+ | |
| 167 + sort | Sorts the given file so regions are in the order of occurence in the input BED/GTF file(s). | | |
| 168 +----------------+--------------------------------------------------------------------------------------------------------------------------+ | |
| 169 | |
| 170 | |
| 171 These operations are useful when you want to run computeMatrix on multiple files (thereby keeping all of the values together) and later exclude regions/samples or add new ones. Another common use would be if you require the output of computeMatrix to be sorted to match the order of regions in the input file. | |
| 172 | |
| 173 ----- | |
| 174 | |
| 175 @REFERENCES@ | |
| 176 ]]> | |
| 177 </help> | |
| 178 <expand macro="citations" /> | |
| 179 </tool> | 
