comparison igv_make_screenshots.xml @ 19:fd2d19ae2648 draft

planemo upload for repository https://github.com/bardin-lab/readtagger/tree/master/galaxy commit be45e3b0dec4ca1e8611abb2d84dd995e6d53751-dirty
author mvdbeek
date Mon, 31 Jul 2017 12:20:29 -0400
parents 46e42201f2e6
children 1f8609ae3941
comparison
equal deleted inserted replaced
18:46e42201f2e6 19:fd2d19ae2648
1 <tool id="igv_make_screenshots" name="IGV_screenshots" version="0.1.0"> 1 <tool id="igv_make_screenshots" name="IGV_screenshots" version="0.1.0">
2 <macros>
3 <token name="@PATH@"><![CDATA[#set $path="%s.%s.%s" % ($i, re.sub('[^\w\-_]', '_', $inputsection.input.element_identifier), $inputsection.input.extension)]]></token>
4 </macros>
2 <requirements> 5 <requirements>
3 <requirement type="package" version="0.2.9">xvfbwrapper</requirement> 6 <requirement type="package" version="0.2.9">xvfbwrapper</requirement>
4 <requirement type="package" version="2.3.93">igv</requirement> 7 <requirement type="package" version="2.3.93">igv</requirement>
5 </requirements> 8 </requirements>
6 <command detect_errors="exit_code"><![CDATA[ 9 <command detect_errors="exit_code"><![CDATA[
10 #import re
7 #if $genome_source.input_type_selector == 'history': 11 #if $genome_source.input_type_selector == 'history':
8 ln -s '$genome_source.genome' genome.fa && 12 ln -s '$genome_source.genome' genome.fa &&
9 #else: 13 #else:
10 ln -s '$genome_source.genome.fields.path' genome.fa && 14 ln -s '$genome_source.genome.fields.path' genome.fa &&
11 #end if 15 #end if
12 samtools faidx genome.fa && 16 samtools faidx genome.fa &&
13 sed -i.bak -e "s|\"genome.fa\"|\"\$PWD/genome.fa\"|g" '$igv_session' && 17 sed -i.bak -e "s|\"genome.fa\"|\"\$PWD/genome.fa\"|g" '$igv_session' &&
14 #for $i, $inputsection in enumerate($inputfiles): 18 #for $i, $inputsection in enumerate($inputfiles):
15 #set $path="%s.%s.%s" % ($i, $inputsection.input.element_identifier, $inputsection.input.extension) 19 @PATH@
16 sed -i.bak -e "s|\"$path\"|\"\$PWD/$path\"|g" '$igv_session' && 20 sed -i.bak -e "s|\"$path\"|\"\$PWD/$path\"|g" '$igv_session' &&
17 ln -fs '$inputsection.input' '$path' && 21 ln -fs '$inputsection.input' '$path' &&
18 #if $inputsection.input.is_of_type('bam') 22 #if $inputsection.input.is_of_type('bam')
19 ln -fs $inputsection.input.metadata.bam_index '$path'.bai && 23 ln -fs $inputsection.input.metadata.bam_index '$path'.bai &&
20 #end if 24 #end if
27 python $__tool_directory__/xvfb_igv.py igv_script.txt '$igv_preferences' $width,$height && 31 python $__tool_directory__/xvfb_igv.py igv_script.txt '$igv_preferences' $width,$height &&
28 zip screenshots.zip *.png && 32 zip screenshots.zip *.png &&
29 cp screenshots.zip '$screenshots_out' 33 cp screenshots.zip '$screenshots_out'
30 ]]></command> 34 ]]></command>
31 <configfiles> 35 <configfiles>
32 <configfile name="igv_session"><![CDATA[<?xml version="1.0" encoding="UTF-8" standalone="no"?> 36 <configfile name="igv_session">#import re
37 <![CDATA[<?xml version="1.0" encoding="UTF-8" standalone="no"?>
33 <Session genome="genome.fa" hasGeneTrack="false" hasSequenceTrack="true" version="8"> 38 <Session genome="genome.fa" hasGeneTrack="false" hasSequenceTrack="true" version="8">
34 <Resources> 39 <Resources>
35 #for $i, $inputsection in enumerate($inputfiles): 40 #for $i, $inputsection in enumerate($inputfiles):
36 #set $path="%s.%s.%s" % ($i, $inputsection.input.element_identifier, $inputsection.input.extension) 41 @PATH@
37 #set $coverage_id="%s_coverage" % $path 42 #set $coverage_id="%s_coverage" % $path
38 <Resource path="$path"/> 43 <Resource path="$path"/>
39 #end for 44 #end for
40 </Resources> 45 </Resources>
41 #for $i, $inputsection in enumerate($inputfiles): 46 #for $i, $inputsection in enumerate($inputfiles):
42 #if $inputsection.input.is_of_type('bam') 47 #if $inputsection.input.is_of_type('bam')
43 #set $label=str($inputsection.label) if str($inputsection.label) else str($inputsection.input.element_identifier) 48 #set $label=str($inputsection.label) if str($inputsection.label) else str($inputsection.input.element_identifier)
44 #set $path="%s.%s.%s" % ($i, $inputsection.input.element_identifier, $inputsection.input.extension) 49 @PATH
45 <Panel height="$inputsection.section_height" name="Panel${label}" width="$width"> 50 <Panel height="$inputsection.section_height" name="Panel${label}" width="$width">
46 ## First track is the coverage 51 ## First track is the coverage
47 <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="$coverage_id" name="$label Coverage" showReference="false" snpThreshold="0.2" sortable="true" visible="true"> 52 <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="$coverage_id" name="$label Coverage" showReference="false" snpThreshold="0.2" sortable="true" visible="true">
48 <DataRange baseline="0.0" drawBaseline="true" flipAxis="false" maximum="10.0" minimum="0.0" type="LINEAR"/> 53 <DataRange baseline="0.0" drawBaseline="true" flipAxis="false" maximum="10.0" minimum="0.0" type="LINEAR"/>
49 </Track> 54 </Track>
57 <Panel height="186" name="FeaturePanel" width="$width"> 62 <Panel height="186" name="FeaturePanel" width="$width">
58 <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"/> 63 <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"/>
59 #for $i, $inputsection in enumerate($inputfiles): 64 #for $i, $inputsection in enumerate($inputfiles):
60 #if not $inputsection.input.is_of_type('bam') 65 #if not $inputsection.input.is_of_type('bam')
61 #set $label=str($inputsection.label) if str($inputsection.label) else str($inputsection.input.element_identifier) 66 #set $label=str($inputsection.label) if str($inputsection.label) else str($inputsection.input.element_identifier)
62 #set $path="%s.%s.%s" % ($i, $inputsection.input.element_identifier, $inputsection.input.extension) 67 @PATH@
63 <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"/> 68 <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"/>
64 #end if 69 #end if
65 #end for 70 #end for
66 </Panel> 71 </Panel>
67 <PanelLayout dividerFractions="0.004995836802664446,0.12905911740216486,0.2681099084096586,0.5512073272273106,0.8409658617818485"/> 72 <PanelLayout dividerFractions="0.004995836802664446,0.12905911740216486,0.2681099084096586,0.5512073272273106,0.8409658617818485"/>
73 <configfile name="exit_session"> 78 <configfile name="exit_session">
74 exit 79 exit
75 </configfile> 80 </configfile>
76 <configfile name="igv_preferences"> 81 <configfile name="igv_preferences">
77 SAM.SHOW_SOFT_CLIPPED=$show_softclippped 82 SAM.SHOW_SOFT_CLIPPED=$show_softclippped
83 SAM.FILTER_SECONDARY_ALIGNMENTS=$filter_secondary
78 </configfile> 84 </configfile>
79 </configfiles> 85 </configfiles>
80 <inputs> 86 <inputs>
81 <conditional name="genome_source"> 87 <conditional name="genome_source">
82 <param name="input_type_selector" type="select" label="Choose the genome source"> 88 <param name="input_type_selector" type="select" label="Choose the genome source">
101 <valid initial="string.letters,string.digits"><add value="_" /> </valid> 107 <valid initial="string.letters,string.digits"><add value="_" /> </valid>
102 </sanitizer> 108 </sanitizer>
103 </param> 109 </param>
104 </repeat> 110 </repeat>
105 <param name="show_softclippped" type="boolean" label="Show softclipped bases?" truevalue="true" falsevalue="false" checked="true"/> 111 <param name="show_softclippped" type="boolean" label="Show softclipped bases?" truevalue="true" falsevalue="false" checked="true"/>
112 <param name="filter_secondary" type="boolean" label="Filter out secondary reads" truevalue="true" falsevalue="false" checked="true"/>
106 <param name="script_file" type="data" format="txt" label="Select a IGV script with regions for which to take screenshots"/> 113 <param name="script_file" type="data" format="txt" label="Select a IGV script with regions for which to take screenshots"/>
107 <param name="width" label="Select the screenshot width" type="integer" min="800" value="1920"/> 114 <param name="width" label="Select the screenshot width" type="integer" min="800" value="1920"/>
108 <param name="height" label="Select the screenshot height" type="integer" min="640" value="1080"/> 115 <param name="height" label="Select the screenshot height" type="integer" min="640" value="1080"/>
109 </inputs> 116 </inputs>
110 <outputs> 117 <outputs>