1. Lance Parsons
  2. ea_utils_galaxy_wrapper

Commits

Lance Parsons  committed 7a86b14

Initial version of sam-stats, without tests

  • Participants
  • Parent commits deed8a5
  • Branches default

Comments (0)

Files changed (4)

File fabfile.py

View file
  • Ignore whitespace
     '''
     Pacakge htseq-count for upload to toolshed
     '''
-    version = prompt("Enter version number for package:")
+    version = prompt("Enter version number for package [test]:")
+    revision = ''
+    if version != '':
+        revision = '-r "%s"' % version
+    else:
+        version = 'test'
     local('mkdir -p package')
     local('rm -f package/ea-utils_%s.tar.gz' % version)
-    #local('tar czvf package/ea-utils_%s.tar.gz --exclude "fabfile.*" --exclude "package" --exclude ".hg" *' % version)
-    local('hg archive -t tgz -r "%s" -X "fabfile.*" -X "package" -p . "package/ea-utils_%s.tar.gz"' % (version, version))
+    if version == 'test':
+        local('tar czvf package/ea-utils_%s.tar.gz --exclude "fabfile.*" --exclude "package" --exclude ".hg" *' % version)
+    else:
+        local('hg archive -t tgz %s -X "fabfile.*" -X "package" -p . "package/ea-utils_%s.tar.gz"' % (revision, version))

File fastq-join.xml

View file
  • Ignore whitespace
-<tool id="fastq_join" name="fastq-join" version="0.1">
+<tool id="fastq_join" name="fastq-join" version="0.1.1">
     <description> - Joins two paired-end reads on the overlapping ends</description>
     <requirements>
-        <requirement type="package" version="1.1.2-469">ea-utils</requirement>
+        <requirement type="package" version="1.1.2-484">ea-utils</requirement>
     </requirements>
     <command>
         fastq-join 

File sam-stats.xml

View file
  • Ignore whitespace
+<tool id="sam_stats" name="sam-stats" version="0.1">
+    <description> - Compute statistics from SAM or BAM files</description>
+    <requirements>
+        <requirement type="package" version="1.1.2-484">ea-utils</requirement>
+    </requirements>
+    <command>
+        sam-stats
+        $trackMultAlign
+        $reportAllChr
+        #if $rnaSeqStats:
+        -R $rnaSeqStatsFile
+        #end if
+        #if $input.extension == "bam":
+        -B
+        #end if
+        -S $histBinSize
+        $input
+        &gt; $samStats
+    </command>
+    <inputs>
+        <param format="sam, bam" name="input" type="data" label="SAM/BAM File" />
+        <param name="trackMultAlign" type="boolean" value="False" truevalue="-D" falsevalue="" label="Keep track of multiple alignments (slower!)" />
+        <param name="reportAllChr" type="boolean" value="False" truevalue="-A" falsevalue="" label="Report all chr sigs, even if there are more than 1000" />
+        <!-- <param name="numReadsSubsample" type="integer" value="1000000" min="1" max="1000000" label="Number of reads to sample for per-base statistics (max 1,000,000)" /> -->
+        <param name="histBinSize" type="integer" value="30" min="1" label="Number of bins per chromosome for reads by chromosome &quot;histogram&quot;" />
+        <param name="rnaSeqStats" type="boolean" value="False" label="Output RNA-Seq statistics (coverage, 3 prime bias, etc.)" />
+    </inputs>
+
+    <outputs>
+        <data format="tabular" name="samStats" label="${tool.name} on ${on_string}"/>
+        <data format="tabular" name="rnaSeqStatsFile" label="${tool.name} on ${on_string} (RNA-Seq Stats)"> <filter>rnaSeqStats</filter>
+        </data>
+    </outputs>
+
+    <stdio>
+        <exit_code range="1:" level="fatal" description="Unknown error occurred" />
+    </stdio>
+
+    <!--
+    <tests>
+        <test>
+            <param name="read1" value="test_read1.fastq" />
+            <param name="read2" value="test_read3.fastq" />
+            <output name="outputJoined" file="testout.join.fastq" />
+            <output name="outputUnmatched1" file="testout.un1.fastq" />
+            <output name="outputUnmatched2" file="testout.un2.fastq" />
+        </test>
+    </tests>
+    -->
+
+    <help>
+Overview
+--------
+sam-stats computes varius statics on SAM/BAM alignment files.
+
+Complete Stats::
+
+  &lt;STATS&gt;           : mean, max, stdev, median, Q1 (25 percentile), Q3
+  reads             : # of entries in the sam file, might not be # reads
+  phred             : phred scale used
+  bsize             : # reads used for qual stats
+  mapped reads      : number of aligned reads (unique probe id sequences)
+  mapped bases      : total of the lengths of the aligned reads
+  forward           : number of forward-aligned reads
+  reverse           : number of reverse-aligned reads
+  snp rate          : mismatched bases / total bases
+  ins rate          : insert bases / total bases
+  del rate          : deleted bases / total bases
+  pct mismatch      : percent of reads that have mismatches
+  len &lt;STATS&gt;       : read length stats, ignored if fixed-length
+  mapq &lt;STATS&gt;      : stats for mapping qualities
+  insert &lt;STATS&gt;    : stats for insert sizes
+  &lt;CHR&gt;           : percentage of mapped bases per chr, followed by a signature
+
+Subsampled stats (1M reads max)::
+
+  base qual &lt;STATS&gt; : stats for base qualities
+  A,T,C,G       : base percentages
+
+Meaning of the per-chromosome signature:
+
+  A ascii-histogram of mapped reads by chromosome position.  It is only output if the original SAM/BAM has a header. The values are the log2 of the # of mapped reads at each position + ascii '0'.
+
+See http://code.google.com/p/ea-utils/wiki/SamStatsDetails for more information on each stat, how it's calculated and what it means.
+
+This tool uses the sam-stats program that is part of the ea-utils suite. See http://code.google.com/p/ea-utils/wiki/SamStats for details.
+    </help>
+</tool>

File tool_dependencies.xml

View file
  • Ignore whitespace
 <?xml version="1.0"?>
 <tool_dependency>
-    <package name="ea-utils" version="1.1.2-469">
+    <package name="ea-utils" version="1.1.2-484">
         <install version="1.0">
             <actions>
-                <action type="download_by_url">http://ea-utils.googlecode.com/files/ea-utils.1.1.2-469.tar.gz</action>
-                <!-- sam-stats and varcall require an extra Bamtools library and we don't need them, so skip -->
-                <action type="shell_command">sed -i.bak 's/sam-stats varcall$//' Makefile</action>
+                <action type="download_by_url">http://ea-utils.googlecode.com/files/ea-utils.1.1.2-484.tar.gz</action>
+                <!-- Unable to get varcall to compile properly we don't need it, so skip -->
+                <action type="shell_command">sed -i.bak 's/varcall$//' Makefile</action>
                 <action type="shell_command">PREFIX=$INSTALL_DIR make install</action>
+                <!-- For some reason, this is not installed by the Makefile, so move it ourselves -->
+                <action type="move_file">
+                    <source>sam-stats</source>
+                    <destination>$INSTALL_DIR/bin</destination>
+                </action>
                 <action type="set_environment">
                     <environment_variable name="PATH" action="prepend_to">$INSTALL_DIR/bin</environment_variable>
                 </action>