details: http://www.bx.psu.edu/hg/galaxy/rev/2df1ac94c37a
changeset: 2762:2df1ac94c37a
user: Kanwei Li <kanwei(a)gmail.com>
date: Thu Sep 24 12:36:59 2009 -0400
description:
fix p2.4 issue in tracks
2 file(s) affected in this change:
lib/galaxy/web/controllers/tracks.py
templates/root/history.mako
diffs (41 lines):
diff -r 3e194c33f219 -r 2df1ac94c37a lib/galaxy/web/controllers/tracks.py
--- a/lib/galaxy/web/controllers/tracks.py Thu Sep 24 11:55:55 2009 -0400
+++ b/lib/galaxy/web/controllers/tracks.py Thu Sep 24 12:36:59 2009 -0400
@@ -48,9 +48,6 @@
# FIXME: hardcoding this for now, but it should be derived from the available
# converters
browsable_types = set( ["wig" ] )
-
-# For natural sort
-NUM_RE = re.compile('([0-9]+)')
class TracksController( BaseController ):
"""
@@ -122,8 +119,14 @@
"""
Returns a naturally sorted list of chroms/contigs for the given dbkey
"""
+ def check_int(s):
+ if s.isdigit():
+ return int(s)
+ else:
+ return s
+
def split_by_number(s):
- return [ int(c) if c.isdigit() else c for c in NUM_RE.split(s) ]
+ return [ check_int(c) for c in re.split('([0-9]+)', s) ]
chroms = self._chroms( trans, dbkey )
to_sort = [{ 'chrom': chrom, 'len': length } for chrom, length in chroms.iteritems()]
diff -r 3e194c33f219 -r 2df1ac94c37a templates/root/history.mako
--- a/templates/root/history.mako Thu Sep 24 11:55:55 2009 -0400
+++ b/templates/root/history.mako Thu Sep 24 12:36:59 2009 -0400
@@ -81,7 +81,7 @@
// Functionized so AJAX'd datasets can call them
function initShowHide() {
- // Load saved state and show as neccesary
+ // Load saved state and show as necessary
try {
var stored = $.jStore.store("history_expand_state");
if (stored) {
details: http://www.bx.psu.edu/hg/galaxy/rev/3e194c33f219
changeset: 2760:3e194c33f219
user: Anton Nekrutenko <anton(a)bx.psu.edu>
date: Thu Sep 24 11:55:55 2009 -0400
description:
small help and parameter name tweaks
2 file(s) affected in this change:
tools/samtools/sam_pileup.xml
tools/samtools/sam_to_bam.xml
diffs (103 lines):
diff -r cbb7103283fe -r 3e194c33f219 tools/samtools/sam_pileup.xml
--- a/tools/samtools/sam_pileup.xml Wed Sep 23 19:11:12 2009 -0400
+++ b/tools/samtools/sam_pileup.xml Thu Sep 24 11:55:55 2009 -0400
@@ -56,13 +56,13 @@
</param>
<param name="mapCap" type="integer" value="60" label="Where to cap mapping quality" />
<conditional name="c">
- <param name="consensus" type="select" label="Whether or not to call the consensus sequence using the MAQ consensus model">
- <option value="no">Don't use MAQ consensus model</option>
- <option value="yes">Use the MAQ consensus model</option>
+ <param name="consensus" type="select" label="Call consensus according to MAQ model?">
+ <option selected="true" value="no">No</option>
+ <option value="yes">Yes</option>
</param>
<when value="no" />
<when value="yes">
- <param name="theta" type="float" value="0.85" label="Theta paramter (error dependency coefficient) in the MAQ consensus calling model" />
+ <param name="theta" type="float" value="0.85" label="Theta parameter (error dependency coefficient) in the MAQ consensus calling model" />
<param name="hapNum" type="integer" value="2" label="Number of haplotypes in the sample" help="Greater than or equal to 2" />
<param name="fraction" type="float" value="0.001" label="Expected fraction of differences between a pair of haplotypes" />
<param name="phredProb" type="integer" value="40" label="Phred probability of an indel in sequencing/prep" />
@@ -77,9 +77,68 @@
**What it does**
-Uses SAMTools_' pileup command to produce a file in the pileup format based on the provided BAM file.
+Uses SAMTools_' pileup command to produce a pileup dataset from a provided BAM dataset. It generated two types of pileup datasets depending on chosen options. If *Call consensus according to MAQ model?* option is set to **No**, the tool produces simple pileup. If the option is set to **Yes**, a ten column pileup dataset with consensus is generated. Both types of datasets are briefly summarized below.
.. _SAMTools: http://samtools.sourceforge.net/samtools.shtml
+
+------
+
+**Types of pileup datasets**
+
+The description of pileup format below is largely based on information that can be found on SAMTools_ documentation page. The 6- and 10-column variants are described below.
+
+.. _SAMTools: http://samtools.sourceforge.net/pileup.shtml
+
+**Six column pileup**::
+
+ 1 2 3 4 5 6
+ ---------------------------------
+ chrM 412 A 2 ., II
+ chrM 413 G 4 ..t, IIIH
+ chrM 414 C 4 ...a III2
+ chrM 415 C 4 TTTt III7
+
+where::
+
+ Column Definition
+ ------- ----------------------------
+ 1 Chromosome
+ 2 Position (1-based)
+ 3 Reference base at that position
+ 4 Coverage (# reads aligning over that position)
+ 5 Bases within reads where (see Galaxy wiki for more info)
+ 6 Quality values (phred33 scale, see Galaxy wiki for more)
+
+**Ten column pileup**
+
+The `ten-column`__ pileup incoroporates additional consensus information generated with *-c* option of *samtools pileup* command::
+
+
+ 1 2 3 4 5 6 7 8 9 10
+ ------------------------------------------------
+ chrM 412 A A 75 0 25 2 ., II
+ chrM 413 G G 72 0 25 4 ..t, IIIH
+ chrM 414 C C 75 0 25 4 ...a III2
+ chrM 415 C T 75 75 25 4 TTTt III7
+
+where::
+
+ Column Definition
+ ------- ----------------------------
+ 1 Chromosome
+ 2 Position (1-based)
+ 3 Reference base at that position
+ 4 Consensus bases
+ 5 Consensus quality
+ 6 SNP quality
+ 7 Maximum mapping quality
+ 8 Coverage (# reads aligning over that position)
+ 9 Bases within reads where (see Galaxy wiki for more info)
+ 10 Quality values (phred33 scale, see Galaxy wiki for more)
+
+
+.. __: http://samtools.sourceforge.net/cns0.shtml
+
</help>
</tool>
diff -r cbb7103283fe -r 3e194c33f219 tools/samtools/sam_to_bam.xml
--- a/tools/samtools/sam_to_bam.xml Wed Sep 23 19:11:12 2009 -0400
+++ b/tools/samtools/sam_to_bam.xml Thu Sep 24 11:55:55 2009 -0400
@@ -51,7 +51,7 @@
**What it does**
-This tool uses the SAMTools_ toolkit to produce a BAM file based on a sorted input SAM file.
+This tool uses the SAMTools_ toolkit to produce a indexed BAM file based on a sorted input SAM file.
.. _SAMTools: http://samtools.sourceforge.net/samtools.shtml