Repository 'sam_to_bam'
hg clone https://toolshed.g2.bx.psu.edu/repos/devteam/sam_to_bam

Changeset 6:d04d9f1c6791 (2015-04-21)
Previous changeset 5:c73bf16b45df (2015-03-05) Next changeset 7:881e16ad05c6 (2015-11-11)
Commit message:
Uploaded
modified:
sam_to_bam.xml
tool_dependencies.xml
added:
macros.xml
test-data/cached_locally/all_fasta.loc
test-data/cached_locally/chr_m.fasta
test-data/cached_locally/chr_m.fasta.fai
test-data/cached_locally/fasta_indexes.loc
test-data/chr_m.fasta.fai
tool_data_table_conf.xml.test
removed:
sam_to_bam.py
b
diff -r c73bf16b45df -r d04d9f1c6791 macros.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/macros.xml Tue Apr 21 14:52:20 2015 -0400
b
@@ -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 &quot;No options available&quot; within the &quot;**Select references (chromosomes and contigs) you would like to restrict bam to**&quot; 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 &quot;**Select references (chromosomes and contigs) you would like to restrict bam to**&quot; drop-down.
+
+    </token>
+
+</macros>
b
diff -r c73bf16b45df -r d04d9f1c6791 sam_to_bam.py
--- a/sam_to_bam.py Thu Mar 05 21:28:25 2015 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
[
b'@@ -1,172 +0,0 @@\n-#!/usr/bin/env python\n-"""\n-Converts SAM data to sorted BAM data.\n-usage: sam_to_bam.py [options]\n-   --input1: SAM file to be converted\n-   --index: path of the indexed reference genome\n-   --ref_file: Reference file if choosing from history\n-   --output1: output dataset in bam format\n-"""\n-\n-import optparse, os, sys, subprocess, tempfile, shutil\n-\n-def stop_err( msg ):\n-    sys.stderr.write( \'%s\\n\' % msg )\n-    sys.exit()\n-\n-def __main__():\n-    #Parse Command Line\n-    parser = optparse.OptionParser()\n-    parser.add_option( \'\', \'--input1\', dest=\'input1\', help=\'The input SAM dataset\' )\n-    \n-    parser.add_option( \'\', \'--index\', dest=\'index\', help=\'The path of the indexed reference genome\' )\n-    parser.add_option( \'\', \'--ref_file\', dest=\'ref_file\', help=\'The reference dataset from the history\' )\n-    parser.add_option( \'\', \'--output1\', dest=\'output1\', help=\'The output BAM dataset\' )\n-    ( options, args ) = parser.parse_args()\n-\n-    # output version # of tool\n-    try:\n-        tmp = tempfile.NamedTemporaryFile().name\n-        tmp_stdout = open( tmp, \'wb\' )\n-        proc = subprocess.Popen( args=\'samtools 2>&1\', shell=True, stdout=tmp_stdout )\n-        tmp_stdout.close()\n-        returncode = proc.wait()\n-        stdout = None\n-        for line in open( tmp_stdout.name, \'rb\' ):\n-            if line.lower().find( \'version\' ) >= 0:\n-                stdout = line.strip()\n-                break\n-        if stdout:\n-            sys.stdout.write( \'Samtools %s\\n\' % stdout )\n-        else:\n-            raise Exception\n-    except:\n-        sys.stdout.write( \'Could not determine Samtools version\\n\' )\n-\n-    tmp_dir = tempfile.mkdtemp( dir=\'.\' )\n-    if not options.ref_file or options.ref_file == \'None\':\n-        # We\'re using locally cached reference sequences( e.g., /galaxy/data/equCab2/sam_index/equCab2.fa ).\n-        # The indexes for /galaxy/data/equCab2/sam_index/equCab2.fa will be contained in\n-        # a file named /galaxy/data/equCab2/sam_index/equCab2.fa.fai\n-        fai_index_file_path = \'%s.fai\' % options.index\n-        if not os.path.exists( fai_index_file_path ):\n-            #clean up temp files\n-            if os.path.exists( tmp_dir ):\n-                shutil.rmtree( tmp_dir )\n-            stop_err( \'Indexed genome %s not present, request it by reporting this error.\' % options.index )\n-    else:\n-        try:\n-            # Create indexes for history reference ( e.g., ~/database/files/000/dataset_1.dat ) using samtools faidx, which will:\n-            # - index reference sequence in the FASTA format or extract subsequence from indexed reference sequence\n-            # - if no region is specified, faidx will index the file and create <ref.fasta>.fai on the disk\n-            # - if regions are specified, the subsequences will be retrieved and printed to stdout in the FASTA format\n-            # - the input file can be compressed in the RAZF format.\n-            # IMPORTANT NOTE: a real weakness here is that we are creating indexes for the history dataset\n-            # every time we run this tool.  It would be nice if we could somehow keep track of user\'s specific\n-            # index files so they could be re-used.\n-            fai_index_file_base = tempfile.NamedTemporaryFile( dir=tmp_dir ).name\n-            # At this point, fai_index_file_path will look something like /tmp/dataset_13.dat\n-            os.symlink( options.ref_file, fai_index_file_base )\n-            fai_index_file_path = \'%s.fai\' % fai_index_file_base\n-            command = \'samtools faidx %s\' % fai_index_file_base\n-            tmp = tempfile.NamedTemporaryFile( dir=tmp_dir ).name\n-            tmp_stderr = open( tmp, \'wb\' )\n-            proc = subprocess.Popen( args=command, shell=True, cwd=tmp_dir, stderr=tmp_stderr.fileno() )\n-            returncode = proc.wait()\n-            tmp_stderr.close()\n-            # get stderr, allowing for case where it\'s very large\n-            tmp_stderr = open( tmp, \'rb\' )\n-            stderr = \''..b'.close()\n-            if returncode != 0:\n-                raise Exception, stderr \n-            if os.path.getsize( fai_index_file_path ) == 0:\n-                raise Exception, \'Index file empty, there may be an error with your reference file or settings.\'\n-        except Exception, e:\n-            #clean up temp files\n-            if os.path.exists( tmp_dir ):\n-                shutil.rmtree( tmp_dir )\n-            stop_err( \'Error creating indexes from reference (%s), %s\' % ( options.ref_file, str( e ) ) )\n-    try:\n-        # Extract all alignments from the input SAM file to BAM format ( since no region is specified, all the alignments will be extracted ).\n-        tmp_aligns_file = tempfile.NamedTemporaryFile( dir=tmp_dir )\n-        tmp_aligns_file_name = tmp_aligns_file.name\n-        tmp_aligns_file.close()\n-        command = \'samtools view -bt %s -o %s %s\' % ( fai_index_file_path, tmp_aligns_file_name, options.input1 )\n-        tmp = tempfile.NamedTemporaryFile( dir=tmp_dir ).name\n-        tmp_stderr = open( tmp, \'wb\' )\n-        proc = subprocess.Popen( args=command, shell=True, cwd=tmp_dir, stderr=tmp_stderr.fileno() )\n-        returncode = proc.wait()\n-        tmp_stderr.close()\n-        # get stderr, allowing for case where it\'s very large\n-        tmp_stderr = open( tmp, \'rb\' )\n-        stderr = \'\'\n-        buffsize = 1048576\n-        try:\n-            while True:\n-                stderr += tmp_stderr.read( buffsize )\n-                if not stderr or len( stderr ) % buffsize != 0:\n-                    break\n-        except OverflowError:\n-            pass\n-        tmp_stderr.close()\n-        if returncode != 0:\n-            raise Exception, stderr\n-    except Exception, e:\n-        #clean up temp files\n-        if os.path.exists( tmp_dir ):\n-            shutil.rmtree( tmp_dir )\n-        stop_err( \'Error extracting alignments from (%s), %s\' % ( options.input1, str( e ) ) )\n-    try:\n-        # Sort alignments by leftmost coordinates. File <out.prefix>.bam will be created. This command\n-        # may also create temporary files <out.prefix>.%d.bam when the whole alignment cannot be fitted\n-        # into memory ( controlled by option -m ).\n-        tmp_sorted_aligns_file = tempfile.NamedTemporaryFile( dir=tmp_dir )\n-        tmp_sorted_aligns_file_name = tmp_sorted_aligns_file.name\n-        tmp_sorted_aligns_file.close()\n-        command = \'samtools sort %s %s\' % ( tmp_aligns_file_name, tmp_sorted_aligns_file_name )\n-        tmp = tempfile.NamedTemporaryFile( dir=tmp_dir ).name\n-        tmp_stderr = open( tmp, \'wb\' )\n-        proc = subprocess.Popen( args=command, shell=True, cwd=tmp_dir, stderr=tmp_stderr.fileno() )\n-        returncode = proc.wait()\n-        tmp_stderr.close()\n-        # get stderr, allowing for case where it\'s very large\n-        tmp_stderr = open( tmp, \'rb\' )\n-        stderr = \'\'\n-        buffsize = 1048576\n-        try:\n-            while True:\n-                stderr += tmp_stderr.read( buffsize )\n-                if not stderr or len( stderr ) % buffsize != 0:\n-                    break\n-        except OverflowError:\n-            pass\n-        tmp_stderr.close()\n-        if returncode != 0:\n-            raise Exception, stderr\n-    except Exception, e:\n-        #clean up temp files\n-        if os.path.exists( tmp_dir ):\n-            shutil.rmtree( tmp_dir )\n-        stop_err( \'Error sorting alignments from (%s), %s\' % ( tmp_aligns_file_name, str( e ) ) )\n-    # Move tmp_aligns_file_name to our output dataset location\n-    sorted_bam_file = \'%s.bam\' % tmp_sorted_aligns_file_name\n-    shutil.move( sorted_bam_file, options.output1 )\n-    #clean up temp files\n-    if os.path.exists( tmp_dir ):\n-        shutil.rmtree( tmp_dir )\n-    # check that there are results in the output file\n-    if os.path.getsize( options.output1 ) > 0:\n-        sys.stdout.write( \'SAM file converted to BAM\' )\n-    else:\n-        stop_err( \'Error creating sorted version of BAM file.\' )\n-\n-if __name__=="__main__": __main__()\n'
b
diff -r c73bf16b45df -r d04d9f1c6791 sam_to_bam.xml
--- a/sam_to_bam.xml Thu Mar 05 21:28:25 2015 -0500
+++ b/sam_to_bam.xml Tue Apr 21 14:52:20 2015 -0400
[
b'@@ -1,99 +1,84 @@\n-<tool id="sam_to_bam" name="SAM-to-BAM" version="1.1.4">\n-  <description>converts SAM format to BAM format</description>\n-  <requirements>\n-    <requirement type="package" version="0.1.19">samtools</requirement>\n-  </requirements>\n-  <command interpreter="python">\n-    sam_to_bam.py\n-      --input1=$source.input1\n-      #if $source.index_source == "history":\n-        --ref_file=$source.ref_file\n-      #else\n-        --index=${source.index.fields.path}\n-      #end if\n-      --output1=$output1\n-  </command>\n-  <inputs>\n-    <conditional name="source">\n-      <param name="index_source" type="select" label="Choose the source for the reference list">\n-        <option value="cached">Locally cached</option>\n-        <option value="history">History</option>\n-      </param>\n-      <when value="cached">\n-        <param name="input1" type="data" format="sam" metadata_name="dbkey" label="SAM file to convert">\n-          <validator type="unspecified_build" />\n-          <validator type="dataset_metadata_in_data_table" table_name="fasta_indexes" metadata_name="dbkey" metadata_column="1" message="Sequences are not currently available for the specified build." />\n-        </param>\n-        <param name="index" type="select" label="Using reference genome">\n-          <options from_data_table="fasta_indexes">\n-            <filter type="data_meta" ref="input1" key="dbkey" column="1" />\n-            <validator type="no_options" message="No reference genome is available for the build associated with the selected input dataset" />\n-          </options>\n-        </param>\n-      </when>\n-      <when value="history">\n-        <param name="input1" type="data" format="sam" label="SAM file to convert" />\n-        <param name="ref_file" type="data" format="fasta" metadata_name="dbkey" label="Using reference file" />\n-      </when>\n-    </conditional>\n-  </inputs>\n-  <outputs>\n-    <data format="bam" name="output1" label="${tool.name} on ${on_string}: converted BAM">\n-      <actions>\n-        <conditional name="source.index_source">\n-          <when value="cached">\n-            <action type="metadata" name="dbkey">\n-              <option type="from_param" name="source.input1" param_attribute="dbkey" />\n-            </action>\n-          </when>\n-          <when value="history">\n-            <action type="metadata" name="dbkey">\n-              <option type="from_param" name="source.ref_file" param_attribute="dbkey" />\n-            </action>\n-          </when>\n+<tool id="sam_to_bam" name="SAM-to-BAM" version="2.0">\n+  <description>convert SAM to BAM</description>\n+  <macros>\n+    <import>macros.xml</import>\n+  </macros>\n+  <expand macro="requirements"></expand>\n+  <expand macro="version_command"></expand>\n+  <expand macro="stdio"></expand>\n+  <command>\n+    <![CDATA[\n+        samtools sort -O bam -@ \\${GALAXY_SLOTS:-1} -o sorted_input.bam -T temp "$input1" && \n+          #if $source.index_source == "history":\n+            ln -s $source.ref_file input.fa &&\n+            samtools faidx input.fa &&\n+          #else\n+            ln -s ${source.index.fields.path} input.fa &&\n+            ln -s ${source.index.fields.path}.fai input.fa.fai &&\n+          #end if\n+          samtools view -@ \\${GALAXY_SLOTS:-1} -b -h -o $output1 -T input.fa sorted_input.bam\n+    ]]>\n+    </command>\n+    <inputs>\n+        <conditional name="source">\n+            <param label="Choose the source for the reference genome" name="index_source" type="select">\n+                <option value="cached">Use a built-in genome</option>\n+                <option value="history">Use a genome from the history</option>\n+            </param>\n+            <when value="cached">\n+                <param format="sam" label="SAM file to convert" metadata_name="dbkey" name="input1" type="data">\n+                    <validator type="unspecified_build" />\n+                    <validator message="Sequences are not currently available for the specified build." metadata_column="1" metadata_name="db'..b' table_name="fasta_indexes" type="dataset_metadata_in_data_table" />\n+                </param>\n+                <param label="Using reference genome" name="index" type="select">\n+                    <options from_data_table="fasta_indexes">\n+                        <filter column="1" key="dbkey" ref="input1" type="data_meta" />\n+                        <validator message="No reference genome is available for the build associated with the selected input dataset" type="no_options" />\n+                    </options>\n+                </param>\n+            </when>\n+            <when value="history">\n+                <param format="sam" label="SAM file to convert" name="input1" type="data" />\n+                <param format="fasta" label="Using reference file" metadata_name="dbkey" name="ref_file" type="data" />\n+            </when>\n         </conditional>\n-      </actions>\n-    </data>\n-  </outputs>\n-  <tests>\n-    <test>\n-      <!--\n-      Sam-to-Bam command:\n-      cp test-data/chr_m.fasta .\n-      samtools faidx chr_m.fasta\n-      samtools view -hbt chr_m.fasta.fai -o unsorted.bam test-data/sam_to_bam_in1.sam\n-      samtools sort unsorted.bam sam_to_bam_out1\n-      chr_m.fasta is the reference file (chrM from equCab2)\n-      -->\n-      <param name="index_source" value="history" /> \n-      <param name="input1" value="sam_to_bam_in1.sam" ftype="sam" />\n-      <param name="ref_file" value="chr_m.fasta" ftype="fasta" dbkey="equCab2" />\n-      <output name="output1" file="sam_to_bam_out1.bam" ftype="bam" />\n-    </test>\n-    <test>\n-      <!--\n-      Sam-to-Bam command:\n-      samtools view -hbt chr_m.fasta.fai -o unsorted.bam test-data/sam_to_bam_in1.sam\n-      samtools sort unsorted.bam sam_to_bam_out2\n-      chr_m.fasta is the reference file and the index chr_m.fasta.fai \n-      these should be in the same directory, and chrM is from equCab2\n-      -->\n-      <param name="index_source" value="cached" />\n-      <param name="input1" value="sam_to_bam_in1.sam" ftype="sam" dbkey="chrM" />\n-      <param name="index" value="chr_m" />\n-      <output name="output1" file="sam_to_bam_out2.bam" ftype="bam" />\n-    </test>\n-  </tests>\n-  <help>\n-\n+    </inputs>\n+    <outputs>\n+        <data format="bam" label="${tool.name} on ${on_string}: converted BAM" name="output1">\n+            <actions>\n+                <conditional name="source.index_source">\n+                    <when value="cached">\n+                        <action name="dbkey" type="metadata">\n+                            <option name="source.input1" param_attribute="dbkey" type="from_param" />\n+                        </action>\n+                    </when>\n+                    <when value="history">\n+                        <action name="dbkey" type="metadata">\n+                            <option name="source.ref_file" param_attribute="dbkey" type="from_param" />\n+                        </action>\n+                    </when>\n+                </conditional>\n+            </actions>\n+        </data>\n+    </outputs>\n+    <tests>\n+        <test>\n+            <param name="index_source" value="history" />\n+            <param name="input1" ftype="sam" value="sam_to_bam_in1.sam" />\n+            <param dbkey="equCab2" ftype="fasta" name="ref_file" value="chr_m.fasta" />\n+            <output file="sam_to_bam_out1.bam" ftype="bam" name="output1" />\n+        </test>\n+    </tests>\n+    <help>\n+<![CDATA[\n **What it does**\n \n-This tool uses the SAMTools_ toolkit to produce an indexed BAM file based on a sorted input SAM file.\n+Converts SAM dataset into its binary, BAM, representation using ``samtools sort`` and ``view`` commands::\n \n-.. _SAMTools: http://samtools.sourceforge.net/samtools.shtml\n+  samtools sort -O bam -o sorted_input.bam [INPUT SAM] \n+  samtools view -b -h -o -T [REFERENCE GENOME] [OUTPUT BAM] sorted_input.bam\n \n+]]>\n   </help>\n-    <citations>\n-        <citation type="doi">10.1093/bioinformatics/btp352</citation>\n-    </citations>\n+  <expand macro="citations"></expand>\n </tool>\n'
b
diff -r c73bf16b45df -r d04d9f1c6791 test-data/cached_locally/all_fasta.loc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/cached_locally/all_fasta.loc Tue Apr 21 14:52:20 2015 -0400
b
@@ -0,0 +1,1 @@
+chrM chr_m Horse (Equus caballus): equCab2 chrM ${__HERE__}/chrM.fasta
b
diff -r c73bf16b45df -r d04d9f1c6791 test-data/cached_locally/chr_m.fasta
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/cached_locally/chr_m.fasta Tue Apr 21 14:52:20 2015 -0400
b
b'@@ -0,0 +1,335 @@\n+>chrM\n+GTTAATGTAGCTTAATAATATAAAGCAAGGCACTGAAAATGCCTAGATGA\n+GTATTCTTACTCCATAAACACATAGGCTTGGTCCTAGCCTTTTTATTAGT\n+TATTAATAGAATTACACATGCAAGTATCCGCACCCCAGTGAGAATGCCCT\n+CTAAATCACGTCTCTACGATTAAAAGGAGCAGGTATCAAGCACACTAGAA\n+AGTAGCTCATAACACCTTGCTCAGCCACACCCCCACGGGACACAGCAGTG\n+ATAAAAATTAAGCTATGAACGAAAGTTCGACTAAGTCATATTAAATAAGG\n+GTTGGTAAATTTCGTGCCAGCCACCGCGGTCATACGATTAACCCAAATTA\n+ATAAATCTCCGGCGTAAAGCGTGTCAAAGACTAATACCAAAATAAAGTTA\n+AAACCCAGTTAAGCCGTAAAAAGCTACAACCAAAGTAAAATAGACTACGA\n+AAGTGACTTTAATACCTCTGACTACACGATAGCTAAGACCCAAACTGGGA\n+TTAGATACCCCACTATGCTTAGCCCTAAACTAAAATAGCTTACCACAACA\n+AAGCTATTCGCCAGAGTACTACTAGCAACAGCCTAAAACTCAAAGGACTT\n+GGCGGTGCTTTACATCCCTCTAGAGGAGCCTGTTCCATAATCGATAAACC\n+CCGATAAACCCCACCATCCCTTGCTAATTCAGCCTATATACCGCCATCTT\n+CAGCAAACCCTAAACAAGGTACCGAAGTAAGCACAAATATCCAACATAAA\n+AACGTTAGGTCAAGGTGTAGCCCATGGGATGGAGAGAAATGGGCTACATT\n+TTCTACCCTAAGAACAAGAACTTTAACCCGGACGAAAGTCTCCATGAAAC\n+TGGAGACTAAAGGAGGATTTAGCAGTAAATTAAGAATAGAGAGCTTAATT\n+GAATCAGGCCATGAAGCGCGCACACACCGCCCGTCACCCTCCTTAAATAT\n+CACAAATCATAACATAACATAAAACCGTGACCCAAACATATGAAAGGAGA\n+CAAGTCGTAACAAGGTAAGTATACCGGAAGGTGTACTTGGATAACCAAAG\n+TGTAGCTTAAACAAAGCATCCAGCTTACACCTAGAAGATTTCACTCAAAA\n+TGAACACTTTGAACTAAAGCTAGCCCAAACAATACCTAATTCAATTACCC\n+TTAGTCACTTAACTAAAACATTCACCAAACCATTAAAGTATAGGAGATAG\n+AAATTTTAACTTGGCGCTATAGAGAAAGTACCGTAAGGGAACGATGAAAG\n+ATGCATTAAAAGTACTAAACAGCAAAGCTTACCCCTTTTACCTTTTGCAT\n+AATGATTTAACTAGAATAAACTTAGCAAAGAGAACTTAAGCTAAGCACCC\n+CGAAACCAGACGAGCTACCTATGAACAGTTACAAATGAACCAACTCATCT\n+ATGTCGCAAAATAGTGAGAAGATTCGTAGGTAGAGGTGAAAAGCCCAACG\n+AGCCTGGTGATAGCTGGTTGTCCAGAAACAGAATTTCAGTTCAAATTTAA\n+ATTTACCTAAAAACTACTCAATTCTAATGTAAATTTAAATTATAGTCTAA\n+AAAGGTACAGCTTTTTAGATACAGGTTACAACCTTCATTAGAGAGTAAGA\n+ACAAGATAAACCCATAGTTGGCTTAAAAGCAGCCATCAATTAAGAAAGCG\n+TTCAAGCTCAACGACACATCTATCTTAATCCCAACAATCAACCCAAACTA\n+ACTCCTAATCTCATACTGGACTATTCTATCAACACATAGAAGCAATAATG\n+TTAATATGAGTAACAAGAATTATTTCTCCTTGCATAAGCTTATATCAGAA\n+CGAATACTCACTGATAGTTAACAACAAGATAGGGATAATCCAAAAACTAA\n+TCATCTATTTAAACCATTGTTAACCCAACACAGGCATGCATCTATAAGGA\n+AAGATTAAAAGAAGTAAAAGGAACTCGGCAAACACAAACCCCGCCTGTTT\n+ACCAAAAACATCACCTCTAGCATTTCCAGTATTAGAGGCACTGCCTGCCC\n+AGTGACATCTGTTtaaacggccgcggtatcctaaccgtgcaaaggtagca\n+taatcacttgttccctaaatagggacttgtatgaatggccacacgagggt\n+tttactgtctcttacttccaatcagtgaaattgaccttcccgtgaagagg\n+cgggaatgactaaataagacgagaagaccctatggagcttTAATTAACTG\n+ATTCACAAAAAACAACACACAAACCTTAACCTTCAGGGACAACAAAACTT\n+TTGATTGAATCAGCAATTTCGGTTGGGGTGACCTCGGAGAACAAAACAAC\n+CTCCGAGTGATTTAAATCCAGACTAACCAGTCAAAATATATAATCACTTA\n+TTGATCCAAACCATTGATCAACGGAACAAGTTACCCTAGGGATAACAGCG\n+CAATCCTATTCCAGAGTCCATATCGACAATTAGGGTTTACGACCTCGATG\n+TTGGATCAAGACATCCTAATGGTGCAACCGCTATTAAGGGTTCGTTTGTT\n+CAACGATTAAAGTCTTACGTGATCTGAGTTCAGACCGGAGTAATCCAGGT\n+CGGTTTCTATCTATTCTATACTTTTCCCAGTACGAAAGGACAAGAAAAGT\n+AGGGCCCACTTTACAAGAAGCGCCCTCAAACTAATAGATGACATAATCTA\n+AATCTAACTAATTTATAACTTCTACCGCCCTAGAACAGGGCTCgttaggg\n+tggcagagcccggaaattgcataaaacttaaacctttacactcagaggtt\n+caactcctctccctaacaacaTGTTCATAATTAACGTCCTCCTCCTAATT\n+GTCCCAATCTTGCTCGCCGTAGCATTCCTCACACTAGTTGAACGAAAAGT\n+CTTAGGCTATATGCAACTTCGCAAAGGACCCAACATCGTAGGCCCCTATG\n+GCCTACTACAACCTATTGCCGATGCCCTCAAACTATTTATCAAAGAGCCA\n+CTACAACCACTAACATCATCGACATCCATATTCATCATCGCACCAATCCT\n+AGCCCTAACCCTGGCCTTAACCATATGAATCCCTCTGCCCATACCATACC\n+CACTAATCAACATAAACCTAGGAATTCTATTCATACTAGCCATGTCCAGC\n+CTAGCTGTCTACTCAATCCTTTGATCAGGATGGGCCTCAAACTCAAAATA\n+CGCCCTAATTGGAGCTCTACGAGCAGTAGCACAAACCATCTCATACGAAG\n+TAACTCTAGCAATCATCCTACTCTCAGTCCTCCTAATAAGCGGATCATTC\n+ACATTATCAACACTTATTATTACCCAAGAATACCTCTGATTAATCTTCCC\n+ATCATGACCCTTAGCCATAATGTGATTCATCTCAACATTAGCCGAAACCA\n+ACCGAGCTCCATTTGACCTAACAGAAGGAGAATCAGAACTCGTCTCTGGA\n+TTCAACGTTGAATACGCAGCCGGCCCATTTGCTCTATTCTTCCTAGCAGA\n+ATACGCAAACATCATCATGATAAACATCTTCACAACAACCCTATTTCTAG\n+GAGCATTTCACAACCCCTACCTGCCAGAACTCTACTCAATTAATTTCACC\n+ATTAAAGCTCTCCTTCTAACATGTTCCTTCCTATGAATCCGAGCATCCTA\n+CCCACGATTCCGATATGACCAACTTATACACCTCCTATGAAAGAACTTCC\n+TACCACTCACACTAGCCCTCTGCATATGACACGTCTCACTTCCAATCATA\n+CTATCCAGCATCCCACCACAAACATAGGAAATATGTCTGACAAAAGAGTT\n+ACTTTGATAGAGTAAAACATAGAGGCTCAAACCCTCTTATTTctagaact\n+acaggaattgaacctgctcct'..b'CATTATCCACAGCCTAAATGACGAGCAAGATATC\n+CGAAAAATAGGCGGACTATTTAATGCAATACCCTTCACCACCACATCTCT\n+AATTATTGGCAGCCTTGCACTCACCGGAATTCCTTTCCTCACAGGCTTCT\n+ACTCCAAAGACCTCATCATCGAAACCGCCAACACATCGTACACCAACGCC\n+TGAGCCCTACTAATAACTCTCATTGCCACATCCCTCACAGCTGTCTACAG\n+TACCCGAATCATCTTCTTTGCACTCCTAGGGCAACCCCGCTTCCTCCCTC\n+TGACCTCAATCAACGAAAATAACCCCTTTCTAATTAACTCCATCAAACGC\n+CTCTTAATTGGCAGCATTTTTGCCGGATTCTTCATCTCCAACAATATCTA\n+CCCCACAACCGTCCCAGAAATAACCATACCTACTTACATAAAACTCACCG\n+CCCTCGCAGTAACCATCCTAGGATTTACACTAGCCCTAGAACTAAGCTTG\n+ATAACCCATAACTTAAAACTAGAACACTCCACCAACGTATTCAAATTCTC\n+CAACCTCCTAGGATACTACCCAACAATTATACACCGACTCCCACCGCTCG\n+CTAACCTATCAATAAGCCAAAAATCAGCATCACTTCTACTAGACTCAATC\n+TGACTAGAAAACATCCTGCCAAAATCTATCTCCCAGTTCCAAATAAAAAC\n+CTCGATCCTAATTTCCACCCAAAAAGGACAAATCAAATTATATTTCCTCT\n+CATTCCTCATCACCCTTACCCTAAGCATACTACTTTTTAATCTCCACGAG\n+TAACCTCTAAAATTACCAAGACCCCAACAAGCAACGATCAACCAGTCACA\n+ATCACAACCCAAGCCCCATAACTATACAATGCAGCAGCCCCTATAATTTC\n+CTCACTAAACGCCCCAGAATCTCCAGTATCATAAATAGCTCAAGCCCCCA\n+CACCACTAAACTTAAACACTACCCCCACTTCCTCACTCTTCAGAACATAT\n+AAAACCAACATAACCTCCATCAACAACCCTAAAAGAAATACCCCCATAAC\n+AGTCGTATTAGACACCCATACCTCAGGATACTGCTCAGTAGCCATAGCCG\n+TTGTATAACCAAAAACAACCAACATTCCTCCCAAATAAATCAAAAACACC\n+ATCAACCCCAAAAAGGACCCTCCAAAATTCATAATAATACCACAACCTAC\n+CCCTCCACTTACAATCAGCACTAAACCCCCATAAATAGGTGAAGGTTTTG\n+AAGAAAACCCCACAAAACTAACAACAAAAATAACACTCAAAATAAACACA\n+ATATATGTCATCATTATTCCCACGTGGAATCTAACCACGACCAATGACAT\n+GAAAAATCATCGTTGTATTTCAACTATAAGAACACCAATGACAAACATCC\n+GGAAATCTCACCCACTAATTAAAATCATCAATCACTCTTTTATTGACCTA\n+CCAGCCCCCTCAAACATTTCATCATGATGAAACTTCGGCTCCCTCCTAGG\n+AATCTGCCTAATCCTCCAAATCTTAACAGGCCTATTCCTAGCCATACACT\n+ACACATCAGACACGACAACTGCCTTCTCATCCGTCACTCACATCTGCCGA\n+GACGTTAACTACGGATGAATTATTCGCTACCTCCATGCCAACGGAGCATC\n+AATATTTTTTATCTGCCTCTTCATTCACGTAGGACGCGGCCTCTACTACG\n+GCTCTTACACATTCCTAGAGACATGAAACATTGGAATCATCCTACTTTTC\n+ACAGTTATAGCTACAGCATTCATGGGCTATGTCCTACCATGAGGCCAAAT\n+ATCCTTTTGAGGAGCAACAGTCATCACGAACCTCCTATCAGCAATTCCCT\n+ACATCGGTACTACCCTCGTCGAGTGAATCTGAGGTGGATTCTCAGTAGAC\n+AAAGCCACCCTTACCCGATTTTTTGCTTTCCACTTCATCCTACCCTTCAT\n+CATCACAGCCCTGGTAGTCGTACATTTACTATTTCTTCACGAAACAGGAT\n+CTAATAACCCCTCAGGAATCCCATCCGATATGGACAAAATCCCATTCCAC\n+CCATATTATACAATTAAAGACATCCTAGGACTCCTCCTCCTGATCTTGCT\n+CCTACTAACTCTAGTATTATTCTCCCCCGACCTCCTAGGAGACCCAGACA\n+ACTACACCCCAGCTAACCCTCTCAGCACTCCCCCTCATATTAAACCAGAA\n+TGGTACTTCCTGTTTGCCTACGCCATCCTACGCTCCATTCCCAACAAACT\n+AGGCGGCGTATTAGCCCTAATCCTCTCCATCCTGATCCTAGCACTCATCC\n+CCACCCTCCACATATCAAAACAACGAAGCATAATATTCCGGCCTCTCAGC\n+CAATGCGTATTCTGACTCTTAGTGGCAGACTTACTGACACTAACATGAAT\n+CGGCGGACAGCCAGTGGAACACCCATACGTAATTATCGGCCAACTGGCCT\n+CAATCCTCTACTTCTCCCTAATTCTCATTTTTATACCACTCGCAAGCACC\n+ATCGAAAACAATCTTCTAAAATGAAGAGTCCCTGTAGTATATCGCACATT\n+ACCCTGGTCTTGTAAACCAGAAAAGGGGGAAAACGTTTCCTCCCAAGGAC\n+TATCAAGGAAGAAGCTCTAGCTCCACCATCAACACCCAAAGCTGAAATTC\n+TACTTAAACTATTCCTTGATTTCTTCCCCTAAACGACAACAATTTACCCT\n+CATGTGCTATGTCAGTATCAGATTATACCCCCACATAACACCATACCCAC\n+CTGACATGCAATATCTTATGAATGGCCTATGTACGTCGTGCATTAAATTG\n+TCTGCCCCATGAATAATAAGCATGTACATAATATCATTTATCTTACATAA\n+GTACATTATATTATTGATCGTGCATACCCCATCCAAGTCAAATCATTTCC\n+AGTCAACACGCATATCACAGCCCATGTTCCACGAGCTTAATCACCAAGCC\n+GCGGGAAATCAGCAACCCTCCCAACTACGTGTCCCAATCCTCGCTCCGGG\n+CCCATCCAAACGTGGGGGTTTCTACAATGAAACTATACCTGGCATCTGGT\n+TCTTTCTTCAGGGCCATTCCCACCCAACCTCGCCCATTCTTTCCCCTTAA\n+ATAAGACATCTCGATGGACTAATGACTAATCAGCCCATGCTCACACATAA\n+CTGTGATTTCATGCATTTGGTATCTTTTTATATTTGGGGATGCTATGACT\n+CAGCTATGGCCGTCAAAGGCCTCGACGCAGTCAATTAAATTGAAGCTGGA\n+CTTAAATTGAACGTTATTCCTCCGCATCAGCAACCATAAGGTGTTATTCA\n+GTCCATGGTAGCGGGACATAGGAAACAAgtgcacctgtgcacctgtgcac\n+ctgtgcacctgtgcacctgtgcacctgtgcacctgtgcacctgtgcacct\n+gtgcacctgtgcacctgtgcacctgtgcacctgtgcacctgtgcacctgt\n+gcacctgtgcacctgtgcacctgtgcacctgtgcacctgtgcacctgtgc\n+acctgtgcacctgtgcacctgtgcacctgtgcacctgtgcacctgtgcac\n+ctgtgcacctACCCGCGCAGTAAGCAAGTAATATAGCTTTCTTAATCAAA\n+CCCCCCCTACCCCCCATTAAACTCCACATATGTACATTCAACACAATCTT\n+GCCAAACCCCAAAAACAAGACTAAACAATGCACAATACTTCATGAAGCTT\n+AACCCTCGCATGCCAACCATAATAACTCAACACACCTAACAATCTTAACA\n+GAACTTTCCCCCCGCCATTAATACCAACATGCTACTTTAATCAATAAAAT\n+TTCCATAGACAGGCATCCCCCTAGATCTAATTTTCTAAATCTGTCAACCC\n+TTCTTCCCCC\n'
b
diff -r c73bf16b45df -r d04d9f1c6791 test-data/cached_locally/chr_m.fasta.fai
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/cached_locally/chr_m.fasta.fai Tue Apr 21 14:52:20 2015 -0400
b
@@ -0,0 +1,1 @@
+chrM 16660 6 50 51
b
diff -r c73bf16b45df -r d04d9f1c6791 test-data/cached_locally/fasta_indexes.loc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/cached_locally/fasta_indexes.loc Tue Apr 21 14:52:20 2015 -0400
b
@@ -0,0 +1,1 @@
+chrM chr_m Horse (Equus caballus): equCab2 chrM ${__HERE__}/chrM.fasta
b
diff -r c73bf16b45df -r d04d9f1c6791 test-data/chr_m.fasta.fai
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/chr_m.fasta.fai Tue Apr 21 14:52:20 2015 -0400
b
@@ -0,0 +1,1 @@
+chrM 16660 6 50 51
b
diff -r c73bf16b45df -r d04d9f1c6791 tool_data_table_conf.xml.test
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tool_data_table_conf.xml.test Tue Apr 21 14:52:20 2015 -0400
b
@@ -0,0 +1,10 @@
+<tables>
+    <table name="fasta_indexes" comment_char="#">
+        <columns>value, dbkey, name, path</columns>
+        <file path="${__HERE__}/test-data/cached_locally/fasta_indexes.loc" />
+    </table>
+    <table name="all_fasta" comment_char="#">
+        <columns>value, dbkey, name, path</columns>
+        <file path="${__HERE__}/test-data/cached_locally/all_fasta.loc" />
+    </table>
+</tables>
\ No newline at end of file
b
diff -r c73bf16b45df -r d04d9f1c6791 tool_dependencies.xml
--- a/tool_dependencies.xml Thu Mar 05 21:28:25 2015 -0500
+++ b/tool_dependencies.xml Tue Apr 21 14:52:20 2015 -0400
b
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 <tool_dependency>
-    <package name="samtools" version="0.1.19">
-        <repository changeset_revision="95d2c4aefb5f" name="package_samtools_0_1_19" owner="devteam" toolshed="https://toolshed.g2.bx.psu.edu" />
+    <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>