Next changeset 1:795270a5555c (2015-03-18) |
Commit message:
Uploaded |
added:
ngsplot_galaxytoolshed/ngsplot_intro/intro.xml ngsplot_galaxytoolshed/ngsplot_main/ngsplot.xml ngsplot_galaxytoolshed/ngsplot_main/runNGSplot.pl ngsplot_galaxytoolshed/ngsplot_replot/replot.xml ngsplot_galaxytoolshed/ngsplot_replot/runreplot.pl |
b |
diff -r 000000000000 -r e6028c2c3da3 ngsplot_galaxytoolshed/ngsplot_intro/intro.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ngsplot_galaxytoolshed/ngsplot_intro/intro.xml Wed Mar 18 14:08:10 2015 -0400 |
b |
@@ -0,0 +1,67 @@ +<tool id="ngs.plot_intro" name="Introduction"> +<command interpreter="perl"> + +</command> + +#if $numsamples.numsamples2 == "1": + runNGSplot.pl + $genome_name + +#else if $numsamples.numsamples2 == "5": + runNGSplot.pl + $genome_name + +#end if: + +<!-- +<inputs> + <param type="text" value="mm9" name="genome_name" label="Intro Text here..." help="" > + </param> +</inputs> +--> + +<help> + +**WELCOME TO NGS.PLOT ON GALAXY** + +----- + +**HOW TO USE** + +To use ngs.plot here on this GUI-based galaxy implementation, first upload your alignment BAM file(s) using the *Get Data* -> **Upload File** tool on top of the left panel of this page. The names of your uploaded file(s) will then be displayed on the right panel. Next, select the *NGS.PLOT V2.47.1* -> **ngs.plot** tool on the left panel and all other input information required from you will be displayed as a form on the main central panel. Complete the form then click the *Execute* button to launch the program. Three output files (a profile chart, a heatmap, and a zipped data file) will be generated and displayed on the right panel, which you can click on to view. To further replot the figures into a format that you desire, use the *NGS.PLOT V2.47.1* -> **replot** tool with it's input file being the zip file previously generated by 'ngs.plot'. + +For a more detailed explanation of how to run ngs.plot on Galaxy, please see the tutorial at https://code.google.com/p/ngsplot/wiki/webngsplot. + +----- + +**INTRODUCTION** + +ngs.plot is a program that allows you to easily visualize your next-generation sequencing (NGS) samples at functional genomic regions. + +DNA sequencing is at the core of genomics. The NGS technology has been tremendously improved in the past few years. It can now determine more than a billion DNA sequences within a week, generating terabytes of data. Applications include but are not limited to: 1. ChIP-seq which profiles genome-wide protein-DNA interactions; 2. RNA-seq which measures the gene expression levels. It is very helpful to look at the enrichment of those sequences at various functional regions. Although a genome browser (such as the UCSC genome browser) allows a researcher to visualize these data, it limits the view to a slice of the genome. While the genome is like a huge collection of functional elements that can be classified into different categories. Each category of elements may perform distinct functions and they might further contain modules. + +The signature advantage of ngs.plot is that it collects a large database of functional elements for many genomes. A user can ask for a functionally important region to be displayed in one command. It handles large sequencing data efficiently and has only modest memory requirement. For example, ngs.plot was used to draw a plot for all the genes on the mouse genome from 71GB of ChIP-seq data in 25 min, with a memory footprint of 2.7GB using 4 x 2.4GHz CPU cores. ngs.plot is also easy to use. A user only needs to create a very small text file called configuration, telling the program which samples to look at and how they should be combined with different regions, and then run the program with one command. This Galaxy web-based version of ngs.plot is also available for users not familiar with command-line programs. For additional program details, please refer to our project homepage at https://code.google.com/p/ngsplot or to the publication cited below. + +----- + +**COMMERCIAL USE** + +ngs.plot is free for use by academic users. If you want to use it in commercial settings, please contact Lisa Placanica at: lisa.placanica@mssm.edu + +**HOW TO CITE** + +Shen, L.*, Shao, N., Liu, X. and Nestler, E. (2014) ngs.plot: Quick mining and visualization of next-generation sequencing data by integrating genomic databases, BMC Genomics, 15, 284. + +**CONTACT** + +ngs.plot is developed by Drs. Li Shen, Ningyi Shao and Xiaochuan Liu at the Icahn School of Medicine at Mount Sinai. If you have technical questions about ngs.plot, please use the discussion forum. For collaborations or any other matters, use: li.shen AT mssm.edu. + +</help> +<outputs> +<!-- + <data format="pdf" name="out_avg_png" /> + <data format="pdf" name="out_hm_png" /> + <data format="zip" name="out_zip"/> +--> +</outputs> +</tool> |
b |
diff -r 000000000000 -r e6028c2c3da3 ngsplot_galaxytoolshed/ngsplot_main/ngsplot.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ngsplot_galaxytoolshed/ngsplot_main/ngsplot.xml Wed Mar 18 14:08:10 2015 -0400 |
b |
b'@@ -0,0 +1,3174 @@\n+<tool id="ngs.plot" name="ngs.plot">\n+<command interpreter="perl">\n+#if $numsamples.numsamples2 == "1":\n+ runNGSplot.pl \n+ $genome_name \n+ $genomic_region_source_type.genomic_region \n+ $genomic_region_source_type.further_information \n+ $genomic_region_source_type.interval_size \n+ $genomic_region_source_type.flanking_region_option_source_type.flanking_region_option \n+ $genomic_region_source_type.flanking_region_option_source_type.flanking_region_size \n+ $numsamples.numsamples2\n+ $numsamples.usepair.usepair1\n+\n+ $numsamples.usepair.bamfile1\n+ $numsamples.usepair.reffile1\n+ $numsamples.usepair.genelist1.usegenelist1\n+ $numsamples.usepair.genelist1.genelist1\n+ $numsamples.usepair.title1\n+ $numsamples.usepair.fraglen1\n+ $numsamples.usepair.linecol1\n+\n+ $gene_database\n+ $randomly_sample\n+ $GO.gene_order\n+ $GO.KNC\n+ $GO.MIT\n+ $GO.NRS\n+ $chunk_size\n+ $quality_requirement\n+ $standard_error\n+ $radius_size\n+ $flooding_fraction\n+ $smooth_method\n+ $shaded_area\n+ $out_zip $out_avg_png $out_hm_png\n+\n+#else if $numsamples.numsamples2 == "2":\n+ runNGSplot.pl \n+ $genome_name \n+ $genomic_region_source_type.genomic_region \n+ $genomic_region_source_type.further_information \n+ $genomic_region_source_type.interval_size \n+ $genomic_region_source_type.flanking_region_option_source_type.flanking_region_option \n+ $genomic_region_source_type.flanking_region_option_source_type.flanking_region_size \n+ $numsamples.numsamples2\n+ $numsamples.usepair.usepair1\n+\n+ $numsamples.usepair.bamfile1\n+ $numsamples.usepair.reffile1\n+ $numsamples.usepair.genelist1.usegenelist1\n+ $numsamples.usepair.genelist1.genelist1\n+ $numsamples.usepair.title1\n+ $numsamples.usepair.fraglen1\n+ $numsamples.usepair.linecol1\n+\n+ $numsamples.usepair.bamfile2\n+ $numsamples.usepair.reffile2\n+ $numsamples.usepair.genelist2.usegenelist2\n+ $numsamples.usepair.genelist2.genelist2\n+ $numsamples.usepair.title2\n+ $numsamples.usepair.fraglen2\n+ $numsamples.usepair.linecol2\n+\n+ $gene_database\n+ $randomly_sample\n+ $GO.gene_order\n+ $GO.KNC\n+ $GO.MIT\n+ $GO.NRS\n+ $chunk_size\n+ $quality_requirement\n+ $standard_error\n+ $radius_size\n+ $flooding_fraction\n+ $smooth_method\n+ $shaded_area\n+ $out_zip $out_avg_png $out_hm_png\n+\n+#else if $numsamples.numsamples2 == "3":\n+ runNGSplot.pl \n+ $genome_name \n+ $genomic_region_source_type.genomic_region \n+ $genomic_region_source_type.further_information \n+ $genomic_region_source_type.interval_size \n+ $genomic_region_source_type.flanking_region_option_source_type.flanking_region_option \n+ $genomic_region_source_type.flanking_region_option_source_type.flanking_region_size \n+ $numsamples.numsamples2\n+ $numsamples.usepair.usepair1\n+\n+ $numsamples.usepair.bamfile1\n+ $numsamples.usepair.reffile1\n+ $numsamples.usepair.genelist1.usegenelist1\n+ $numsamples.usepair.genelist1.genelist1\n+ $numsamples.usepair.title1\n+ $numsamples.usepair.fraglen1\n+ $numsamples.usepair.linecol1\n+\n+ $numsamples.usepair.bamfile2\n+ $numsamples.usepair.reffile2\n+ $numsamples.usepair.genelist2.usegenelist2\n+ $numsamples.usepair.genelist2.genelist2\n+ $numsamples.usepair.title2\n+ $numsamples.usepair.fraglen2\n+ $numsamples.usepair.linecol2\n+\n+ $numsamples.usepair.bamfile3\n+ $numsamples.usepair.reffile3\n+ $numsamples.usepair.genelist3.usegenelist3\n+ $numsamples.usepair.genelist3.genelist3\n+ $numsamples.usepair.title3\n+ $numsamples.usepair.fraglen3\n+ $numsamples.usepair.linecol3\n+\n+ $gene_database\n+ $randomly_sample\n+ $GO.gene_order\n+ $GO.KNC\n+ $GO.MIT\n+ $GO.NRS\n+ $chunk_size\n+ $quality_requirement\n+ $standard_error\n+ $radius_size\n+ $flooding_fraction\n+ $smooth_method\n+ $shaded_area\n+ $out_zip $out_avg_png $out_hm_png\n+\n+#else if $numsamples.numsamples2 == "4":\n+ runNGSplot.pl \n+ $genome_name \n+ $genomic_region_source_type.genomic_region \n+ $genomic_region_so'..b'of the 1st profile</option>\n+ <option value="prod">Product of all profiles on the same region</option>\n+ <option value="diff">Difference between the 1st and 2nd profiles</option>\n+ <option value="km">K-means clustering</option>\n+ <option value="none">No ranking algorithm applied. Use order in gene list.</option>\n+ </param>\n+ <when value="km">\n+ <param type="text" name="KNC" value="5" label="K-means: Number of clusters" help=""/>\n+ <param type="text" name="MIT" value="20" label="K-means: Number of iterations" help=""/>\n+ <param type="text" name="NRS" value="30" label="K-means: Number of random starts" help="K-means is prone to local optima. Restarting it repeatedly may help to find a better solution."/>\n+ </when>\n+ <when value="total">\n+ <param type="hidden" name="KNC" value="NA" />\n+ <param type="hidden" name="MIT" value="NA" />\n+ <param type="hidden" name="NRS" value="NA" />\n+ </when>\n+ <when value="hc">\n+ <param type="hidden" name="KNC" value="NA" />\n+ <param type="hidden" name="MIT" value="NA" />\n+ <param type="hidden" name="NRS" value="NA" />\n+ </when>\n+ <when value="max">\n+ <param type="hidden" name="KNC" value="NA" />\n+ <param type="hidden" name="MIT" value="NA" />\n+ <param type="hidden" name="NRS" value="NA" />\n+ </when>\n+ <when value="prod">\n+ <param type="hidden" name="KNC" value="NA" />\n+ <param type="hidden" name="MIT" value="NA" />\n+ <param type="hidden" name="NRS" value="NA" />\n+ </when>\n+ <when value="diff">\n+ <param type="hidden" name="KNC" value="NA" />\n+ <param type="hidden" name="MIT" value="NA" />\n+ <param type="hidden" name="NRS" value="NA" />\n+ </when>\n+ <when value="none">\n+ <param type="hidden" name="KNC" value="NA" />\n+ <param type="hidden" name="MIT" value="NA" />\n+ <param type="hidden" name="NRS" value="NA" />\n+ </when>\n+ </conditional>\n+ <param name="chunk_size" size="10" type="text" value="100" label="Chunk size for loading genes in batch" help="This parameter controls the behavior of coverage calculation. A smaller value implies lower memory footprint but may increase processing time."/>\n+ <param name="quality_requirement" size="10" type="text" value="20" label="Mapping quality requirement" help="This is the Phred-scale mapping quality score. A score of 20 means an error rate of 1%."/>\n+ <param type="select" name="standard_error" label="Plot standard errors" help="Standard errors will be rendered as shaded area around each curve.">\n+ <option value="1">Yes</option>\n+ <option value="0">No</option>\n+ </param>\n+\n+ <param name="radius_size" size="10" type="text" value="0" label="Fraction of extreme values to be trimmed on both ends" help="The fraction of extreme values that will be trimmed on both ends. Eg. 0.05 will remove 5% of extreme values."/>\n+ <param name="flooding_fraction" size="10" type="text" value="0.02" label="Heatmap flooding fraction" help="Default of 0.02 means that the minimum value is truncated at 2% and the maximum value is truncated at 98%. A higher fraction results in plots that have higher brightness but are less dynamic."/>\n+ <param type="select" name="smooth_method" label="Moving window width to smooth avg. profiles">\n+ <option value="1">No</option>\n+ <option value="3">Slightly</option>\n+ <option value="5">Somewhat</option>\n+ <option value="9">Quite</option>\n+ <option value="13">Super</option>\n+ </param>\n+ <param name="shaded_area" size="10" type="text" value="0" label="Opacity of shaded area under curve" help="Suggested value between 0 and 0.5."/>\n+<!--\n+-->\n+</inputs>\n+\n+<help>---TEST---</help>\n+<outputs>\n+ <data format="pdf" name="out_avg_png" />\n+ <data format="pdf" name="out_hm_png" />\n+ <data format="zip" name="out_zip"/>\n+</outputs>\n+</tool>\n' |
b |
diff -r 000000000000 -r e6028c2c3da3 ngsplot_galaxytoolshed/ngsplot_main/runNGSplot.pl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ngsplot_galaxytoolshed/ngsplot_main/runNGSplot.pl Wed Mar 18 14:08:10 2015 -0400 |
b |
@@ -0,0 +1,144 @@ +#!/usr/bin/perl -w +use strict; +use File::Basename 'dirname'; +use File::Spec; +use Cwd 'abs_path'; + +my @inputs = @ARGV; +my @inputs2 = @inputs; + +my $genome_name = shift(@inputs); +my $genomic_region_source_type__genomic_region = shift(@inputs); +my $genomic_region_source_type__further_information = shift(@inputs); +my $genomic_region_source_type__interval_size = shift(@inputs); +my $genomic_region_source_type__flanking_region_option_source_type__flanking_region_option = shift(@inputs); +my $genomic_region_source_type__flanking_region_option_source_type__flanking_region_size = shift(@inputs); +my $numsamples = shift(@inputs); +my $usepairs = shift(@inputs); + +#print STDERR "inputs @inputs\n"; + +my $randfile = rand(100)."\.config\.txt"; +my $randfile2 = $randfile; +$randfile2 =~ s/config\.txt/logfile/gm; + +my $outfile = File::Spec->catfile(abs_path(dirname(__FILE__)),"$randfile"); +open(FILE,">$outfile"); + +for (my $i=1;$i<=$numsamples;$i++) { + my $bamfile=shift(@inputs); + my $reffile=shift(@inputs); + my $usegenelist=shift(@inputs); + my $genelist=shift(@inputs); + my $title=shift(@inputs); + my $fraglen=shift(@inputs); + my $color=shift(@inputs); + if ($usepairs eq 'yes') { + syswrite(FILE, "$bamfile\:$reffile\t$genelist\t$title\t$fraglen\t$color\n"); + }else { + syswrite(FILE, "$bamfile\t$genelist\t$title\t$fraglen\t$color\n"); + } +} +close(FILE); + +my $gene_database = shift(@inputs); +my $randomly_sample = shift(@inputs); +my $gene_order = shift(@inputs); +my $knc = shift(@inputs); +my $mit = shift(@inputs); +my $nrs = shift(@inputs); +my $chunk_size = shift(@inputs); +my $quality_requirement = shift(@inputs); +my $standard_error = shift(@inputs); +my $radius_size = shift(@inputs); +my $flooding_fraction = shift(@inputs); +my $smooth_method = shift(@inputs); +my $shaded_area = shift(@inputs); +my $out_name = shift(@inputs); +my $out_avg_name = shift(@inputs); +my $out_hm_name = shift(@inputs); + + +my $G = $genome_name; +my $R = $genomic_region_source_type__genomic_region; +my $C = $outfile; +my $O = $out_name; +my $O2 = $out_avg_name; +my $O3 = $out_hm_name; +my $F = $genomic_region_source_type__further_information; +my $D = $gene_database; +my $L = $genomic_region_source_type__flanking_region_option_source_type__flanking_region_size; +my $N = $genomic_region_source_type__flanking_region_option_source_type__flanking_region_size; +my $RB = $radius_size; +my $S = $randomly_sample; +my $CS = $chunk_size; +my $MQ = $quality_requirement; +my $IN = $genomic_region_source_type__interval_size; +my $SE = $standard_error; +my $MW = $smooth_method; +my $H = $shaded_area; +my $GO = $gene_order; +my $KNC = $knc; +my $MIT = $mit; +my $NRS = $nrs; +my $FC = $flooding_fraction; + +if ($GO eq 'km') { + $GO = "$GO -KNC $KNC -MIT $MIT -NRS $NRS"; +} + +my $logfile = File::Spec->catfile(abs_path(dirname(__FILE__)),"$randfile2"); +open(FILE2,">>$logfile"); +my $cmd5="pwd >> $logfile 2>&1"; +system($cmd5); + +my $cmd=''; +if (($R eq 'tss')||($R eq 'tes')) { + $cmd = "ngs.plot.r -Galaxy 1 -P 0 -G $G -R $R -C $C -O $O -O2 $O2 -O3 $O3 -D $D -L $L -S $S -GO $GO -CS $CS -MQ $MQ -SE $SE -RB $RB -FC $FC -MW $MW -H $H >> $logfile 2>&1"; +}elsif ($genomic_region_source_type__flanking_region_option_source_type__flanking_region_option eq 'flanking_region_size') { + if ($IN eq 'automatic') { + $cmd = "ngs.plot.r -Galaxy 1 -P 0 -G $G -R $R -C $C -O $O -O2 $O2 -O3 $O3 -D $D -L $L -S $S -GO $GO -CS $CS -MQ $MQ -SE $SE -RB $RB -FC $FC -MW $MW -H $H >> $logfile 2>&1"; + }else { + $cmd = "ngs.plot.r -Galaxy 1 -P 0 -G $G -R $R -C $C -O $O -O2 $O2 -O3 $O3 -D $D -L $L -S $S -GO $GO -CS $CS -MQ $MQ -SE $SE -RB $RB -FC $FC -MW $MW -H $H -IN $IN >> $logfile 2>&1"; + } +}elsif ($genomic_region_source_type__flanking_region_option_source_type__flanking_region_option eq 'flanking_floating_size') { + if ($IN eq 'automatic') { + $cmd = "ngs.plot.r -Galaxy 1 -P 0 -G $G -R $R -C $C -O $O -O2 $O2 -O3 $O3 -D $D -N $N -S $S -GO $GO -CS $CS -MQ $MQ -SE $SE -RB $RB -FC $FC -MW $MW -H $H >> $logfile 2>&1"; + }else { + $cmd = "ngs.plot.r -Galaxy 1 -P 0 -G $G -R $R -C $C -O $O -O2 $O2 -O3 $O3 -D $D -N $N -S $S -GO $GO -CS $CS -MQ $MQ -SE $SE -RB $RB -FC $FC -MW $MW -H $H -IN $IN >> $logfile 2>&1"; + } +} +my $cmd2="cp data.zip $O"; +my $cmd3="rm $outfile"; +my $cmd4="rm $logfile"; +syswrite(FILE2, "\n$cmd\n"); +syswrite(FILE2, "\n$cmd2\n"); +syswrite(FILE2, "\n$cmd3\n"); +syswrite(FILE2, "\n$cmd4\n\n"); + +#my $outfile2=$outfile; +#my $logfile2=$logfile; +#$outfile2 =~ s/^\S+\///gm; +#$logfile2 =~ s/^\S+\///gm; +#my $cmd3="cp $outfile /home/galaxy/Programs/galaxy-dist/tools/ngsplot/a$outfile2"; +#my $cmd4="cp $logfile /home/galaxy/Programs/galaxy-dist/tools/ngsplot/a$logfile2"; + + +system($cmd); +system($cmd2); +system($cmd3); +system($cmd4); + +close(FILE2); + +#my $count=0; +#foreach my $entry (@inputs2) { +# $count++; +# syswrite(FILE2, "$count: $entry\n"); +#} + + + + + + |
b |
diff -r 000000000000 -r e6028c2c3da3 ngsplot_galaxytoolshed/ngsplot_replot/replot.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ngsplot_galaxytoolshed/ngsplot_replot/replot.xml Wed Mar 18 14:08:10 2015 -0400 |
[ |
b'@@ -0,0 +1,157 @@\n+<tool id="replot" name="replot">\n+<command interpreter="perl">\n+#if $outtype.outtype2 == "prof":\n+ runreplot.pl $input_zipfile $outtype.outtype2 $output_filename \n+ $outtype.WD\n+ $outtype.HG\n+ $outtype.SE\n+ $outtype.H\n+ $outtype.MW\n+ $outtype.Y.Y2\n+ $outtype.Y.Y3\n+ $outtype.LEG\n+ $outtype.BOX\n+ $outtype.VLN\n+ $outtype.XYL\n+ $outtype.LWD\n+ $outtype.FS\n+#else if $outtype.outtype2 == "heatmap":\n+ runreplot.pl $input_zipfile $outtype.outtype2 $output_filename \n+ $outtype.GO.GO2\n+ $outtype.GO.KNC\n+ $outtype.GO.MIT\n+ $outtype.GO.NRS\n+ $outtype.LOW\n+ $outtype.RR\n+ $outtype.FC\n+ $outtype.CO\n+ $outtype.CD\n+ $outtype.FS\n+ dummy\n+ dummy\n+ dummy\n+#end if:\n+\n+</command>\n+\n+<!-->\n+\n+\n+<-->\n+\n+<inputs>\n+ <param type="data" name="input_zipfile" multiple="false" label="Input zip file created by ngsplot"/>\n+\n+ <conditional name="outtype">\n+ <param type="select" name="outtype2" label="Select figure type to replot">\n+ <option value="prof">Coverage Profile</option>\n+ <option value="heatmap">Heatmap</option>\n+ </param>\n+\n+ <when value="prof">\n+ <param type="text" name="WD" value="8" label="Image width in inches" />\n+ <param type="text" name="HG" value="7" label="Image height in inches" />\n+ <param type="select" name="SE" label="Standard error shading" >\n+ <option value="1">Yes, include standard error shading</option>\n+ <option value="0">No, exclude standard error shading</option>\n+ </param>\n+ <param type="text" name="H" value="0" label="Opacity of shaded area under each curve" help="Use 0 for no shading. Suggested value of between 0 and 0.5 will add a semi-transparent shade under each curve."/>\n+ <param type="text" name="MW" value="1" label="Moving window width to smooth average profiles" help="The unit of the window size is a data point. In ngs.plot, the number of data points on the X-axis is 100. A moving window width of 10 means averaging over 10% of the entire X-axis."/>\n+ <conditional name="Y">\n+ <param type="select" name="Y2" label="Define Y-axis scale?" >\n+ <option value="no">No, let program decide</option>\n+ <option value="yes">Yes</option>\n+ </param>\n+ <when value="yes">\n+ <param type="text" name="Y3" value="0,100" label="Y-axis min_val,max_val" help="Enter minimum and maximum value separated by comma" />\n+ </when>\n+ <when value="no">\n+ <param type="hidden" name="Y3" value="na" label="test"/>\n+ </when>\n+ </conditional>\n+ <param type="select" name="LEG" label="Draw legend?" >\n+ <option value="1">Yes</option>\n+ <option value="0">No</option>\n+ </param>\n+ <param type="select" name="BOX" label="Draw box around plot?" >\n+ <option value="1">Yes</option>\n+ <option value="0">No</option>\n+ </param>\n+ <param type="select" name="VLN" label="Draw vertical lines?" >\n+ <option value="1">Yes</option>\n+ <option value="0">No</option>\n+ </param>\n+ <param type="select" name="XYL" label="Draw axis labels?" >\n+ <option value="1">Yes</option>\n+ <option value="0">No</option>\n+ </param>\n+ <param type="text" name="LWD" value="3" label="Line width" />\n+ <param type="text" name="FS" value="12" label="Font size" />\n+<!-->\n+<-->\n+\n+ </when>\n+ <when value="heatmap">\n+ <conditional name="GO">\n+ <param type="select" name="GO2" label="Gene order algorithm" >\n+ <option value="total">Overall enrichment of the 1st profile (default)</option>\n+ <option value="hc">Hierarchial clustering</option>\n+ <option value="max">Peak value of the 1st profile</option>\n+ <option value="prod">Product of all profiles on the same '..b'tarting it repeatedly may help to find a better solution."/>\n+ </when> \n+ <when value="hc">\n+ <param type="hidden" name="KNC" value="NA" label="K-means: Number of clusters" help=""/>\n+ <param type="hidden" name="MIT" value="NA" label="K-means: Number of iterations" help=""/>\n+ <param type="hidden" name="NRS" value="NA" label="K-means: Number of random starts" help="K-means is prone to local optima. Restarting it repeatedly may help to find a better solution."/>\n+ </when> \n+ <when value="max">\n+ <param type="hidden" name="KNC" value="NA" label="K-means: Number of clusters" help=""/>\n+ <param type="hidden" name="MIT" value="NA" label="K-means: Number of iterations" help=""/>\n+ <param type="hidden" name="NRS" value="NA" label="K-means: Number of random starts" help="K-means is prone to local optima. Restarting it repeatedly may help to find a better solution."/>\n+ </when> \n+ <when value="prod">\n+ <param type="hidden" name="KNC" value="NA" label="K-means: Number of clusters" help=""/>\n+ <param type="hidden" name="MIT" value="NA" label="K-means: Number of iterations" help=""/>\n+ <param type="hidden" name="NRS" value="NA" label="K-means: Number of random starts" help="K-means is prone to local optima. Restarting it repeatedly may help to find a better solution."/>\n+ </when> \n+ <when value="diff">\n+ <param type="hidden" name="KNC" value="NA" label="K-means: Number of clusters" help=""/>\n+ <param type="hidden" name="MIT" value="NA" label="K-means: Number of iterations" help=""/>\n+ <param type="hidden" name="NRS" value="NA" label="K-means: Number of random starts" help="K-means is prone to local optima. Restarting it repeatedly may help to find a better solution."/>\n+ </when> \n+ <when value="none">\n+ <param type="hidden" name="KNC" value="NA" label="K-means: Number of clusters" help=""/>\n+ <param type="hidden" name="MIT" value="NA" label="K-means: Number of iterations" help=""/>\n+ <param type="hidden" name="NRS" value="NA" label="K-means: Number of random starts" help="K-means is prone to local optima. Restarting it repeatedly may help to find a better solution."/>\n+ </when> \n+ </conditional>\n+ <param type="text" name="LOW" value="10" label="Low count cutoff in rank-based normalization" help="This number is in raw read counts."/>\n+ <param type="text" name="RR" value="30" label="Reduce ratio" help="This controls the heatmap height. The smaller the value, the taller the heatmap." />\n+ <param type="text" name="FC" value="0.02" label="Flooding fraction" help="The default value of 0.02 means that the minimum value is truncated at 2% and the maximum value is truncated at 98%. A higher fraction results in plots that have higher brightness but are less dynamic." />\n+ <param type="text" name="CO" value="default" label="Color for heatmap" help="For non bam-pair plots, input a single color. For bam-pair plots, use color-tri format (neg_color:[neu_color]:pos_color). Hint: must use R colors, such as darkgreen, yellow and blue2. The neutral color is optional(default=black)." />\n+ <param type="text" name="CD" value="0.6" label="Color distribution for heatmap" help="Must be a positive number. Hint: lower values give more widely spaced colors at the negative end. In other words, they shift the neutral color to positive values. If set to 1, the neutral color represents 0(i.e. no bias). If set to >1, the neutral color represents a negative value." />\n+ <param type="text" name="FS" value="12" label="Font size" />\n+ </when>\n+ </conditional>\n+<!--\n+-->\n+</inputs>\n+\n+<help>---TEST---</help>\n+<outputs>\n+ <data format="pdf" name="output_filename" />\n+</outputs>\n+</tool>\n' |
b |
diff -r 000000000000 -r e6028c2c3da3 ngsplot_galaxytoolshed/ngsplot_replot/runreplot.pl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ngsplot_galaxytoolshed/ngsplot_replot/runreplot.pl Wed Mar 18 14:08:10 2015 -0400 |
[ |
@@ -0,0 +1,63 @@ +#!/usr/bin/perl -w +use strict; +use File::Basename 'dirname'; +use File::Spec; +use Cwd 'abs_path'; + +my $input_file = $ARGV[0]; +my $output_type = $ARGV[1]; +my $output_filename = $ARGV[2]; + +my $cmd1 = "cp $input_file data.zip"; +my $cmd2 = ""; +my $cmd3 = "mv output.pdf $output_filename"; + +my $FS = ""; +if ($output_type eq 'prof') { + my $WD = "-WD $ARGV[3]"; + my $HG = "-HG $ARGV[4]"; + my $SE = "-SE $ARGV[5]"; + my $H = "-H $ARGV[6]"; + my $MW = "-MW $ARGV[7]"; + my $Y = "-Y $ARGV[8]"; + my $YAS = "-YAS $ARGV[9]"; + my $LEG = "-LEG $ARGV[10]"; + my $BOX = "-BOX $ARGV[11]"; + my $VLN = "-VLN $ARGV[12]"; + my $XYL = "-XYL $ARGV[13]"; + my $LWD = "-LWD $ARGV[14]"; + $FS = "-FS $ARGV[15]"; + + if ($Y =~ /no$/gm) { + $cmd2 = "replot.r $output_type -I data.zip -O output $WD $HG $SE $H $MW $LEG $BOX $VLN $XYL $LWD $FS"; + }else { + $cmd2 = "replot.r $output_type -I data.zip -O output $WD $HG $SE $H $MW $LEG $BOX $VLN $XYL $LWD $FS $YAS"; + } +}elsif ($output_type eq 'heatmap') { + my $GO = "-GO $ARGV[3]"; + my $KNC = "-KNC $ARGV[4]"; + my $MIT = "-MIT $ARGV[5]"; + my $NRS = "-NRS $ARGV[6]"; + my $LOW = "-LOW $ARGV[7]"; + my $RR = "-RR $ARGV[8]"; + my $FC = "-FC $ARGV[9]"; + my $CO = "-CO $ARGV[10]"; + my $CD = "-CD $ARGV[11]"; + $FS = "-FS $ARGV[12]"; + my $DUM1 = $ARGV[13]; + my $DUM2 = $ARGV[14]; + my $DUM3 = $ARGV[15]; + + if ($CO =~ /default/gm) { $CO = ""; } + + if ($GO =~ /km$/gm) { + $cmd2 = "replot.r $output_type -I data.zip -O output $LOW $RR $FC $CO $CD $FS $GO $KNC $MIT $NRS"; + }else { + $cmd2 = "replot.r $output_type -I data.zip -O output $LOW $RR $FC $CO $CD $FS $GO"; + } +} +system($cmd1); +system($cmd2); +system($cmd3); + + |