diff shear_sv.xml @ 0:65255beda972

Uploaded
author jjohnson
date Fri, 08 Nov 2013 16:23:10 -0500
parents
children 3cbbffb3ae47
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/shear_sv.xml	Fri Nov 08 16:23:10 2013 -0500
@@ -0,0 +1,136 @@
+<?xml version="1.0"?>
+<tool id="shear_sv" name="SHEAR-SV" version="0.0.5">
+  <description>find SVs and estimate the heterogeneity levels from a BAM</description>
+  <requirements>
+    <requirement type="package" version="0.2.5">shear</requirement>
+    <requirement type="package" version="0.1.18">samtools</requirement>
+    <requirement type="package" version="0.6.2">bwa</requirement>
+    <requirement type="package" version="1.0.1">crest</requirement>
+    <requirement type="package" version="latest">blat_server</requirement>
+    <requirement type="package" version="3">cap3</requirement>
+  </requirements>
+  <!--
+  <version_command></version_command>
+  -->
+  <command interpreter="python">
+    shear_wrapper.py -j \$SHEAR_JAR_PATH/SHEAR.jar --command sv 
+    -p $prefix  ## used in gerenating ouput file names
+    -b $bamfile 
+     #if $genomeSource.refGenomeSource == 'indexed':
+       -f $genomeSource.ref_fastas.fields.path 
+       -i $genomeSource.bwa_indices.fields.path 
+       -t $genomeSource.twobit_indices.fields.path
+     #elif $genomeSource.refGenomeSource == 'svidx':
+       -f $genomeSource.svidx.extra_files_path/${genomeSource.svidx.metadata.base_name}.fa
+       -i $genomeSource.svidx.extra_files_path/${genomeSource.svidx.metadata.base_name}.fa
+       -t $genomeSource.svidx.extra_files_path/${genomeSource.svidx.metadata.base_name}.2bit
+     #else:
+       -f $genomeSource.ref_fasta
+       #if $genomeSource.save_svidx:
+         -D $sv_idx.extra_files_path
+       #end if
+     #end if
+     #if $region and $region.__str__.strip() != '':
+       -r $region
+     #end if
+     $sv_only
+  </command>
+  <inputs>
+    <param name="bamfile" type="data" format="bam" label="BAM alignment file containing the input sequences to the assembly."/> 
+    <param name="prefix" type="hidden" value="shear_sv" label="Prefix for all generated files"/>
+    <!--
+    <param name="prefix" type="text" value="shear_sv" 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>
+    -->
+    <!-- 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" selected="true">Use a cached reference genome</option>
+        <option value="history">Use fasta from the history</option>
+        <option value="svidx">Use SHEAR sv index from the history</option>
+      </param>
+      <when value="indexed">
+        <param name="ref_fastas" type="select" label="Select a reference genome fasta">
+          <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>
+        <param name="twobit_indices" type="select" label="Select the reference genome 2bit">
+          <options from_data_table="twobit">
+            <filter type="sort_by" column="0" />
+            <!--
+            <filter type="data_meta" ref="ref_fastas" key="dbkey" column="0" />
+            -->
+            <validator type="no_options" message="No indexes are available" />
+          </options>
+        </param>
+        <param name="bwa_indices" type="select" label="Select the reference genome bwa indices">
+          <options from_data_table="bwa_indexes">
+            <filter type="sort_by" column="2" />
+            <!--
+            <filter type="data_meta" ref="ref_fastas" key="dbkey" column="0" />
+            -->
+            <validator type="no_options" message="No indexes are available" />
+          </options>
+        </param>
+      </when>
+      <when value="history">
+        <param name="ref_fasta" type="data" format="fasta" label="Select a reference from history" />
+        <param name="save_svidx" type="boolean" truevalue="yes" falsevalue="no" label="Save sv generated reference indexes"/> 
+      </when>
+      <when value="svidx">
+        <param name="svidx" type="data" format="shear.svidx" label="Select a reference from history" />
+      </when>
+    </conditional>
+    <param name="region" type="text" value="" optional="true" label="Region of the input alignment to analyze">
+      <help>"chr1" for full chromosome or "chr1:10000-15000" for a particular region, including endpoints). 
+             Coordinates are 1-based.
+      </help>
+      <validator type="regex" message="format: chr1:100-200">^\w+(:\d+-\d+)?$</validator>
+    </param>
+    <param name="sv_only" type="boolean" truevalue="--sv-only" falsevalue="" checked="false" label="SV Only prediction mode." 
+         help="Will skip SNP/INDEL prediction and only return *.sdi and *.report results for SVs."/>
+  </inputs>
+  <stdio>
+    <exit_code range="1:" level="fatal" description="Error" />
+  </stdio>
+  <outputs>
+    <data format="txt" name="report_snpindel" label="${tool.name} on ${on_string}: ${prefix}.snpindel.report" from_work_dir="shear_sv.snpindel.report">
+      <filter>sv_only == False</filter>
+    </data>
+    <data format="txt" name="report_sv" label="${tool.name} on ${on_string}: ${prefix}.sv.report" from_work_dir="shear_sv.sv.report"/>
+    <data format="txt" name="report_all" label="${tool.name} on ${on_string}: ${prefix}.all.report" from_work_dir="shear_sv.all.report">
+      <filter>sv_only == False</filter>
+    </data>
+    <data format="shear.sdi" name="sdi_snpindel" label="${tool.name} on ${on_string}: ${prefix}.snpindel.sdi" from_work_dir="shear_sv.snpindel.sdi">
+      <filter>sv_only == False</filter>
+    </data>
+    <data format="shear.sdi" name="sdi_sv" label="${tool.name} on ${on_string}: ${prefix}.sv.sdi" from_work_dir="shear_sv.sv.sdi"/>
+    <data format="shear.sdi" name="sdi_all" label="${tool.name} on ${on_string}: ${prefix}.all.sdi" from_work_dir="shear_sv.all.sdi">
+      <filter>sv_only == False</filter>
+    </data>
+    <data format="shear.svidx" name="sv_idx" label="${tool.name} on ${on_string}: ${prefix}.svidx">
+      <filter>genomeSource['refGenomeSource'] == 'history' and genomeSource['save_svidx'] == True</filter>
+    </data>
+  </outputs>
+  <tests>
+    <test>
+      <param name="prefix" value="shear_test" />
+      <param name="bamfile" value="simulated-data.bam" ftype="bam" />
+      <param name="refGenomeSource" value="history"/>
+      <param name="ref_fasta" value="syn.fa" ftype="fasta" />
+      <param name="save_svidx" value="false"/>
+      <param name="sv_only" value="true"/>
+      <output name="sdi_sv"  file="shear_sv.sdi"/>
+      <output name="report_sv"  file="shear_sv.report"/>
+    </test>
+  </tests>
+  <help>
+SHEAR-SV will process a BAM alignment file to find SVs and estimate the
+heterogeneity level of those SVs. It will output a *.report file reporing the
+SVs and their heterogeneity levels, and it will output a *.sdi file that can be
+used for SHEAR-Assemble to reconstruct the new genome.
+  </help>
+</tool>