Mercurial > repos > devteam > samtools_sort
changeset 0:a430da4f04cd draft
Uploaded
author | devteam |
---|---|
date | Tue, 21 Apr 2015 17:41:18 -0400 |
parents | |
children | cab3f8d35989 |
files | macros.xml samtools_sort.xml test-data/1.bam test-data/1_sort.bam test-data/1_sort_read_names.bam tool_dependencies.xml |
diffstat | 6 files changed, 116 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/macros.xml Tue Apr 21 17:41:18 2015 -0400 @@ -0,0 +1,70 @@ +<macros> + <xml name="requirements"> + <requirements> + <requirement type="package" version="1.2">samtools</requirement> + <yield/> + </requirements> + </xml> + <xml name="citations"> + <citations> + <citation type="bibtex"> + @misc{SAM_def, + title={Definition of SAM/BAM format}, + url = {https://samtools.github.io/hts-specs/SAMv1.pdf},} + </citation> + <citation type="doi">10.1093/bioinformatics/btp352</citation> + <citation type="doi">10.1093/bioinformatics/btr076</citation> + <citation type="doi">10.1093/bioinformatics/btr509</citation> + <citation type="bibtex"> + @misc{Danecek_et_al, + Author={Danecek, P., Schiffels, S., Durbin, R.}, + title={Multiallelic calling model in bcftools (-m)}, + url = {http://samtools.github.io/bcftools/call-m.pdf},} + </citation> + <citation type="bibtex"> + @misc{Durbin_VCQC, + Author={Durbin, R.}, + title={Segregation based metric for variant call QC}, + url = {http://samtools.github.io/bcftools/rd-SegBias.pdf},} + </citation> + <citation type="bibtex"> + @misc{Li_SamMath, + Author={Li, H.}, + title={Mathematical Notes on SAMtools Algorithms}, + url = {http://www.broadinstitute.org/gatk/media/docs/Samtools.pdf},} + </citation> + <citation type="bibtex"> + @misc{SamTools_github, + title={SAMTools GitHub page}, + url = {https://github.com/samtools/samtools},} + </citation> + </citations> + </xml> + <xml name="version_command"> + <version_command>samtools --version | head -n 1 | awk '{ print $2 }'</version_command> + </xml> + <xml name="stdio"> + <stdio> + <exit_code range="1:" level="fatal" description="Error" /> + </stdio> + </xml> + <token name="@no-chrom-options@"> +----- + +.. class:: warningmark + +**No options available? How to re-detect metadata** + +If you see a "No options available" within the "**Select references (chromosomes and contigs) you would like to restrict bam to**" drop down, you need to re-detect metadata for the dataset you are trying to process. To do this follow these steps: + +1. Click on the **pencil** icon adjacent to the dataset in the history +2. A new menu will appear in the center pane of the interface +3. Click **Datatype** tab +4. Set **New Type** to **BAM** +5. Click **Save** + +The medatada will be re-detected and you will be able to see the list of reference sequences in the "**Select references (chromosomes and contigs) you would like to restrict bam to**" drop-down. + + </token> + +</macros>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/samtools_sort.xml Tue Apr 21 17:41:18 2015 -0400 @@ -0,0 +1,40 @@ +<tool id="samtools_sort" name="Sort" version="2.0"> + <description>BAM dataset</description> + <macros> + <import>macros.xml</import> + </macros> + <expand macro="requirements"></expand> + <expand macro="stdio"></expand> + <expand macro="version_command"></expand> + <command>samtools sort $sort_mode -@ \${GALAXY_SLOTS:-1} -o "${output1}" -O bam -T dataset "${input1}"</command> + <inputs> + <param name="input1" type="data" format="bam" label="BAM File" /> + <param name="sort_mode" type="select" label="Sort by "> + <option value="" selected="True">Chromosomal coordinates</option> + <option value="-n">Read names (-n)</option> + </param> + </inputs> + <outputs> + <data name="output1" format="bam" /> + </outputs> + <tests> + <test> + <param name="input1" value="1.bam" ftype="bam" /> + <output name="output1" file="1_sort.bam" ftype="bam" sort="True"/> + </test> + <test> + <param name="input1" value="1.bam" ftype="bam" /> + <param name="sort_mode" value="-n"/> + <output name="output1" file="1_sort_read_names.bam" ftype="bam" sort="True"/> + </test> + </tests> + <help> + +**What it does** + +This tool uses ``samtools sort`` command to sort BAM datasets in coordinate or read name order. + + + </help> + <expand macro="citations"></expand> +</tool>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tool_dependencies.xml Tue Apr 21 17:41:18 2015 -0400 @@ -0,0 +1,6 @@ +<?xml version="1.0"?> +<tool_dependency> + <package name="samtools" version="1.2"> + <repository changeset_revision="6eea04363026" name="package_samtools_1_2" owner="iuc" toolshed="https://toolshed.g2.bx.psu.edu" /> + </package> +</tool_dependency>