1 new changeset in galaxy-central:
http://bitbucket.org/galaxy/galaxy-central/changeset/15ace61775c5/
changeset: r5543:15ace61775c5
user: kanwei
date: 2011-05-11 21:43:33
summary: trackster: Fix border and error not lining up at right place
affected #: 2 files (37 bytes)
--- a/lib/galaxy/visualization/tracks/data_providers.py Wed May 11 15:38:57 2011 -0400
+++ b/lib/galaxy/visualization/tracks/data_providers.py Wed May 11 15:43:33 2011 -0400
@@ -25,7 +25,7 @@
from pysam import csamtools, ctabix
MAX_VALS = 5000 # only display first MAX_VALS features
-ERROR_MAX_VALS = "Only the first " + str(MAX_VALS) + " %s in this tile are displayed."
+ERROR_MAX_VALS = "Only the first " + str(MAX_VALS) + " %s in the region denoted by the red line are displayed."
# Return None instead of NaN to pass jQuery 1.4's strict JSON
def float_nan(n):
--- a/static/scripts/trackster.js Wed May 11 15:38:57 2011 -0400
+++ b/static/scripts/trackster.js Wed May 11 15:43:33 2011 -0400
@@ -2418,7 +2418,7 @@
var data = result.data;
// if ( (data.length && data.length < 4) ||
// (this.view.high - this.view.low > MIN_SQUISH_VIEW_WIDTH) ) {
- if ( this.view.high - this.view.low > MIN_SQUISH_VIEW_WIDTH ) {
+ if ( this.view.high - this.view.low > MIN_SQUISH_VIEW_WIDTH ) {
mode = "Squish";
} else {
mode = "Pack";
@@ -2511,15 +2511,12 @@
// If there is a message, draw it on canvas so that it moves around with canvas, and make the border red
// to indicate region where message is applicable
if (result.message) {
- $(canvas).css({
- "border-top": "1px solid red"
- });
-
ctx.fillStyle = "red";
ctx.textAlign = "left";
var old_base = ctx.textBaseline;
ctx.textBaseline = "top";
- ctx.fillText(result.message, left_offset, 0);
+ ctx.fillRect(left_offset, 0, canvas.width - left_offset, 1);
+ ctx.fillText(result.message, left_offset, 2);
ctx.textBaseline = old_base;
// If there's no data, return.
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1 new changeset in galaxy-central:
http://bitbucket.org/galaxy/galaxy-central/changeset/d427df9eca38/
changeset: r5542:d427df9eca38
user: jgoecks
date: 2011-05-11 21:38:57
summary: Add support for comment handling to gff_to_interval_index tool.
affected #: 2 files (138 bytes)
--- a/lib/galaxy/datatypes/converters/gff_to_interval_index_converter.py Wed May 11 15:07:24 2011 -0400
+++ b/lib/galaxy/datatypes/converters/gff_to_interval_index_converter.py Wed May 11 15:38:57 2011 -0400
@@ -23,17 +23,16 @@
index = Indexes()
offset = 0
reader_wrapper = GFFReaderWrapper( fileinput.FileInput( input_fname ), fix_strand=True )
- for feature in list( reader_wrapper ):
- # TODO: need to address comments:
- # if comment:
- # increment_offset.
-
+ for feature in list( reader_wrapper ):
# Add feature; index expects BED coordinates.
- convert_gff_coords_to_bed( feature )
- index.add( feature.chrom, feature.start, feature.end, offset )
-
+ if isinstance( feature, GenomicInterval ):
+ convert_gff_coords_to_bed( feature )
+ index.add( feature.chrom, feature.start, feature.end, offset )
+
+ # Always increment offset, even if feature is not an interval and hence
+ # not included in the index.
offset += feature.raw_size
-
+
index.write( open(out_fname, "w") )
if __name__ == "__main__":
--- a/lib/galaxy/datatypes/util/gff_util.py Wed May 11 15:07:24 2011 -0400
+++ b/lib/galaxy/datatypes/util/gff_util.py Wed May 11 15:38:57 2011 -0400
@@ -165,9 +165,10 @@
#finally:
raw_size += len( self.current_line )
- # If header or comment, clear seed interval and return it.
+ # If header or comment, clear seed interval and return it with its size.
if isinstance( self.seed_interval, ( Header, Comment ) ):
return_val = self.seed_interval
+ return_val.raw_size = len( self.current_line )
self.seed_interval = None
return return_val
@@ -225,7 +226,7 @@
self.end_col, self.strand_col, self.score_col, \
self.default_strand, fix_strand=self.fix_strand, \
intervals=feature_intervals, raw_size=raw_size )
-
+
# Convert to BED coords?
if self.convert_to_bed_coord:
convert_gff_coords_to_bed( feature )
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1 new changeset in galaxy-central:
http://bitbucket.org/galaxy/galaxy-central/changeset/5716ef8d312d/
changeset: r5541:5716ef8d312d
user: jgoecks
date: 2011-05-11 21:07:24
summary: Relax diff calculation for Cuffdiff test to account for non-deterministic output.
affected #: 1 file (5 bytes)
--- a/tools/ngs_rna/cuffdiff_wrapper.xml Wed May 11 11:36:22 2011 -0400
+++ b/tools/ngs_rna/cuffdiff_wrapper.xml Wed May 11 15:07:24 2011 -0400
@@ -167,12 +167,12 @@
Line diffs are needed because cuffdiff does not produce deterministic output.
TODO: can we find datasets that lead to deterministic behavior?
-->
- <output name="isoforms_exp" file="cuffdiff_out1.txt" lines_diff="56"/>
- <output name="genes_exp" file="cuffdiff_out2.txt" lines_diff="30"/>
+ <output name="isoforms_exp" file="cuffdiff_out1.txt" lines_diff="200"/>
+ <output name="genes_exp" file="cuffdiff_out2.txt" lines_diff="200"/><output name="tss_groups_exp" file="cuffdiff_out3.txt"/><output name="cds_exp_fpkm_tracking" file="cuffdiff_out4.txt"/>
- <output name="isoforms_fpkm_tracking" file="cuffdiff_out5.txt" lines_diff="16"/>
- <output name="genes_fpkm_tracking" file="cuffdiff_out6.txt" lines_diff="8"/>
+ <output name="isoforms_fpkm_tracking" file="cuffdiff_out5.txt" lines_diff="200"/>
+ <output name="genes_fpkm_tracking" file="cuffdiff_out6.txt" lines_diff="200"/><output name="tss_groups_fpkm_tracking" file="cuffdiff_out7.txt"/><output name="cds_fpkm_tracking" file="cuffdiff_out8.txt"/><output name="splicing_diff" file="cuffdiff_out9.txt"/>
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1 new changeset in galaxy-central:
http://bitbucket.org/galaxy/galaxy-central/changeset/863fc12ce692/
changeset: r5539:863fc12ce692
user: kellyv
date: 2011-05-11 16:49:32
summary: Updated SRMA to properly set dbkey and changed functional tests so that they can handle a single line difference for the SRMA version number tag
affected #: 2 files (1.5 KB)
--- a/tools/sr_mapping/srma_wrapper.py Wed May 11 10:46:46 2011 -0400
+++ b/tools/sr_mapping/srma_wrapper.py Wed May 11 10:49:32 2011 -0400
@@ -3,23 +3,10 @@
"""
Runs SRMA on a SAM/BAM file;
TODO: more documentation
-TODO: Allow use of fastq file in user's history, will need to index on-the-fly
usage: srma_wrapper.py [options]
- -r, --ref=r: The reference genome to use or index
- -i, --input=i: The SAM/BAM input file
- -o, --output=o: The SAM/BAM output file
- -O, --offset=O: The alignment offset
- -Q, --minMappingQuality=Q: The minimum mapping quality
- -P, --minAlleleProbability=P: The minimum allele probability conditioned on coverage (for the binomial quantile).
- -C, --minAlleleCoverage=C: The minimum haploid coverage for the consensus. Default value: 3. This option can be set
- -R, --range=R: A range to examine
- -c, --correctBases=c: Correct bases
- -q, --useSequenceQualities=q: Use sequence qualities
- -M, --maxHeapSize=M: The maximum number of nodes on the heap before re-alignment is ignored
- -s, --fileSource=s: Whether to use a previously indexed reference sequence or one from history (indexed or history)
- -p, --params=p: Parameter setting to use (pre_set or full)
- -D, --dbkey=D: Dbkey for reference genome
+
+See below for options
"""
import optparse, os, shutil, subprocess, sys, tempfile
--- a/tools/sr_mapping/srma_wrapper.xml Wed May 11 10:46:46 2011 -0400
+++ b/tools/sr_mapping/srma_wrapper.xml Wed May 11 10:49:32 2011 -0400
@@ -1,4 +1,4 @@
-<tool id="srma_wrapper" name="Re-align with SRMA" version="0.2.1">
+<tool id="srma_wrapper" name="Re-align with SRMA" version="0.2.5"><description></description><command interpreter="python">srma_wrapper.py
#if $refGenomeSource.refGenomeSource_type == "history":
@@ -34,7 +34,10 @@
</param><when value="built-in"><param name="ref" type="select" label="Select a reference genome">
- <options from_data_table="srma_indexes" />
+ <options from_data_table="srma_indexes">
+ <filter type="sort_by" column="2" />
+ <validator type="no_options" message="No indexes are available" />
+ </options></param></when><when value="history">
@@ -66,12 +69,17 @@
<conditional name="refGenomeSource.refGenomeSource_type"><when value="built-in"><action type="metadata" name="dbkey">
- <option type="from_file" name="srma_index.loc" column="0" offset="0">
+ <option type="from_data_table" name="srma_indexes" column="1" offset="0"><filter type="param_value" column="0" value="#" compare="startswith" keep="False" />
- <filter type="param_value" ref="refGenomeSource.ref" column="1" />
+ <filter type="param_value" ref="refGenomeSource.ref" column="0" /></option></action></when>
+ <when value="history">
+ <action type="metadata" name="dbkey">
+ <option type="from_param" name="refGenomeSource.ownFile" param_attribute="dbkey" />
+ </action>
+ </when></conditional></actions></data>
@@ -91,7 +99,7 @@
<param name="ref" value="hg18chr21" /><param name="input" value="srma_in1.bam" type="bam" /><param name="source_select" value="pre_set" />
- <output name="output" file="srma_out1.bam" ftype="bam"/>
+ <output name="output" file="srma_out1.bam" ftype="bam" lines_diff="2" /><!-- allows tag with version number to be different --></test><test><!-- Commands to run to prepare test files (uses custom genome):
@@ -107,8 +115,8 @@
samtools sort srma_in3.u.bam srma_in3
--><param name="refGenomeSource_type" value="history" />
- <param name="ownFile" value="srma_in2.fa" />
- <param name="input" value="srma_in3.bam" type="bam" />
+ <param name="ownFile" value="srma_in2.fa" ftype="fasta" />
+ <param name="input" value="srma_in3.bam" ftype="bam" /><param name="source_select" value="full" /><param name="offset" value="20" /><param name="minMappingQuality" value="0" />
@@ -118,7 +126,7 @@
<param name="correctBases" value="true" /><param name="useSequenceQualities" value="true" /><param name="maxHeapSize" value="8192" />
- <output name="output" file="srma_out2.bam" ftype="bam"/>
+ <output name="output" file="srma_out2.bam" ftype="bam" lines_diff="2" /><!-- allows tag with version number to be different --></test></tests><help>
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1 new changeset in galaxy-central:
http://bitbucket.org/galaxy/galaxy-central/changeset/1a379a0f2ecc/
changeset: r5537:1a379a0f2ecc
user: dan
date: 2011-05-11 15:38:23
summary: First pass at adding some GATK tools. Included tools are "Realigner Target Creator", "Indel Realigner", "Count Covariates", "Table Recalibration", "Analyze Covariates" and "Unified Genotyper". These tool integrations should be considered beta: changes that will not be backwards-compatible with workflows and re-run functionality should be expected.
TODO:
A few new datatypes have been declared, but exist in name only (subclasses of Text defined only in datatypes_conf.xml), these should be refined to be true datatypes, with proper peeks, sniffing, metadata, etc.
Help sections need work.
HTML listing of files in e.g. Analyze Covariates should be prettified.
Other items not listed.
affected #: 23 files (1.0 KB)
Diff too large to display.
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1 new changeset in galaxy-central:
http://bitbucket.org/galaxy/galaxy-central/changeset/8e37a56a13d8/
changeset: r5536:8e37a56a13d8
user: dan
date: 2011-05-11 02:11:52
summary: Add a "contains" compare type to functional tests. Enables simple checking for substrings in a test output file, on a line-by-line basis. TODO: Enhance to enforce order.
affected #: 1 file (887 bytes)
--- a/test/base/twilltestcase.py Tue May 10 19:59:46 2011 -0400
+++ b/test/base/twilltestcase.py Tue May 10 20:11:52 2011 -0400
@@ -145,6 +145,20 @@
#lines_diff not applicable to multiline matching
assert re.match( local_file, history_data, re.MULTILINE ), "Multiline Regular expression did not match data file"
+ def files_contains( self, file1, file2, attributes=None ):
+ """Checks the contents of file2 for substrings found in file1, on a per-line basis"""
+ local_file = open( file1, 'U' ).readlines() #regex file
+ #TODO: allow forcing ordering of contains
+ history_data = open( file2, 'U' ).read()
+ lines_diff = int( attributes.get( 'lines_diff', 0 ) )
+ line_diff_count = 0
+ while local_file:
+ contains = local_file.pop( 0 ).rstrip( '\n\r' )
+ if contains not in history_data:
+ line_diff_count += 1
+ if line_diff_count > lines_diff:
+ raise AssertionError, "Failed to find '%s' in history data. (lines_diff=%i):\n" % ( contains, lines_diff )
+
def get_filename( self, filename ):
full = os.path.join( self.file_dir, filename)
return os.path.abspath(full)
@@ -665,6 +679,8 @@
s2 = os.path.getsize(local_name)
if abs(s1-s2) > int(delta):
raise Exception, 'Files %s=%db but %s=%db - compare (delta=%s) failed' % (temp_name,s1,local_name,s2,delta)
+ elif compare == "contains":
+ self.files_contains( local_name, temp_name, attributes=attributes )
else:
raise Exception, 'Unimplemented Compare type: %s' % compare
if extra_files:
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1 new changeset in galaxy-central:
http://bitbucket.org/galaxy/galaxy-central/changeset/07b3a58627e6/
changeset: r5535:07b3a58627e6
user: dan
date: 2011-05-11 01:59:46
summary: Fix for expand grouping to allow toolbox tests to use the default parameter value.
affected #: 1 file (150 bytes)
--- a/test/functional/test_toolbox.py Tue May 10 10:50:26 2011 -0400
+++ b/test/functional/test_toolbox.py Tue May 10 19:59:46 2011 -0400
@@ -119,6 +119,8 @@
if prefix:
new_prefix = "%s|%s" % ( prefix, new_prefix )
expanded_inputs.update( self.__expand_grouping( { new_prefix : r_value }, declared_inputs, prefix = new_prefix ) )
+ elif value.name not in declared_inputs:
+ print "%s not declared in tool test, will not change default value." % value.name
elif isinstance(declared_inputs[value.name], str):
if prefix:
expanded_inputs["%s|%s" % ( prefix, value.name ) ] = declared_inputs[value.name].split(",")
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1 new changeset in galaxy-central:
http://bitbucket.org/galaxy/galaxy-central/changeset/e8cb2707083d/
changeset: r5534:e8cb2707083d
user: dan
date: 2011-05-10 16:50:26
summary: Have MACS peak caller wrapper use return code to set error state.
affected #: 2 files (331 bytes)
--- a/tools/peak_calling/macs_wrapper.py Tue May 10 10:35:19 2011 -0400
+++ b/tools/peak_calling/macs_wrapper.py Tue May 10 10:50:26 2011 -0400
@@ -5,8 +5,6 @@
import simplejson
CHUNK_SIZE = 1024
-ERROR_LINES = [ 'ERROR', 'command not found' ] #'Fatal' errors that should be passed back to stderr
-WARNING_LINE_START = 'WARNING @'
def gunzip_cat_glob_path( glob_path, target_filename, delete = False ):
out = open( target_filename, 'wb' )
@@ -70,17 +68,16 @@
stderr_name = tempfile.NamedTemporaryFile().name # redirect stderr here, macs provides lots of info via stderr, make it into a report
proc = subprocess.Popen( args=cmdline, shell=True, cwd=tmp_dir, stderr=open( stderr_name, 'wb' ) )
proc.wait()
-
- #Need to lightly parse stderr file to see if there is a fatal error (e.g. macs is not installed on system)
- #We don't want to set tool run to error state if only warnings or info, e.g. mfold needs to be decreased, rather create empty outputs, but let user view macs log
- for line in open( stderr_name ):
- for err_text in ERROR_LINES:
- if err_text in line:
- #print error, but don't quit, allow cleanup to occur at end
- print >> sys.stderr, line.rstrip( '\n\r' )
- if line.startswith( WARNING_LINE_START ):
- #print warnings so they are viewable from info
- print line.split( ':' )[-1].strip()
+ #We don't want to set tool run to error state if only warnings or info, e.g. mfold could be decreased to improve model, but let user view macs log
+ #Do not terminate if error code, allow dataset (e.g. log) creation and cleanup
+ if proc.returncode:
+ stderr_f = open( stderr_name )
+ while True:
+ chunk = stderr_f.read( CHUNK_SIZE )
+ if not chunk:
+ stderr_f.close()
+ break
+ sys.stderr.write( chunk )
#run R to create pdf from model script
if os.path.exists( os.path.join( tmp_dir, "%s_model.r" % experiment_name ) ):
--- a/tools/peak_calling/macs_wrapper.xml Tue May 10 10:35:19 2011 -0400
+++ b/tools/peak_calling/macs_wrapper.xml Tue May 10 10:50:26 2011 -0400
@@ -1,4 +1,4 @@
-<tool id="peakcalling_macs" name="MACS" version="1.0.0">
+<tool id="peakcalling_macs" name="MACS" version="1.0.1"><description>Model-based Analysis of ChIP-Seq</description><command interpreter="python">macs_wrapper.py $options_file $output_bed_file $output_extra_files $output_extra_files.files_path</command><requirements>
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.