view microRNA_pipeline.xml @ 0:87fe81de0931 draft default tip

Uploaded
author bigrna
date Sun, 04 Jan 2015 02:47:25 -0500
parents
children
line wrap: on
line source

<tool id="plant_microRNA_v1" name="microRNA_pipeline" veision="1.0.0">
  <description>Program for plant microRNA analysis (rawdata preprocess -> genome mapping -> non-coding RNA(exclude miRNAs) annotation -> microRNA analysis)</description>

  <requirements>
	<requirement type="package" version="0.0.13">fastx_toolkit </requirement>
    <requirement type="package" version="0.12.7">bowtie</requirement>
    <requirement type="set_environment">SCRIPT_PATH</requirement>
    <!--requirement type="package" version="3.0.1">R</requirement!-->
	<requirement type="package" version="1.96">threads</requirement>
	<requirement type="package" version="2.59">SVG</requirement>
	<!--requirement type="package" version="0.228">parent</requirement-->
	<requirement type="package" version="2.1.8">ViennaRNA</requirement>
  </requirements>

  <!--command interpreter="perl">miPlant.pl -i $input -format $format -gfa $gfa -idx $index -pre $pre -mat $mat -rfam $rfam -idx2 $idx2 -D $D -a $a -M $M -min $min -max $max -mis $mis -e $e -f $f -v $v -r $r -dis $dis -flank $flank -mfe $mfe -t $t -o $output</command-->

  <command interpreter="perl">microRNA_pipeline.pl 
   ## Change this to accommodate the number of threads you have available.
        -t \${GALAXY_SLOTS:-4}
	-path \$SCRIPT_PATH

    #for $j, $s in enumerate( $series )
    ##rank_of_series=$j
    -i ${s.input}
    -tag ${s.tag}
    #end for

      ## prepare bowtie index
      #set index_path = ''
      #if str($reference_genome.source) == "history":
          #####bowtie-build "$reference_genome.own_file" genome; ln -s "$reference_genome.own_file" genome.fa;
          #set index_path = $reference_genome.own_file
		  -gfa $index_path 
	  #else:
          #set index_path = $reference_genome.index.fields.path
		  -gfa ${index_path}.fa -idx $index_path 
      #end if


   ## Do or not annotate rfam non-miRNA RNAs
    #if $params.annotate_rfam == "yes":

		  ## prepare Rfam bowtie index
		  #set rfam_index_path = ''
		  #if str($params.reference_rfam.source) == "history":
			 ######## bowtie-build "$params.reference_rfam.own_file" rfam; ln -s "$params.reference_rfam.own_file" rfam.fa;
			  #set rfam_index_path = $params.reference_rfam.own_file
			 -rfam $rfam_index_path 
		  #else:
			#set rfam_index_path = $params.reference_rfam.index.fields.path
			-rfam ${rfam_index_path}.fa -idx2 $rfam_index_path 
		  #end if

		-v $params.v 
	   ## Do or not delete rfam mapped tags
		#if $params.delete_rfam == "yes":
		-D 
		#end if
	#end if


   ## Do or not annotate known microRNAs
    #if $mirbase.known_microRNA == "yes":
	-pre $mirbase.pre -mat $mirbase.mat 
	#end if


    -format $format -phred $phred   -a $a -M $mapnt -min $min -max $max -mis $mismatch -e $e -f $f -r $r -dis $dis -flank $flank -mfe $mfe > run.log
  </command>

  <inputs>

   <repeat name="series" title="Raw sequence data">
     <param name="input" type="data" label="Raw data"/>
     <param name="tag" type="text" data_ref="input" label="Sample name of raw data"/>
   </repeat>

	<param name="format" type="select" label="Raw data format" multiple="false">
	  <option value="fastq">Raw data is fastq. format</option>
	  <option value="fasta">Raw data is fasta. format</option>
	</param>

	<param name="phred" type="select" label="Input quals are Phred+64 or Phred+33" multiple="false">
	  <option value="64">Phred+64</option>
	  <option value="33" selected="true">Phred+33</option>
	</param>

        <conditional name="reference_genome">
          <param name="source" type="select" label="Will you select a reference genome from your history or use a built-in index?" help="Built-ins were indexed using default options">
            <option value="indexed">Use a built-in index</option>
            <option value="history">Use one from the history</option>
          </param>
          <when value="indexed">
            <param name="index" type="select" label="Select a reference genome" help="If your genome of interest is not listed, contact the Galaxy team">
              <options from_data_table="bowtie_indexes">
                <filter type="sort_by" column="2"/>
                <validator type="no_options" message="No indexes are available for the selected input dataset"/>
              </options>
            </param>
          </when>
          <when value="history">
            <param name="own_file" type="data" format="fasta" metadata_name="dbkey" label="Select the reference genome" />
          </when>
        </conditional>

	<conditional name="params">
		<param name="annotate_rfam" type="select" label="annotate rfam nocoding RNAs(excluding miRNA)">
		  <option value="yes" selected="true">yes</option>
		  <option value="no">no</option>
		</param>
		 <when value="yes">
			<!--param name="rfam" type="data" label="rfam sequence file" /-->
			<conditional name="reference_rfam">
			  <param name="source" type="select" label="Will you select a reference genome from your history or use a built-in index?" help="Built-ins were indexed using default options">
				<option value="indexed">Use a built-in index</option>
				<option value="history">Use one from the history</option>
			  </param>
			  <when value="indexed">
				<param name="index" type="select" label="Select a non-coding RNA reference" help="If your reference of interest is not listed, contact the Galaxy team">
				  <options from_data_table="rfam_bowtie_indexes">
					<filter type="sort_by" column="2"/>
					<validator type="no_options" message="No indexes are available for the selected input dataset"/>
				  </options>
				</param>
			  </when>
			  <when value="history">
				<param name="own_file" type="data" format="fasta" metadata_name="dbkey" label="Select the reference" />
			  </when>
			</conditional>

			<param name="v" type="integer" value="0" label="report end-to-end hits less than v mismatches for rfam mapping"/>

			<param name="delete_rfam" type="select" label="delet rfam mapped reads">
			  <option value="yes" selected="true">yes</option>
			  <option value="no">no</option>
			</param>
		 </when>

    </conditional> 

	<conditional name="mirbase">
		<param name="known_microRNA" type="select" label="Analysis known microRNAs(eg. from mirbase)">
		  <option value="yes" selected="true">yes</option>
		  <option value="no">no</option>
		 </param>
		 <when value="yes">
			<param name="mat" type="data" label="mature microRNA sequence file" />
			<param name="pre" type="data" label="precursor microRNA sequence file" />
		 </when>

	</conditional>
	

	<param name="a" type="text" value="TGGAATTCTCGGGTGCCAAGG" label="3' adapter sequence" />
	<param name="mapnt" type="integer" value="8" label="minimum adapter map nts" />
	<param name="min" type="integer" value="19" label="minimum microRNA length" />
	<param name="max" type="integer" value="28" label="maximum microRNA length" />
	<param name="mismatch" type="integer" value="0" label="number of allowed mismatches when mapping reads to precursors" />
	<param name="e" type="integer" value="2" label="number of nucleotides upstream of the mature sequence to consider" />
	<param name="f" type="integer" value="5" label="number of nucleotides downstream of the mature sequence to consider" />
	<param name="r" type="integer" value="25" label="a read is allowed to map up to this number of positions in the genome" />
	<param name="dis" type="integer" value="200" label="Maximal space between miRNA and miRNA*" />
	<param name="flank" type="integer" value="10" label="Flank sequence length of miRNA precursor" />
	<param name="mfe" type="float" value="-30" label="Maximal free energy allowed for a miRNA precursor" />
  </inputs>

  <outputs>
   <data format="txt" name="known microRNA express list" from_work_dir="miRPlant_out/known_microRNA_express.txt" label="${tool.name} on ${on_string}: known microRNA express list">
   <filter>(mirbase['known_microRNA'] == 'yes')</filter>
   </data>
   <data format="txt" name="known microRNA express alignment" from_work_dir="miRPlant_out/known_microRNA_express.aln" label="${tool.name} on ${on_string}: known microRNA express alignment">
   <filter>(mirbase['known_microRNA'] == 'yes')</filter>
   </data>
   <data format="txt" name="known microRNA moRs result" from_work_dir="miRPlant_out/known_microRNA_express.moRs" label="${tool.name} on ${on_string}: known microRNA moRs result">
   <filter>(mirbase['known_microRNA'] == 'yes')</filter>
   </data>
   <data format="txt" name="known microRNA precursor file" from_work_dir="miRPlant_out/known_microRNA_precursor.fa" label="${tool.name} on ${on_string}: known microRNA precursor file">
   <filter>(mirbase['known_microRNA'] == 'yes')</filter>
   </data>
   <data format="txt" name="known microRNA mature file" from_work_dir="miRPlant_out/known_microRNA_mature.fa" label="${tool.name} on ${on_string}: known microRNA mature file">
   <filter>(mirbase['known_microRNA'] == 'yes')</filter>
   </data>
   <data format="txt" name="novel microRNA express list" from_work_dir="miRPlant_out/novel_microRNA_express.txt" label="${tool.name} on ${on_string}: novel microRNA express list"/>
   <data format="txt" name="novel microRNA precursor file" from_work_dir="miRPlant_out/novel_microRNA_precursor.fa" label="${tool.name} on ${on_string}: novel microRNA precursor file"/>
   <data format="txt" name="novel microRNA mature sequence file" from_work_dir="miRPlant_out/novel_microRNA_mature.fa" label="${tool.name} on ${on_string}: novel microRNA mature sequence file"/>
   <data format="html" name="analysis result" from_work_dir="miRPlant_out/result.html" label="${tool.name} on ${on_string}: analysis result"/>
  </outputs>

 <help>

 </help>
 </tool>