Mercurial > repos > jjohnson > shear
diff shear_sv.xml @ 4:a82400332451
Use shear_wrapper.py to generate reference indexes when needed
author | Jim Johnson <jj@umn.edu> |
---|---|
date | Tue, 16 Jul 2013 12:38:48 -0500 |
parents | 630532975fa9 |
children | aaaa5a071ff0 |
line wrap: on
line diff
--- a/shear_sv.xml Mon Jul 08 01:10:38 2013 -0500 +++ b/shear_sv.xml Tue Jul 16 12:38:48 2013 -0500 @@ -11,27 +11,38 @@ <!-- <version_command></version_command> --> - <command>java -jar \$SHEAR_JAR_PATH/SHEAR.jar sv -p $prefix - -b $bamfile + <command interpreter="python"> + shear_wrapper.py -j \$SHEAR_JAR_PATH/SHEAR.jar --command sv + -p $prefix + -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 - -i $genomeSource.bwa_index - -t $genomeSource.twobit + #if $genomeSource.save_svidx: + -D $sv_idx.extra_files_path + #end if #end if + --report $report + --sdi $sdi </command> <inputs> <param name="bamfile" type="data" format="bam" label="BAM alignment file containing the input sequences to the assembly."/> + <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 one from the history</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"> @@ -59,31 +70,32 @@ </options> </param> </when> - <!-- <when value="history"> - <param name="ref_fasta" type="data" format="fasta" metadata_name="dbkey" label="Select a reference from history" /> - <param name="twobit" type="data" format="twobit" metadata_name="dbkey" label="Select a reference from history" /> - <param name="bwa_index" type="data" format="fasta" metadata_name="dbkey" label="Select a reference from 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="prefix" type="hidden" value="shear_sv" label="Prefix for all generated files"/> </inputs> <stdio> <exit_code range="1:" level="fatal" description="Error" /> </stdio> <outputs> - <data format="shear.sdi" name="sdi" label="${tool.name} on ${on_string}: shear_sv.sdi" from_work_dir="shear_sv.sdi" /> - <data format="txt" name="report" label="${tool.name} on ${on_string}: shear_sv.report" from_work_dir="shear_sv.report"/> + <data format="shear.sdi" name="sdi" label="${tool.name} on ${on_string}: ${prefix}.sdi" /> + <data format="txt" name="report" label="${tool.name} on ${on_string}: ${prefix}.report" /> + <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="bamfile" ftype="bam" value="simulated-data.bam"/> + <param name="prefix" value="shear_test" /> + <param name="bamfile" value="simulated-data.bam" ftype="bam" /> <param name="refGenomeSource" value="history"/> - <param name="ref_fasta" ftype="fasta" value="syn.fa"/> - <param name="bwa_index" ftype="" value="syn.fa"/> - <param name="twobit" ftype="twobit" value="syn.2bit"/> - <output name="shear.sdi" file="shear_sv.sdi"/> + <param name="ref_fasta" value="syn.fa" ftype="fasta" /> + <output name="sdi" file="shear_sv.sdi"/> <output name="report" file="shear_sv.report"/> </test> </tests>