Mercurial > repos > mvdbeek > igv_take_screenshots
changeset 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 |
files | igv_make_screenshots.xml test-data/rover_corrected.bam.bai |
diffstat | 2 files changed, 12 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/igv_make_screenshots.xml Fri Jul 28 13:27:57 2017 -0400 +++ b/igv_make_screenshots.xml Mon Jul 31 12:20:29 2017 -0400 @@ -1,9 +1,13 @@ <tool id="igv_make_screenshots" name="IGV_screenshots" version="0.1.0"> + <macros> + <token name="@PATH@"><![CDATA[#set $path="%s.%s.%s" % ($i, re.sub('[^\w\-_]', '_', $inputsection.input.element_identifier), $inputsection.input.extension)]]></token> + </macros> <requirements> <requirement type="package" version="0.2.9">xvfbwrapper</requirement> <requirement type="package" version="2.3.93">igv</requirement> </requirements> <command detect_errors="exit_code"><![CDATA[ + #import re #if $genome_source.input_type_selector == 'history': ln -s '$genome_source.genome' genome.fa && #else: @@ -12,7 +16,7 @@ samtools faidx genome.fa && sed -i.bak -e "s|\"genome.fa\"|\"\$PWD/genome.fa\"|g" '$igv_session' && #for $i, $inputsection in enumerate($inputfiles): - #set $path="%s.%s.%s" % ($i, $inputsection.input.element_identifier, $inputsection.input.extension) + @PATH@ sed -i.bak -e "s|\"$path\"|\"\$PWD/$path\"|g" '$igv_session' && ln -fs '$inputsection.input' '$path' && #if $inputsection.input.is_of_type('bam') @@ -29,11 +33,12 @@ cp screenshots.zip '$screenshots_out' ]]></command> <configfiles> - <configfile name="igv_session"><![CDATA[<?xml version="1.0" encoding="UTF-8" standalone="no"?> + <configfile name="igv_session">#import re +<![CDATA[<?xml version="1.0" encoding="UTF-8" standalone="no"?> <Session genome="genome.fa" hasGeneTrack="false" hasSequenceTrack="true" version="8"> <Resources> #for $i, $inputsection in enumerate($inputfiles): - #set $path="%s.%s.%s" % ($i, $inputsection.input.element_identifier, $inputsection.input.extension) + @PATH@ #set $coverage_id="%s_coverage" % $path <Resource path="$path"/> #end for @@ -41,7 +46,7 @@ #for $i, $inputsection in enumerate($inputfiles): #if $inputsection.input.is_of_type('bam') #set $label=str($inputsection.label) if str($inputsection.label) else str($inputsection.input.element_identifier) - #set $path="%s.%s.%s" % ($i, $inputsection.input.element_identifier, $inputsection.input.extension) + @PATH <Panel height="$inputsection.section_height" name="Panel${label}" width="$width"> ## First track is the coverage <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"> @@ -59,7 +64,7 @@ #for $i, $inputsection in enumerate($inputfiles): #if not $inputsection.input.is_of_type('bam') #set $label=str($inputsection.label) if str($inputsection.label) else str($inputsection.input.element_identifier) - #set $path="%s.%s.%s" % ($i, $inputsection.input.element_identifier, $inputsection.input.extension) + @PATH@ <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"/> #end if #end for @@ -75,6 +80,7 @@ </configfile> <configfile name="igv_preferences"> SAM.SHOW_SOFT_CLIPPED=$show_softclippped +SAM.FILTER_SECONDARY_ALIGNMENTS=$filter_secondary </configfile> </configfiles> <inputs> @@ -103,6 +109,7 @@ </param> </repeat> <param name="show_softclippped" type="boolean" label="Show softclipped bases?" truevalue="true" falsevalue="false" checked="true"/> + <param name="filter_secondary" type="boolean" label="Filter out secondary reads" truevalue="true" falsevalue="false" checked="true"/> <param name="script_file" type="data" format="txt" label="Select a IGV script with regions for which to take screenshots"/> <param name="width" label="Select the screenshot width" type="integer" min="800" value="1920"/> <param name="height" label="Select the screenshot height" type="integer" min="640" value="1080"/>