Mercurial > repos > mvdbeek > igv_take_screenshots
changeset 31:474837e086cc draft
planemo upload for repository https://github.com/bardin-lab/readtagger/tree/master/galaxy commit cfa400e89cb4bb8de9ca2ca75ee2e50b77c9a610
author | mvdbeek |
---|---|
date | Sun, 20 Jan 2019 13:30:21 -0500 |
parents | 9d6b4d2ca187 |
children | 9382c8499e73 |
files | Dockerfile igv_make_screenshots.xml test-data/igv_session.xml |
diffstat | 3 files changed, 31 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Dockerfile Sun Jan 20 13:30:21 2019 -0500 @@ -0,0 +1,4 @@ +FROM continuumio/miniconda3:4.5.11 + +RUN apt-get update && apt-get install -y xvfb libxrender1 libxtst6 && apt-get clean +RUN conda create -p /usr/local --copy -y -c conda-forge -c bioconda xvfbwrapper samtools igv openjdk=8 freetype font-ttf-dejavu-sans-mono fontconfig coreutils && rm -Rf /opt
--- a/igv_make_screenshots.xml Fri Jun 15 14:01:18 2018 -0400 +++ b/igv_make_screenshots.xml Sun Jan 20 13:30:21 2019 -0500 @@ -15,10 +15,19 @@ ]]></token> </macros> <requirements> + <!-- Conda can't give us a fully functioning xvfb at this time, + need to use custom built container <requirement type="package" version="0.2.9">xvfbwrapper</requirement> - <!-- TODO: uncomment when igv in conda - <requirement type="package" version="2.3.93">igv</requirement> + <requirement type="package" version="2.4.9">igv</requirement> + <requirement type="package" version="1.6.6">xorg-libx11</requirement> + <requirement type="package" version="1.17.4">xorg-x11-server-xvfb-cos6-x86_64</requirement> + <requirement type="package" version="11.0.7">mesa-libgl-cos6-x86_64</requirement> + <requirement type="package" version="2.0.94">libselinux-cos6-x86_64</requirement> + <requirement type="package" version="1.0.2">openssl</requirement> + <requirement type="package" version="1.9">samtools</requirement> + <requirement type="package" version="8.30">coreutils</requirement> --> + <container type="docker">mvdbeek/igv_make_screenshots:0.1.2</container> </requirements> <command detect_errors="exit_code"><![CDATA[ #if $genome_source.input_type_selector == 'history': @@ -27,24 +36,23 @@ ln -s '$genome_source.genome.fields.path' genome.fa && #end if samtools faidx genome.fa && -sed -i.bak -e "s|\"genome.fa\"|\"\$PWD/genome.fa\"|g" '$igv_session' && +cp '$igv_session' igv_session.xml && +sed -i.bak -e "s|\"genome.fa\"|\"\$PWD/genome.fa\"|g" igv_session.xml && #for $i, $inputsection in enumerate($inputfiles): @PATH@ ln -fs '$inputsection.input' '$path' && - sed -i.bak -e "s|\"$path\"|\"\$PWD/$path\"|g" '$igv_session' && + sed -i.bak -e "s|\"$path\"|\"\$PWD/$path\"|g" igv_session.xml && #if $inputsection.input.is_of_type('bam') ln -fs $inputsection.input.metadata.bam_index '$path'.bai && #end if #end for -ln -fs $igv_session igv_session.xml && cat '$load_session' > load_session.txt && echo snapshotDirectory "\$PWD" >> load_session.txt && cat load_session.txt '$script_file' '$exit_session' > igv_script.txt && cp '$igv_session_remote' '$igv_session_out' #if not $skip_screenshots: && python $__tool_directory__/xvfb_igv.py igv_script.txt '$igv_preferences' $width,$height && - zip screenshots.zip *.png && - cp screenshots.zip '$screenshots_out' + mkdir screenshots && mv *.png screenshots #end if ]]></command> <configfiles> @@ -162,19 +170,22 @@ <param name="height" label="Select the screenshot height" type="integer" min="640" value="1080"/> </inputs> <outputs> - <data name="igv_session_out" format="xml"/> - <data name="screenshots_out" format="zip"> + <data name="igv_session_out" format="xml" label="IGV session for ${on_string}"/> + <collection name="screenshots_out" type="list" label="IGV screenshots for ${on_string}"> <filter>skip_screenshots == False</filter> - </data> + <discover_datasets pattern="__name_and_ext__" directory="screenshots" /> + </collection> </outputs> <tests> <test> <param name="genome_source|input_type_selector" value="history"/> <param name="genome_source|genome" value="rover_reference.fa"/> + <param name="script_file" value="complete_batchscript.txt"/> <repeat name="inputfiles"> <param name="input" value="rover_corrected.bam"/> </repeat> <output name="igv_session_out" file="igv_session.xml" lines_diff="6"/> + <output_collection name="screenshots_out" type="list" count="1"/> </test> </tests> <help><![CDATA[
--- a/test-data/igv_session.xml Fri Jun 15 14:01:18 2018 -0400 +++ b/test-data/igv_session.xml Sun Jan 20 13:30:21 2019 -0500 @@ -1,13 +1,15 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> -<Session genome="/Users/mvandenb/src/galaxy/database/jobs_directory/000/350/working/genome.fa" hasGeneTrack="false" hasSequenceTrack="true" version="8"> +<Session genome="dm6" hasGeneTrack="true" hasSequenceTrack="true" version="8"> <Resources> - <Resource path="/Users/mvandenb/src/galaxy/database/jobs_directory/000/350/working/0.rover_corrected.bam.bam"/> +<Resource path="http://localhost:8080/display_application/d836242eec778a25/igv_bam/local_default/None/data/galaxy_d836242eec778a25.bam"/> </Resources> + + <Panel height="300" name="Panelrover_corrected.bam" width="1920"> - <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="0.rover_corrected.bam.bam_coverage" name="rover_corrected.bam Coverage" showReference="false" snpThreshold="0.2" sortable="true" visible="true"> + <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="http://localhost:8080/display_application/d836242eec778a25/igv_bam/local_default/None/data/galaxy_d836242eec778a25.bam_coverage" name="rover_corrected.bam Coverage" showReference="false" snpThreshold="0.2" sortable="true" visible="true"> <DataRange baseline="0.0" drawBaseline="true" flipAxis="false" maximum="10.0" minimum="0.0" type="LINEAR"/> </Track> - <Track altColor="0,0,178" autoScale="false" color="0,0,178" displayMode="EXPANDED" featureVisibilityWindow="-1" fontSize="10" id="/Users/mvandenb/src/galaxy/database/jobs_directory/000/350/working/0.rover_corrected.bam.bam" name="rover_corrected.bam" sortable="true" visible="true"> + <Track altColor="0,0,178" autoScale="false" color="0,0,178" displayMode="EXPANDED" featureVisibilityWindow="-1" fontSize="10" id="http://localhost:8080/display_application/d836242eec778a25/igv_bam/local_default/None/data/galaxy_d836242eec778a25.bam" name="rover_corrected.bam" sortable="true" visible="true"> <RenderOptions colorByTag="CD" 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"/> </Track> </Panel>