Mercurial > repos > bgruening > hicexplorer_chicplotviewpoint
changeset 4:ac7999229ac6 draft
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/hicexplorer commit db84cc85222518217286b42262935edd3a49c98e"
line wrap: on
line diff
--- a/chicPlotViewpoint.xml Tue Mar 24 14:12:09 2020 -0400 +++ b/chicPlotViewpoint.xml Fri Aug 14 06:02:35 2020 -0400 @@ -1,4 +1,4 @@ -<tool id="hicexplorer_chicplotviewpoint" name="@BINARY@" version="@WRAPPER_VERSION@.0"> +<tool id="hicexplorer_chicplotviewpoint" name="@BINARY@" version="@WRAPPER_VERSION@.1"> <description>creates plots for viewpoints</description> <macros> <token name="@BINARY@">chicPlotViewpoint</token> @@ -13,41 +13,51 @@ mkdir significantFolder && mkdir plots && + #if $tar_input_conditional.tar_input_selector == 'tar_input': + ln -s '$tar_input_conditional.interactionFiles' viewpoints.tar && + tar -C interactionFiles -xvf viewpoints.tar && - #for $file in $interactionFiles: - #set identifier = @ESCAPE_IDENTIFIER_FILE@ - ln -s '$file' 'interactionFiles/$identifier' && - #end for + #if $differentialFiles: + ln -s '$tar_input_conditional.differentialFiles' differential.tar && + tar -C differentialFolder -xvf differential.tar && + #end if + #if $significantFiles: + ln -s '$tar_input_conditional.significantFiles' significantFiles.tar && + tar -C significantFolder -xvf significantFiles.tar && + #end if + #else: + #for $file in $tar_input_conditional.interactionFiles: + #set identifier = @ESCAPE_IDENTIFIER_FILE@ + ln -s '$file' 'interactionFiles/$identifier' && + #end for - #if $differentialFiles: - #for $file in $differentialFiles: - #set identifier = @ESCAPE_IDENTIFIER_FILE@ - ln -s '$file' 'differentialFolder/$identifier' && + #for $file in $tar_input_conditional.differentialFiles: + #set identifier = @ESCAPE_IDENTIFIER_FILE@ + ln -s '$file' 'differentialFolder/$identifier' && + #end for + + #for $file in $tar_input_conditional.significantFiles: + #set identifier = @ESCAPE_IDENTIFIER_FILE@ + ln -s '$file' 'significantFolder/$identifier' && #end for #end if - #if $significantFiles: - #for $file in $significantFiles: - #set identifier = @ESCAPE_IDENTIFIER_FILE@ - ln -s '$file' 'significantFolder/$identifier' && - #end for - #end if #if $batchmode_conditional.batchmode_selector == 'optionSinglemode': - #set $interactonfileslist = ' '.join([ '\'interactionFiles/%s\'' % @ESCAPE_IDENTIFIER_FILE@ for $file in $interactionFiles ]) - #set $differentialfileslist = ' '.join([ '\'differentialFolder/%s\'' % @ESCAPE_IDENTIFIER_FILE@ for $file in $differentialFiles ]) - #set $significantfileslist = ' '.join([ '\'significantFolder/%s\'' % @ESCAPE_IDENTIFIER_FILE@ for $file in $significantFiles ]) + #set $interactonfileslist = ' '.join([ '\'interactionFiles/%s\'' % @ESCAPE_IDENTIFIER_FILE@ for $file in $tar_input_conditional.interactionFiles ]) + #set $differentialfileslist = ' '.join([ '\'differentialFolder/%s\'' % @ESCAPE_IDENTIFIER_FILE@ for $file in $tar_input_conditional.differentialFiles ]) + #set $significantfileslist = ' '.join([ '\'significantFolder/%s\'' % @ESCAPE_IDENTIFIER_FILE@ for $file in $tar_input_conditional.significantFiles ]) #end if @BINARY@ #if $batchmode_conditional.batchmode_selector == 'optionSinglemode': --interactionFile $interactonfileslist - #if $differentialFiles: + #if $tar_input_conditional.differentialFiles: --differentialTestResult $differentialfileslist #end if - #if $significantFiles: + #if $tar_input_conditional.significantFiles: --significantInteractions $significantfileslist #end if @@ -104,14 +114,34 @@ #if $batchmode_conditional.batchmode_selector == 'optionSinglemode': && mv out_plot.$image_file_format plots/out_plot.$image_file_format #end if + + #if $tar: + && cd plots + && tar -cvf ../plots.tar * + && cd .. + && rm -rf plots + #end if ]]></command> <inputs> - <param name='interactionFiles' type="data" format="interval" label="Interaction files" multiple="true"/> - <param name='differentialFiles' type="data" format="interval" label="Rejected H0 files" multiple="true" optional='true'/> - <param name='significantFiles' type="data" format="interval" label="Significant interaction files" multiple="true" optional='true'/> + <conditional name="tar_input_conditional"> + <param name="tar_input_selector" type="select" label="Compute files individually or in batch mode"> + <option value="tar_input">Tar file</option> + <option value="interval_input" selected="True">Interval files</option> + </param> + <when value="tar_input"> + <param name='interactionFiles' type="data" format="tar" label="Interaction files" multiple="false"/> + <param name='differentialFiles' type="data" format="tar" label="Rejected H0 files" multiple="true" optional='false'/> + <param name='significantFiles' type="data" format="tar" label="Significant interaction files" multiple="true" optional='false'/> + </when> + <when value="interval_input"> + <param name='interactionFiles' type="data" format="interval" label="Interaction files" multiple="true"/> + <param name='differentialFiles' type="data" format="interval" label="Rejected H0 files" multiple="true" optional='true'/> + <param name='significantFiles' type="data" format="interval" label="Significant interaction files" multiple="true" optional='true'/> + </when> + </conditional> - <param name="rangeUpstream" type="integer" value="500000" label="Upstream range" help='Defines the region upstream of a reference point which should be considered in the analysis.' /> - <param name="rangeDownstream" type="integer" value="500000" label="Downstream range" help='Defines the region upstream of a reference point which should be considered in the analysis.' /> + <param name="rangeUpstream" type="integer" value="100000" label="Upstream range" help='Defines the region upstream of a reference point which should be considered in the analysis.' /> + <param name="rangeDownstream" type="integer" value="100000" label="Downstream range" help='Defines the region upstream of a reference point which should be considered in the analysis.' /> <param argument="--backgroundModelFile" type="data" format='tabular' label="Background model" help="The background file computed by chicViewpointBackgroundModel" optional='true'/> @@ -151,19 +181,26 @@ <param name='truncateZeroPvalues' type='boolean' truevalue='--truncateZeroPvalues' falsevalue="" checked="false" label="Truncate zeros by setting them to one." help="Sets all p-values which are equal to zero to one. This has the effect that the associated positions are not disturbing the presenation of small p-values."/> - + <param name='tar' type='boolean' checked="false" truevalue='True' label="tar output to one file" + help="The output is tarred to one file and not written to a collection. Set this option if the number of files is large."/> + </inputs> <outputs> <collection name="plotsCollection" type="list" label="cHi-C viewpoint plots"> <discover_datasets pattern="__name_and_ext__" directory="plots" /> </collection> - + <data name="plotsTar" from_work_dir="plots.tar" format="tar" label="cHi-C viewpoint plots tar"> + <filter>tar</filter> + </data> </outputs> <tests> <test> - <param name="interactionFiles" value="cHi-C/chicViewpoint/output_1/FL-E13-5_chr1_chr1_14300280_14300280_Eya1.txt,cHi-C/chicViewpoint/output_1/FL-E13-5_chr1_chr1_4487435_4487435_Sox17.txt,cHi-C/chicViewpoint/output_1/FL-E13-5_chr1_chr1_19093103_19093103_Tfap2d.txt,cHi-C/chicViewpoint/output_1/MB-E10-5_chr1_chr1_4487435_4487435_Sox17.txt,cHi-C/chicViewpoint/output_1/MB-E10-5_chr1_chr1_14300280_14300280_Eya1.txt,cHi-C/chicViewpoint/output_1/MB-E10-5_chr1_chr1_19093103_19093103_Tfap2d.txt"/> - <param name="differentialFiles" value="cHi-C/chicDifferentialTest/batch_mode_fisher_outfile/FL-E13-5_MB-E10-5_chr1_chr1_4487435_4487435_Sox17_H0_rejected.txt,cHi-C/chicDifferentialTest/batch_mode_fisher_outfile/FL-E13-5_MB-E10-5_chr1_chr1_14300280_14300280_Eya1_H0_rejected.txt,cHi-C/chicDifferentialTest/batch_mode_fisher_outfile/FL-E13-5_MB-E10-5_chr1_chr1_19093103_19093103_Tfap2d_H0_rejected.txt"/> - <param name="significantFiles" value="cHi-C/chicSignificantInteractions/output_5/FL-E13-5_chr1_chr1_4487435_4487435_Sox17_significant_interactions.txt,cHi-C/chicSignificantInteractions/output_5/FL-E13-5_chr1_chr1_14300280_14300280_Eya1_significant_interactions.txt,cHi-C/chicSignificantInteractions/output_5/FL-E13-5_chr1_chr1_19093103_19093103_Tfap2d_significant_interactions.txt,cHi-C/chicSignificantInteractions/output_5/MB-E10-5_chr1_chr1_4487435_4487435_Sox17_significant_interactions.txt,cHi-C/chicSignificantInteractions/output_5/MB-E10-5_chr1_chr1_14300280_14300280_Eya1_significant_interactions.txt,cHi-C/chicSignificantInteractions/output_5/MB-E10-5_chr1_chr1_19093103_19093103_Tfap2d_significant_interactions.txt"/> + <conditional name="tar_input_conditional"> + <param name="tar_input_selector" value='interval_input'/> + <param name="interactionFiles" value="cHi-C/chicViewpoint/output_1/FL-E13-5_chr1_chr1_14300280_14300280_Eya1.txt,cHi-C/chicViewpoint/output_1/FL-E13-5_chr1_chr1_4487435_4487435_Sox17.txt,cHi-C/chicViewpoint/output_1/FL-E13-5_chr1_chr1_19093103_19093103_Tfap2d.txt,cHi-C/chicViewpoint/output_1/MB-E10-5_chr1_chr1_4487435_4487435_Sox17.txt,cHi-C/chicViewpoint/output_1/MB-E10-5_chr1_chr1_14300280_14300280_Eya1.txt,cHi-C/chicViewpoint/output_1/MB-E10-5_chr1_chr1_19093103_19093103_Tfap2d.txt"/> + <param name="differentialFiles" value="cHi-C/chicDifferentialTest/batch_mode_fisher_outfile/FL-E13-5_MB-E10-5_chr1_chr1_4487435_4487435_Sox17_H0_rejected.txt,cHi-C/chicDifferentialTest/batch_mode_fisher_outfile/FL-E13-5_MB-E10-5_chr1_chr1_14300280_14300280_Eya1_H0_rejected.txt,cHi-C/chicDifferentialTest/batch_mode_fisher_outfile/FL-E13-5_MB-E10-5_chr1_chr1_19093103_19093103_Tfap2d_H0_rejected.txt"/> + <param name="significantFiles" value="cHi-C/chicSignificantInteractions/output_5/FL-E13-5_chr1_chr1_4487435_4487435_Sox17_significant_interactions.txt,cHi-C/chicSignificantInteractions/output_5/FL-E13-5_chr1_chr1_14300280_14300280_Eya1_significant_interactions.txt,cHi-C/chicSignificantInteractions/output_5/FL-E13-5_chr1_chr1_19093103_19093103_Tfap2d_significant_interactions.txt,cHi-C/chicSignificantInteractions/output_5/MB-E10-5_chr1_chr1_4487435_4487435_Sox17_significant_interactions.txt,cHi-C/chicSignificantInteractions/output_5/MB-E10-5_chr1_chr1_14300280_14300280_Eya1_significant_interactions.txt,cHi-C/chicSignificantInteractions/output_5/MB-E10-5_chr1_chr1_19093103_19093103_Tfap2d_significant_interactions.txt"/> + </conditional> <conditional name="batchmode_conditional"> @@ -176,7 +213,6 @@ <param name="pvalue" value='True'/> <param name="truncateZeroPvalues" value='True'/> - <!-- <param name="alpha" value='0.5'/> --> <param name='backgroundModelFile' value='cHi-C/background.txt'/> <param name='xFold' value='1.5'/> <output_collection name="plotsCollection" type="list" count="3"> @@ -187,7 +223,26 @@ </test> <test> - <param name="interactionFiles" value="cHi-C/chicViewpoint/output_1/FL-E13-5_chr1_chr1_14300280_14300280_Eya1.txt"/> + <conditional name="tar_input_conditional"> + <param name="tar_input_selector" value='interval_input'/> + <param name="interactionFiles" value="cHi-C/chicViewpoint/output_1/FL-E13-5_chr1_chr1_14300280_14300280_Eya1.txt"/> + </conditional> + + <conditional name="batchmode_conditional"> + <param name="batchmode_selector" value='optionSinglemode'/> + </conditional> + + <output_collection name="plotsCollection" type="list" count="1"> + <element name="out_plot" file="cHi-C/chicPlotViewpoint/FL-E13-5_chr1_chr1_14300280_14300280_Eya1.png" ftype="png" compare='sim_size' delta='40000'/> + + </output_collection> + </test> + + <test> + <conditional name="tar_input_conditional"> + <param name="tar_input_selector" value='interval_input'/> + <param name="interactionFiles" value="cHi-C/chicViewpoint/output_1/FL-E13-5_chr1_chr1_14300280_14300280_Eya1.txt"/> + </conditional> <conditional name="batchmode_conditional"> <param name="batchmode_selector" value='optionSinglemode'/> @@ -200,16 +255,51 @@ </test> <test> - <param name="interactionFiles" value="cHi-C/chicViewpoint/output_1/FL-E13-5_chr1_chr1_14300280_14300280_Eya1.txt"/> + <conditional name="tar_input_conditional"> + <param name="tar_input_selector" value='interval_input'/> + <param name="interactionFiles" value="cHi-C/chicViewpoint/output_1/FL-E13-5_chr1_chr1_14300280_14300280_Eya1.txt,cHi-C/chicViewpoint/output_1/FL-E13-5_chr1_chr1_4487435_4487435_Sox17.txt,cHi-C/chicViewpoint/output_1/FL-E13-5_chr1_chr1_19093103_19093103_Tfap2d.txt,cHi-C/chicViewpoint/output_1/MB-E10-5_chr1_chr1_4487435_4487435_Sox17.txt,cHi-C/chicViewpoint/output_1/MB-E10-5_chr1_chr1_14300280_14300280_Eya1.txt,cHi-C/chicViewpoint/output_1/MB-E10-5_chr1_chr1_19093103_19093103_Tfap2d.txt"/> + <param name="differentialFiles" value="cHi-C/chicDifferentialTest/batch_mode_fisher_outfile/FL-E13-5_MB-E10-5_chr1_chr1_4487435_4487435_Sox17_H0_rejected.txt,cHi-C/chicDifferentialTest/batch_mode_fisher_outfile/FL-E13-5_MB-E10-5_chr1_chr1_14300280_14300280_Eya1_H0_rejected.txt,cHi-C/chicDifferentialTest/batch_mode_fisher_outfile/FL-E13-5_MB-E10-5_chr1_chr1_19093103_19093103_Tfap2d_H0_rejected.txt"/> + <param name="significantFiles" value="cHi-C/chicSignificantInteractions/output_5/FL-E13-5_chr1_chr1_4487435_4487435_Sox17_significant_interactions.txt,cHi-C/chicSignificantInteractions/output_5/FL-E13-5_chr1_chr1_14300280_14300280_Eya1_significant_interactions.txt,cHi-C/chicSignificantInteractions/output_5/FL-E13-5_chr1_chr1_19093103_19093103_Tfap2d_significant_interactions.txt,cHi-C/chicSignificantInteractions/output_5/MB-E10-5_chr1_chr1_4487435_4487435_Sox17_significant_interactions.txt,cHi-C/chicSignificantInteractions/output_5/MB-E10-5_chr1_chr1_14300280_14300280_Eya1_significant_interactions.txt,cHi-C/chicSignificantInteractions/output_5/MB-E10-5_chr1_chr1_19093103_19093103_Tfap2d_significant_interactions.txt"/> + </conditional> <conditional name="batchmode_conditional"> - <param name="batchmode_selector" value='optionSinglemode'/> + <param name="batchmode_selector" value='optionBatchmode'/> + <param name="interactionFilesOrderFile" value='cHi-C/chicViewpoint/fileNames_two_matrices.txt'/> + <param name="differentialFilesOrderFile" value='cHi-C/chicDifferentialTest/rejectedFilesList.txt'/> + <param name="significantInteractionFilesOrderFile" value='cHi-C/chicSignificantInteractions/output_5_significant_files.txt'/> + <param name='computeSampleNumber' value='2'/> + </conditional> + <param name="pvalue" value='True'/> + <param name="truncateZeroPvalues" value='True'/> + + <param name='backgroundModelFile' value='cHi-C/background.txt'/> + <param name='xFold' value='1.5'/> + <param name='tar' value='True'/> + <output name="plotsTar" file="cHi-C/chicPlotViewpoint/batchMode/plots.tar" ftype='tar' compare="sim_size" delta='40000' /> + </test> + + <test> + <conditional name="tar_input_conditional"> + <param name="tar_input_selector" value='tar_input'/> + <param name="interactionFiles" value="cHi-C/chicViewpoint/output_1.tar"/> + <param name="differentialFiles" value="cHi-C/chicDifferentialTest/batch_mode_fisher_outfile.tar"/> + <param name="significantFiles" value="cHi-C/chicSignificantInteractions/significantFilesFolder.tar"/> </conditional> - <output_collection name="plotsCollection" type="list" count="1"> - <element name="out_plot" file="cHi-C/chicPlotViewpoint/FL-E13-5_chr1_chr1_14300280_14300280_Eya1.png" ftype="png" compare='sim_size' delta='40000'/> + <conditional name="batchmode_conditional"> + <param name="batchmode_selector" value='optionBatchmode'/> + <param name="interactionFilesOrderFile" value='cHi-C/chicViewpoint/fileNames_two_matrices.txt'/> + <param name="differentialFilesOrderFile" value='cHi-C/chicDifferentialTest/rejectedFilesList.txt'/> + <param name="significantInteractionFilesOrderFile" value='cHi-C/chicSignificantInteractions/output_5_significant_files.txt'/> + <param name='computeSampleNumber' value='2'/> + </conditional> + <param name="pvalue" value='True'/> + <param name="truncateZeroPvalues" value='True'/> - </output_collection> + <param name='backgroundModelFile' value='cHi-C/background.txt'/> + <param name='xFold' value='1.5'/> + <param name='tar' value='True'/> + <output name="plotsTar" file="cHi-C/chicPlotViewpoint/batchMode/plots.tar" ftype='tar' compare="sim_size" delta='40000' /> </test> </tests> <help><![CDATA[
Binary file test-data/cHi-C/chicPlotViewpoint/FL-E13-5_chr1_chr1_14300280_14300280_Eya1.png has changed
Binary file test-data/cHi-C/chicPlotViewpoint/batchMode/two/Eya1_FL-E13-5_MB-E10-5_chr1_chr1_14300280.png has changed
Binary file test-data/cHi-C/chicPlotViewpoint/batchMode/two/Sox17_FL-E13-5_MB-E10-5_chr1_chr1_4487435.png has changed