view shear_assemble.xml @ 7:8180f6b0249b

Upgrade to SHEAR version 0.2.4
author Jim Johnson <jj@umn.edu>
date Tue, 22 Oct 2013 08:20:52 -0500
parents aaaa5a071ff0
children 2620f7984418
line wrap: on
line source

<tool id="shear_assemble" name="SHEAR-Assemble" version="0.0.3">
  <description>create a personal genome from sdi</description>
  <requirements>
    <requirement type="package" version="0.2.4">shear</requirement>
  </requirements>
  <!--
  <version_command></version_command>
  -->
  <command interpreter="python">
    shear_wrapper.py -j \$SHEAR_JAR_PATH/SHEAR.jar --command assemble 
    -p $prefix
    -s $sdi_file
    #if $genomeSource.refGenomeSource == 'indexed':
      -f $genomeSource.ref_fastas.fields.path
    #else:
      -f $genomeSource.ref_fasta
    #end if
    -o $output_fasta
  </command>
  <inputs>
    <param name="prefix" type="text" value="shear_assemble" label="Prefix for all generated files">
      <validator type="regex" message="Prefix should start with a letter and contain only letter, digit, and '_' or '-' characters">[a-zA-Z0-9][_a-zA-Z0-9-]*</validator>
    </param>
    <param name="sdi_file" type="data" format="shear.sdi" label="SDI file produced by SHEAR's 'sv' command containing the SVs to use to create the new genomic sequence."/> 
    <!-- reference data -->
    <conditional name="genomeSource">
      <param name="refGenomeSource" type="select" label="Will you select a reference genome from your history or use a cached file?">
        <option value="indexed">Use a cached reference genome</option>
        <option value="history">Use one from the history</option>
      </param>
      <when value="indexed">
        <param name="ref_fastas" type="select" label="Select a reference genome">
          <options from_data_table="all_fasta">
            <filter type="sort_by" column="2" />
            <validator type="no_options" message="No reference fasta files are available" />
          </options>
        </param>
      </when>
      <when value="history">
        <param name="ref_fasta" type="data" format="fasta" metadata_name="dbkey" label="Select a reference from history" />
      </when>
    </conditional>
  </inputs>
  <stdio>
    <exit_code range="1:" level="fatal" description="Error" />
  </stdio>
  <outputs>
    <data format="fasta" name="output_fasta" label="${tool.name} on ${on_string}: ${prefix}.fa"  />
  </outputs>
  <tests>
    <test>
      <param name="prefix" value="shear_assembly" />
      <param name="sdi_file" value="shear_sv.sdi" ftype="shear.sdi" />
      <param name="refGenomeSource" value="history"/>
      <param name="ref_fasta" value="syn.fa" ftype="fasta" />
      <output name="output_fasta"  file="simulated-data.fa"/>
    </test>
  </tests>
  <help>
SHEAR-Assemble takes a reference genome and a *.sdi file from SHEAR-SV to create a new personal genome.
  </help>
</tool>