Mercurial > repos > jjohnson > cistrome_correlation
comparison wiggle_correlation_in_bed.xml @ 0:3d1097835b2f draft default tip
Imported from capsule None
| author | jjohnson |
|---|---|
| date | Mon, 22 Sep 2014 11:54:41 -0400 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:3d1097835b2f |
|---|---|
| 1 <tool name="Multiple wiggle files correlation in given regions" id="correlation_dataset_bed" version="0.1.0"> | |
| 2 <description>Calculate the correlation coefficient on the genome scale using one bed file and multiple wiggle / bigwig files</description> | |
| 3 <macros> | |
| 4 <import>corr_macros.xml</import> | |
| 5 </macros> | |
| 6 <expand macro="requirements" /> | |
| 7 <command> | |
| 8 #if $maxscore and $minscore and ( $minscore > $maxscore ): | |
| 9 echo "maxscore has to be greater than minscore!" | |
| 10 exit 1; | |
| 11 #end if | |
| 12 #if $wfile1.extension == "wig" | |
| 13 wig_correlation_in_bed_file.py -d $wfile1.metadata.dbkey -m $method | |
| 14 #elif $wfile1.extension == "bigwig" | |
| 15 bigwig_correlation_in_bed_file.py | |
| 16 #end if | |
| 17 #if $maxscore.value | |
| 18 --max-score $maxscore | |
| 19 #end if | |
| 20 #if $minscore.value | |
| 21 --min-score $minscore | |
| 22 #end if | |
| 23 $heatmap -z $size -f PDF -r tmp.r | |
| 24 -b $bfile | |
| 25 -w $wfile1 -l '$wlabel1' -w $wfile2 -l '$wlabel2' | |
| 26 #for $m in $more | |
| 27 -w $m.wig -l "$m.label" | |
| 28 #end for | |
| 29 &> $log && | |
| 30 cp tmp.r $rscript && | |
| 31 #if $imagetype.__str__ == "PNG": | |
| 32 convert tmp.r.pdf tmp.r.png && | |
| 33 cp tmp.r.png $output | |
| 34 #else | |
| 35 cp tmp.r.pdf $output | |
| 36 #end if | |
| 37 </command> | |
| 38 <inputs> | |
| 39 <param name="bfile" type="data" format="bed" label="BED file(100,000 lines max)" > | |
| 40 <validator type="unspecified_build" /> | |
| 41 </param> | |
| 42 <param format="wig,bigwig" name="wfile1" type="data" label="Wiggle / bigwig file 1"> | |
| 43 <validator type="unspecified_build" /> | |
| 44 </param> | |
| 45 <param name="wlabel1" type="text" label="Wiggle / bigwig label 1" optional="false"> | |
| 46 <validator type="length" message="must be between 1 and 255 characters" min="1" max="255"/> | |
| 47 </param> | |
| 48 <param format="wig,bigwig" name="wfile2" type="data" label="Wiggle / bigwig file 2"> | |
| 49 <validator type="unspecified_build" /> | |
| 50 </param> | |
| 51 <param name="wlabel2" type="text" label="Wiggle / bigwig label 2" optional="false"> | |
| 52 <validator type="length" message="must be between 1 and 255 characters" min="1" max="255"/> | |
| 53 </param> | |
| 54 <repeat name="more" title="wiggle / bigwig file"> | |
| 55 <param format="wig,bigwig" name="wig" type="data" label="Select another wiggle / bigwig file"/> | |
| 56 <param name="label" type="text" label="Wiggle / bigwig label" optional="false"> | |
| 57 <validator type="length" message="must be between 1 and 255 characters" min="1" max="255"/> | |
| 58 </param> | |
| 59 </repeat> | |
| 60 <param name="method" type="select" label="method:" help="method to process the paired two sets of data in the sampling step." > | |
| 61 <option value="mean" selected="true">mean</option> | |
| 62 <option value="median">median</option> | |
| 63 <option value="sample">sample</option> | |
| 64 </param> | |
| 65 <param name="maxscore" type="float" label="Max Score" help="Maximum score in the calculation (optional)" value="10000" optional="true"/> | |
| 66 <param name="minscore" type="float" label="Min Score" help="Minimum score in the calculation (optional)" value="-10000" optional="true"/> | |
| 67 <param name="heatmap" type="boolean" label="Draw Heatmap instead?" checked="no" | |
| 68 truevalue="-H" falsevalue=" " /> | |
| 69 <param name="size" type="integer" label="image Size" value="10" help="Image size in inch. It must be ge 5 and le 20. Default: 10"> | |
| 70 <validator type="in_range" max="20" min="5" message="image Size is out of range, image Size has to be between 5 to 20" /> | |
| 71 </param> | |
| 72 <param type="select" name="imagetype" display="radio" label="Image Type"> | |
| 73 <option value="PDF">PDF format</option> | |
| 74 <option value="PNG">PNG format</option> | |
| 75 </param> | |
| 76 </inputs> | |
| 77 <outputs> | |
| 78 <data format="png" name="output"> | |
| 79 <change_format> | |
| 80 <when input="imagetype" value="PDF" format="pdf" /> | |
| 81 </change_format> | |
| 82 </data> | |
| 83 <data format="txt" name="log" label="correlation job log" /> | |
| 84 <data format="txt" name="rscript" label="correlation job rscript" /> | |
| 85 </outputs> | |
| 86 <expand macro="stdio"/> | |
| 87 <tests> | |
| 88 <test> | |
| 89 <param name="bfile" value="peaks.bed" /> | |
| 90 <param name="wfile1" value="control.wig" /> | |
| 91 <param name="wlabel1" value="control" /> | |
| 92 <param name="wfile2" value="treatment.wig" /> | |
| 93 <param name="wlabel2" value="treatment" /> | |
| 94 <param name="step" value="100" /> | |
| 95 <param name="method" value="mean" /> | |
| 96 <param name="maxscore" value="10000" /> | |
| 97 <param name="minscore" value="-10000" /> | |
| 98 <param name="size" value="10" /> | |
| 99 <param name="imagetype" value="PDF" /> | |
| 100 <output name="log"> | |
| 101 <assert_contents> | |
| 102 <has_text_matching expression="Please check tmp.r" /> | |
| 103 </assert_contents> | |
| 104 </output> | |
| 105 </test> | |
| 106 </tests> | |
| 107 <help> | |
| 108 This tool calculates the correlation coefficient values on the genome | |
| 109 scale using many scores datasets (many wiggle files) within the | |
| 110 regions given by a BED file. The tool is written by Tao Liu. It calls | |
| 111 R for plotting. | |
| 112 | |
| 113 .. class:: infomark | |
| 114 | |
| 115 **TIP:** This can be used to evaluate the correlation between | |
| 116 biological replicates at union peak regions. | |
| 117 | |
| 118 .. class:: warningmark | |
| 119 | |
| 120 **NEED IMPROVEMENT** | |
| 121 | |
| 122 ----- | |
| 123 | |
| 124 **Parameters** | |
| 125 | |
| 126 - **BED file** contains the regions to extract scores. | |
| 127 - **Wiggle file 1 and 2** are the first two wiggle files to be | |
| 128 included. These two are required. | |
| 129 - **Wiggle label 1 and 2** are the first two wiggle labels to be | |
| 130 plotted in the correlation plot. | |
| 131 - **wiggle files** click *Add new wiggle file* to add more wiggle | |
| 132 files and labels. | |
| 133 - **Genome/Assembly** Genome assembly to be used. The tool will | |
| 134 download the chromosome information from UCSC database. | |
| 135 - **Method** When scores are extracted for a region in BED file, a | |
| 136 method will be applied to calculate a value to represent this | |
| 137 region. Options are *median* to use the median value or *mean* to | |
| 138 use the average value. | |
| 139 - **Max Score** is the maximum score in the calculation. It's | |
| 140 optional. | |
| 141 - **Min Score** is the minimum score in the calculation. It's | |
| 142 optional. | |
| 143 | |
| 144 ----- | |
| 145 | |
| 146 **Outputs** | |
| 147 | |
| 148 - **PNG file** is the correlation plot | |
| 149 - **LOG file** for job log. If you see errors, please attached this in | |
| 150 the bug report | |
| 151 | |
| 152 </help> | |
| 153 | |
| 154 </tool> |
