Mercurial > repos > mvdbeek > igv_take_screenshots
comparison igv_make_screenshots.xml @ 0:d828cf6bff42 draft
planemo upload for repository https://github.com/bardin-lab/readtagger/tree/master/galaxy commit 4824aeaa8107bd30ec786e8ca81779f053f0e736-dirty
author | mvdbeek |
---|---|
date | Mon, 26 Jun 2017 10:00:06 -0400 |
parents | |
children | 8b80357d8ab1 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:d828cf6bff42 |
---|---|
1 <tool id="igv_make_screenshots" name="IGV_screenshots" version="0.1.0"> | |
2 <requirements> | |
3 <requirement type="package" version="0.2.9">xvfbwrapper</requirement> | |
4 </requirements> | |
5 <command detect_errors="exit_code"><![CDATA[ | |
6 #for $inputsection in $inputfiles | |
7 #set $path="%s.%s" % ($inputsection.input.element_identifier, $inputsection.input.extension) | |
8 ln -fs $inputsection.input $path && | |
9 #if $inputsection.input.is_of_type('bam') | |
10 ln -fs $inputsection.input.metadata.bam_index '$path'.bai && | |
11 #end if | |
12 #end for | |
13 cat '$load_session' > load_session.txt && | |
14 echo snapshotDirectory "\$PWD" >> load_session.txt && | |
15 cat load_session.txt '$script_file' '$exit_session' > '$igv_session_out' && | |
16 python $__tool_directory__/xvfb_igv.py '$igv_session_out' $width,$height && | |
17 zip '$screenshots_out' *.png | |
18 ]]></command> | |
19 <configfiles> | |
20 <configfile name="igv_session"><![CDATA[#set $genome=$inputfiles[0].input.metadata.dbkey | |
21 <?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
22 <Session genome="${genome}" hasGeneTrack="true" hasSequenceTrack="true" version="8"> | |
23 <Resources> | |
24 #for $inputsection in $inputfiles | |
25 #set $path="%s.%s" % ($inputsection.input.element_identifier, $inputsection.input.extension) | |
26 <Resource name="$inputsection.input.element_identifier" path="$path"/> | |
27 #end for | |
28 </Resources> | |
29 #for $inputsection in $inputfiles | |
30 #if $inputsection.input.is_of_type('bam') | |
31 #set $label=$inputsection.label if not $inputsection.label == '' else $inputsection.input.element_identifier | |
32 #set $path="%s.%s" % ($inputsection.input.element_identifier, $inputsection.input.extension) | |
33 <Panel height="$inputsection.section_height" name="Panel${label}" width="$width"> | |
34 ## First track is the coverage | |
35 <Track altColor="0,0,178" autoScale="true" color="175,175,175" colorScale="ContinuousColorScale;0.0;10.0;255,255,255;175,175,175" displayMode="COLLAPSED" featureVisibilityWindow="-1" fontSize="10" id="${label}_coverage" name="${label} Coverage" showReference="false" snpThreshold="0.2" sortable="true" visible="true"> | |
36 <DataRange baseline="0.0" drawBaseline="true" flipAxis="false" maximum="10.0" minimum="0.0" type="LINEAR"/> | |
37 </Track> | |
38 ## Second track is the actual BAM alignment file | |
39 <Track altColor="0,0,178" autoScale="false" color="0,0,178" displayMode="EXPANDED" featureVisibilityWindow="-1" fontSize="10" id="$path" name="label" sortable="true" visible="true"> | |
40 <RenderOptions colorByTag="$inputsection.color_by_tag" colorOption="TAG" flagUnmappedPairs="false" groupByOption="NONE" groupByTag="BR" linkByTag="READNAME" linkedReads="false" maxInsertSize="1000" minInsertSize="50" quickConsensusMode="false" shadeBasesOption="QUALITY" shadeCenters="true" showAllBases="false" sortByTag="" viewPairs="false"/> | |
41 </Track> | |
42 </Panel> | |
43 #end if | |
44 #end for | |
45 <Panel height="186" name="FeaturePanel" width="$width"> | |
46 <Track altColor="0,0,178" autoScale="false" color="0,0,178" displayMode="COLLAPSED" featureVisibilityWindow="-1" fontSize="10" id="Reference sequence" name="Reference sequence" sortable="false" visible="true"/> | |
47 <Track altColor="0,0,178" autoScale="false" clazz="org.broad.igv.track.FeatureTrack" color="0,0,178" colorScale="ContinuousColorScale;0.0;817.0;255,255,255;0,0,178" displayMode="COLLAPSED" featureVisibilityWindow="-1" fontSize="10" height="35" id="${genome}_genes" name="Gene" renderer="BASIC_FEATURE" sortable="false" visible="true" windowFunction="count"> | |
48 <DataRange baseline="0.0" drawBaseline="true" flipAxis="false" maximum="817.0" minimum="0.0" type="LINEAR"/> | |
49 </Track> | |
50 #for $inputsection in $inputfiles | |
51 #if not $inputsection.input.is_of_type('bam') | |
52 #set $label=$inputsection.label if not $inputsection.label == '' else $inputsection.input.element_identifier | |
53 #set $path="%s.%s" % ($inputsection.input.element_identifier, $inputsection.input.extension) | |
54 <Track altColor="0,0,178" autoScale="false" clazz="org.broad.igv.track.FeatureTrack" color="0,0,178" displayMode="COLLAPSED" featureVisibilityWindow="-1" fontSize="10" id="${path}" name="${label}" renderer="BASIC_FEATURE" sortable="false" visible="true" windowFunction="count"/> | |
55 #end if | |
56 #end for | |
57 </Panel> | |
58 <PanelLayout dividerFractions="0.004995836802664446,0.12905911740216486,0.2681099084096586,0.5512073272273106,0.8409658617818485"/> | |
59 </Session> | |
60 ]]></configfile> | |
61 <configfile name="load_session"> | |
62 load $igv_session | |
63 </configfile> | |
64 <configfile name="exit_session"> | |
65 exit | |
66 </configfile> | |
67 </configfiles> | |
68 <inputs> | |
69 <repeat name="inputfiles" min="1" title="Add tracks"> | |
70 <param name="input" type="data" format="bam,gff,gtf,bed,vcf" label="Choose an input file"/> | |
71 <param name="label" type="text" label="Enter a label for this file. If no label is entered the history name will be used"/> | |
72 <param name="section_height" type="integer" value="300" label="Height for this track"/> | |
73 <param name="color_by_tag" type="text" value="CD" label="Enter a BAM/SAM tag that should detrmine the color of a read"> | |
74 <sanitizer invalid_char=""> | |
75 <valid initial="string.letters,string.digits"><add value="_" /> </valid> | |
76 </sanitizer> | |
77 </param> | |
78 </repeat> | |
79 <param name="script_file" type="data" format="text" label="Select a IGV script with regions for which to take screenshots"/> | |
80 <param name="width" label="Select the screenshot width" type="integer" min="640" value="1080"/> | |
81 <param name="height" label="Select the screenshot height" type="integer" min="800" value="1920"/> | |
82 </inputs> | |
83 <outputs> | |
84 <data name="igv_session_out" format="xml"/> | |
85 <data name="screenshots_out" format="zip"/> | |
86 </outputs> | |
87 <help><![CDATA[ | |
88 TODO: Fill in help. | |
89 ]]></help> | |
90 </tool> |