view isoread.xml @ 26:0bf751c64fe9 draft

Uploaded
author glogobyte
date Wed, 20 Oct 2021 14:39:58 +0000
parents 63ae92b7f425
children 293aa8cbbc20
line wrap: on
line source


<tool id="IsoRead" name="IsoRead: miR and isomiR identification and classification" version="0.1.0">
  <requirements>
   <requirement type="package" version="1.7">fpdf</requirement>
   <requirement type="package" version="0.8">logomaker</requirement>
   <requirement type="package" version="0.6.0">plotnine</requirement>
   <requirement type="package" version="3.7.4">python</requirement>
   <requirement type="package" version="1.17.3">numpy</requirement>
   <requirement type="package" version="3.1.2">matplotlib</requirement>
   <requirement type="package" version="0.9.0">seaborn</requirement>
   <requirement type="package" version="1.0.3">pandas</requirement>
  </requirements>
  <command>
    #set controls=[]
    #for $input in $control#
    $controls.extend([str($input.element_identifier),str($input)])
    #end for#
    #set treateds=[] 
    #for $input in $treated#
    $treateds.extend([str($input.element_identifier),str($input)])
    #end for#
    #if $mir_input.database == "1":
      #if $f.fil == "1":
        #set path=$mir_input.genome1.fields.path
        python -W ignore $__tool_directory__/mirbase.py -con $controls -tre $treateds -analysis $analysis -tool_dir $__tool_directory__ -gen "$path" -f "$mir_input.database" -percentage "-1" -counts "-1" -name1 "$fal1" -name2 "$fal2"
      #end if
      #if $f.fil == "2":
        #set path=$mir_input.genome1.fields.path
        python -W ignore $__tool_directory__/mirbase.py -con $controls -tre $treateds -analysis $analysis -tool_dir $__tool_directory__ -gen "$path" -f "$mir_input.database" -percentage "$f.fil1" -counts "$f.fil2" -name1 "$fal1" -name2 "$fal2"
      #end if
    #else:
      #if $f.fil == "1":
        #set path=$mir_input.genome2.fields.value
        python -W ignore $__tool_directory__/mirgene.py -con $controls -tre $treateds -analysis $analysis -tool_dir $__tool_directory__ -gen "$path" -f "$mir_input.database" -percentage "-1" -counts "-1" -name1 "$fal1" -name2 "$fal2"
      #end if
      #if $f.fil == "2":
        #set path=$mir_input.genome2.fields.value
        python -W ignore $__tool_directory__/mirgene.py -con $controls -tre $treateds -analysis $analysis -tool_dir $__tool_directory__ -gen "$path" -f "$mir_input.database" -percentage "$f.fil1" -counts "$f.fil2" -name1 "$fal1" -name2 "$fal2"
      #end if
    #end if

  </command>
  <inputs>
    <param name="analysis" type="select" label="Discover miR with templated or/and non-templated isomiRs" help="Choose the category of miRNAs for detection">
      <option value="1" selected="true">Detection of only templated miRNAs</option>
      <option value="2">Detection of templated and non-templated miRNAs</option>
    </param>
    <conditional name="mir_input">
     <param name="database" type="select" label="Reference miRNA DB" help="Choose which database prefer to be used.">
      <option value="1" selected="true">MirBase</option>
      <option value="2">MirGene</option>
     </param>
     <when value="1">
        <param name="genome1" type="select" label="Reference miRNAs (organism)" help="If your genome coordinates of interest are not listed, contact the Galaxy team">
         <options from_data_table="mirbase" />
        </param>
     </when>
     <when value="2">
        <param name="genome2" type="select" label="Reference miRNAs (organism)" help="If your genome coordinates of interest are not listed, contact the Galaxy team">
         <options from_data_table="mirgene" />
        </param>
     </when>
    </conditional>
    <param name="fal1" type="text" value="FactorLevel" label="Specify a factor level, typical values could be 'tumor', 'normal', 'treated' or 'control'"/>
    <param name="control" format="sam" type="data" multiple="True" label="Select BAM files of the factor level samples" />
    <param name="fal2" type="text" value="FactorLevel" label="Specify a factor level, typical values could be 'tumor', 'normal', 'treated' or 'control'"/>
    <param name="treated" format="sam" type="data" multiple="True" label="Select BAM files of the factor level samples" />
    <conditional name="f">
     <param name="fil" type="select" label="Filter low counts" help="Treat genes with very low expression as unexpressed and filter out">
      <option value="1" selected="true">No</option>
      <option value="2">Yes</option>
     </param>
     <when value="2">
      <param name="fil1" type="integer" value="0" label="Minimum percentage of the samples" help="Filter out all genes that do not meet the Minimum counts in at least this many samples of every category"/>
      <param name="fil2" type="integer" value="0" label="Minimum counts" help="Filter out all genes that do not meet this minimum count"/>
     </when>
     <when value="1">
     </when>
    </conditional>
    <param name="db" type="boolean" checked="true" truevalue="1" falsevalue="0" label="Output Database files" />
    <param name="cmatrix" type="boolean" checked="false" truevalue="1" falsevalue="0" label="Output Matrix files, one for each factor level"  />
    <param name="c_files" type="boolean" checked="true" truevalue="1" falsevalue="0" label="Output Count tables, one for each sample" />
  </inputs>
  <outputs>
    <collection name="list_output1" type="list" label="Database ${fal1} templated" >
        <discover_datasets pattern="__name__" format="tabular" directory="split1"  />
        <filter>db == 1 and (analysis == "1" or analysis == "2")</filter>
    </collection>
    <collection name="list_output2" type="list" label="Database ${fal2} templated" >
        <discover_datasets pattern="__name__" format="tabular" directory="split2" />
        <filter>db == 1 and (analysis == "1" or analysis == "2")</filter> 
    </collection>
    <collection name="list_output3" type="list" label="Database ${fal1} non-templated" >
        <discover_datasets pattern="__name__" format="tabular" directory="split3" />
        <filter>db == 1 and analysis == "2"</filter> 
    </collection>
    <collection name="list_output4" type="list" label="Database ${fal2} non-templated" >
        <discover_datasets pattern="__name__" format="tabular" directory="split4" />
        <filter>db == 1 and analysis == "2"</filter> 
    </collection>
   
    <collection name="Counts" type="list" label="Count Matrices" >
        <discover_datasets pattern="__name__" format="tabular" directory="Counts" />
        <filter>cmatrix==1</filter>
    </collection>
    <collection name="list_output9" type="list" label="Count files ${fal1} for Differential Expression" >
        <discover_datasets pattern="__name__" format="tabular" directory="Diff/temp_con"  />
        <filter>c_files==1 and (analysis == "1")</filter>
    </collection>
    <collection name="list_output10" type="list" label="Count files ${fal2} for Differential Expression" >
        <discover_datasets pattern="__name__" format="tabular" directory="Diff/temp_tre" />
        <filter>c_files==1 and (analysis == "1")</filter>
    </collection>
    <collection name="list_output11" type="list" label="Count files ${fal1} for Differential Expression" >
        <discover_datasets pattern="__name__" format="tabular" directory="Diff/n_temp_con" />
        <filter>c_files==1 and analysis == "2"</filter>
    </collection>
    <collection name="list_output12" type="list" label="Count files ${fal2} for Differential Expression" >
        <discover_datasets pattern="__name__" format="tabular" directory="Diff/n_temp_tre" />
        <filter>c_files==1 and analysis == "2"</filter>
    </collection>
  
    <data name="Results non templated treated1" format="pdf" label="IsomiR Profile Report" from_work_dir="$__tool_directory__/report1.pdf" />
  </outputs>
  <help>
  </help>
</tool>