Mercurial > repos > artbio > small_rna_map
changeset 4:6ff925458e05 draft
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/small_rna_map commit dcd643f146afe371d3e418aa91ddbaff6211a09a
author | artbio |
---|---|
date | Tue, 18 Jul 2017 17:35:52 -0400 |
parents | 2e0dc6032a98 |
children | d65045e976e6 |
files | lattice_small_rna_map.r small_rna_map.xml test-data/output_lattice.pdf test-data/output_lattice_doubled.pdf |
diffstat | 4 files changed, 6 insertions(+), 29 deletions(-) [+] |
line wrap: on
line diff
--- a/lattice_small_rna_map.r Tue Jul 18 13:34:36 2017 -0400 +++ b/lattice_small_rna_map.r Tue Jul 18 17:35:52 2017 -0400 @@ -34,7 +34,8 @@ combineLimits(xyplot(Nbr_reads~Coordinate|factor(Dataset, levels=unique(Dataset))+factor(Chromosome, levels=unique(Chromosome)), data=df, type='h', - scales= list(relation="free", x=list(rot=0, cex=0.7, axs="i", tck=0.1), y=list(tick.number=4, rot=90, cex=0.7)), + lwd=1.5, + scales= list(relation="free", x=list(rot=0, cex=0.7, axs="i", tck=0.5), y=list(tick.number=4, rot=90, cex=0.7)), xlab=NULL, main=NULL, ylab=NULL, as.table=T, origin = 0, @@ -51,7 +52,7 @@ sizeplot = xyplot(Median~Coordinate|factor(Dataset, levels=unique(Dataset))+factor(Chromosome, levels=unique(Chromosome)), data=df, type='p', - cex=0.5, + cex=0.35, pch=19, scales= list(relation="free", x=list(rot=0, cex=0, axs="i", tck=0.5), y=list(tick.number=4, rot=90, cex=0.7)), xlab=NULL, main=NULL, ylab=NULL, @@ -75,7 +76,7 @@ ## GRAPHS -if (n_genes > 7) {page_height_simple = 11.69; page_height_combi=11.69; rows_per_page=10} else { +if (n_genes > 5) {page_height_simple = 11.69; page_height_combi=11.69; rows_per_page=6} else { rows_per_page= n_genes; page_height_simple = 2.5*n_genes; page_height_combi=page_height_simple*2 } if (n_samples > 4) {page_width = 8.2677*n_samples/4} else {page_width = 8.2677*n_samples/2} # to test
--- a/small_rna_map.xml Tue Jul 18 13:34:36 2017 -0400 +++ b/small_rna_map.xml Tue Jul 18 17:35:52 2017 -0400 @@ -1,10 +1,9 @@ -<tool id="small_rna_map" name="small rna map" version="0.3.0"> +<tool id="small_rna_map" name="small rna map" version="0.4.0"> <description></description> <requirements> <requirement type="package" version="1.11.2=py27_0">numpy</requirement> <requirement type="package" version="0.11.2.1=py27_0">pysam</requirement> <requirement type="package" version="1.3.2=r3.3.1_0">r-optparse</requirement> - <requirement type="package" version="2.2.1=r3.3.1_0">r-ggplot2</requirement> <requirement type="package" version="0.6_28=r3.3.1_0">r-latticeextra</requirement> <requirement type="package" version="2.2.1=r3.3.1_0">r-gridextra</requirement> </requirements> @@ -22,19 +21,10 @@ '$sample.name' #end for --output '$output_tab' && - #if $R_method=='lattice': - Rscript '$__tool_directory__'/lattice_small_rna_map.r --output_tab '$output_tab' --output_pdf '$output_pdf' - #else: - Rscript '$__tool_directory__'/small_rna_map.r --output_tab '$output_tab' --output_pdf '$output_pdf' - #end if + Rscript '$__tool_directory__'/lattice_small_rna_map.r --output_tab '$output_tab' --output_pdf '$output_pdf' ]]></command> <inputs> <param name="input" type="data" format="bam" label="Select multiple alignments to parse" multiple="True"/> - <param help="Select the R package to produce graphics" label="lattice or ggplot" name="R_method" type="select"> - <option selected="True" value="lattice">lattice</option> - <option value="ggplot">ggplot</option> - </param> - </inputs> <outputs> @@ -45,28 +35,14 @@ <tests> <test> <param name="input" value="input1.bam,input2.bam" ftype="bam"/> - <param name="R_method" value="lattice" /> <output file="output.tab" name="output_tab" /> <output file="output_lattice.pdf" name="output_pdf" /> </test> <test> <param name="input" value="input1.bam,input1.bam" ftype="bam"/> - <param name="R_method" value="lattice" /> <output file="output_doubled.tab" name="output_tab" /> <output file="output_lattice_doubled.pdf" name="output_pdf" /> </test> - <test> - <param name="input" value="input1.bam,input2.bam" ftype="bam"/> - <param name="R_method" value="ggplot" /> - <output file="output.tab" name="output_tab" /> - <output file="output.pdf" name="output_pdf" /> - </test> - <test> - <param name="input" value="input1.bam,input1.bam" ftype="bam"/> - <param name="R_method" value="ggplot" /> - <output file="output_doubled.tab" name="output_tab" /> - <output file="output_doubled.pdf" name="output_pdf" /> - </test> </tests>