This commit is contained in:
Enis Afgan
2012-08-22 16:13:51 +10:00
133 changed files with 237 additions and 475 deletions
-2
View File
@@ -169,7 +169,6 @@
<datatype extension="linecount" type="galaxy.datatypes.data:LineCount" display_in_upload="false"/>
<datatype extension="memexml" type="galaxy.datatypes.xml:MEMEXml" mimetype="application/xml" display_in_upload="true"/>
<datatype extension="cisml" type="galaxy.datatypes.xml:CisML" mimetype="application/xml" display_in_upload="true"/>
<datatype extension="blastxml" type="galaxy.datatypes.xml:BlastXml" mimetype="application/xml" display_in_upload="true"/>
<datatype extension="xml" type="galaxy.datatypes.xml:GenericXml" mimetype="application/xml" display_in_upload="true"/>
<datatype extension="vcf" type="galaxy.datatypes.tabular:Vcf" display_in_upload="true">
<converter file="vcf_to_bgzip_converter.xml" target_datatype="bgzip"/>
@@ -246,7 +245,6 @@
<sniffer type="galaxy.datatypes.binary:TwoBit"/>
<sniffer type="galaxy.datatypes.binary:Bam"/>
<sniffer type="galaxy.datatypes.binary:Sff"/>
<sniffer type="galaxy.datatypes.xml:BlastXml"/>
<sniffer type="galaxy.datatypes.xml:GenericXml"/>
<sniffer type="galaxy.datatypes.sequence:Maf"/>
<sniffer type="galaxy.datatypes.sequence:Lav"/>
@@ -0,0 +1,14 @@
<tool id="CONVERTER_bedgraph_to_bigwig" name="Convert BedGraph to BigWig" hidden="true">
<!-- Used internally to generate track indexes -->
<command>grep -v "^track" $input | wigToBigWig -clip stdin $chromInfo $output</command>
<inputs>
<page>
<param format="bedgraph" name="input" type="data" label="Choose wiggle"/>
</page>
</inputs>
<outputs>
<data format="bigwig" name="output"/>
</outputs>
<help>
</help>
</tool>
+48 -44
View File
@@ -6,48 +6,52 @@ import sys
from galaxy import eggs
from galaxy.datatypes.util.gff_util import read_unordered_gtf, convert_gff_coords_to_bed
# Process arguments.
in_fname = sys.argv[1]
out_fname = sys.argv[2]
def main():
# Process arguments.
in_fname = sys.argv[1]
out_fname = sys.argv[2]
# Create dict of name-location pairings.
name_loc_dict = {}
for feature in read_unordered_gtf( open( in_fname, 'r' ) ):
for name in feature.attributes:
val = feature.attributes[ name ]
try:
float( val )
continue
except:
convert_gff_coords_to_bed( feature )
# Value is not a number, so it can be indexed.
if val not in name_loc_dict:
# Value is not in dictionary.
name_loc_dict[ val ] = {
'contig': feature.chrom,
'start': feature.start,
'end': feature.end
}
else:
# Value already in dictionary, so update dictionary.
loc = name_loc_dict[ val ]
if feature.start < loc[ 'start' ]:
loc[ 'start' ] = feature.start
if feature.end > loc[ 'end' ]:
loc[ 'end' ] = feature.end
# Print name, loc in sorted order.
out = open( out_fname, 'w' )
max_len = 0
entries = []
for name in sorted( name_loc_dict.iterkeys() ):
loc = name_loc_dict[ name ]
entry = '%s\t%s' % ( name, '%s:%i-%i' % ( loc[ 'contig' ], loc[ 'start' ], loc[ 'end' ] ) )
if len( entry ) > max_len:
max_len = len( entry )
entries.append( entry )
out.write( str( max_len + 1 ).ljust( max_len ) + '\n' )
for entry in entries:
out.write( entry.ljust( max_len ) + '\n' )
out.close()
# Create dict of name-location pairings.
name_loc_dict = {}
for feature in read_unordered_gtf( open( in_fname, 'r' ) ):
for name in feature.attributes:
val = feature.attributes[ name ]
try:
float( val )
continue
except:
convert_gff_coords_to_bed( feature )
# Value is not a number, so it can be indexed.
if val not in name_loc_dict:
# Value is not in dictionary.
name_loc_dict[ val ] = {
'contig': feature.chrom,
'start': feature.start,
'end': feature.end
}
else:
# Value already in dictionary, so update dictionary.
loc = name_loc_dict[ val ]
if feature.start < loc[ 'start' ]:
loc[ 'start' ] = feature.start
if feature.end > loc[ 'end' ]:
loc[ 'end' ] = feature.end
# Print name, loc in sorted order.
out = open( out_fname, 'w' )
max_len = 0
entries = []
for name in sorted( name_loc_dict.iterkeys() ):
loc = name_loc_dict[ name ]
entry = '%s\t%s' % ( name, '%s:%i-%i' % ( loc[ 'contig' ], loc[ 'start' ], loc[ 'end' ] ) )
if len( entry ) > max_len:
max_len = len( entry )
entries.append( entry )
out.write( str( max_len + 1 ).ljust( max_len ) + '\n' )
for entry in entries:
out.write( entry.ljust( max_len ) + '\n' )
out.close()
if __name__ == '__main__':
main()
@@ -1,79 +0,0 @@
#!/usr/bin/env python
"""
Convert from interval file to interval index file. Default input file format is BED (0-based, half-open intervals).
usage: %prog in_file out_file
-G, --gff: input is GFF format, meaning start and end coordinates are 1-based, closed interval
"""
from __future__ import division
import sys, fileinput
from galaxy import eggs
import pkg_resources; pkg_resources.require( "bx-python" )
from galaxy.visualization.tracks.summary import *
from bx.cookbook import doc_optparse
from galaxy.tools.util.gff_util import convert_gff_coords_to_bed
from bx.interval_index_file import Indexes
from galaxy.tools.util.gff_util import parse_gff_attributes
def main():
# Read options, args.
options, args = doc_optparse.parse( __doc__ )
try:
gff_format = bool( options.gff )
input_fname, out_fname = args
except:
doc_optparse.exception()
# Do conversion.
# TODO: take column numbers from command line.
if gff_format:
chr_col, start_col, end_col = ( 0, 3, 4 )
else:
chr_col, start_col, end_col = ( 0, 1, 2 )
index = Indexes()
offset = 0
# Need to keep track of last gene, transcript id for indexing GTF files.
last_gene_id = None
last_transcript_id = None
for line in open(input_fname, "r"):
feature = line.strip().split('\t')
if not feature or feature[0].startswith("track") or feature[0].startswith("#"):
offset += len(line)
continue
chrom = feature[ chr_col ]
chrom_start = int( feature[ start_col ] )
chrom_end = int( feature[ end_col ] )
if gff_format:
chrom_start, chrom_end = convert_gff_coords_to_bed( [chrom_start, chrom_end ] )
# Only add feature if gene_id, transcript_id are different from last
# values.
if len( feature ) == 9:
attributes = parse_gff_attributes( feature[8] )
gene_id = attributes.get( 'gene_id', None )
transcript_id = attributes.get( 'transcript_id', None )
if gene_id and transcript_id and gene_id == last_gene_id and \
transcript_id == last_transcript_id:
# Feature has same gene_id, transcript as last feature, so
# do not add.
offset += len(line)
continue
else:
# gene_id, transcript_id set and are different from last
# values.
last_gene_id = gene_id
last_transcript_id = transcript_id
#print "%s %s %s %s %i %i %i" % (feature[2], last_gene_id, last_transcript_id, chrom, chrom_start, chrom_end, offset)
index.add( chrom, chrom_start, chrom_end, offset )
offset += len(line)
index.write( open(out_fname, "w") )
if __name__ == "__main__":
main()
@@ -1,6 +1,6 @@
<tool id="CONVERTER_wig_to_bigwig" name="Convert Wiggle to BigWig" hidden="true">
<!-- Used internally to generate track indexes -->
<command>wigToBigWig $input $chromInfo $output</command>
<command>grep -v "^track" $input | wigToBigWig -clip stdin $chromInfo $output</command>
<inputs>
<page>
<param format="wig" name="input" type="data" label="Choose wiggle"/>
+3 -2
View File
@@ -338,7 +338,7 @@ class BedGraph( Interval ):
file_ext = "bedgraph"
def get_track_type( self ):
return "LineTrack", {"data": "array_tree"}
return "LineTrack", { "data": "bigwig", "index": "bigwig" }
def as_ucsc_display_file( self, dataset, **kwd ):
"""
@@ -1141,8 +1141,9 @@ class Wiggle( Tabular, _RemoteCallMixin ):
resolution = min( resolution, 100000 )
resolution = max( resolution, 1 )
return resolution
def get_track_type( self ):
return "LineTrack", {"data": "bigwig", "index": "bigwig"}
return "LineTrack", { "data": "bigwig", "index": "bigwig" }
class CustomTrack ( Tabular ):
"""UCSC CustomTrack"""
-3
View File
@@ -276,7 +276,6 @@ class Registry( object ):
'axt' : sequence.Axt(),
'bam' : binary.Bam(),
'bed' : interval.Bed(),
'blastxml' : xml.BlastXml(),
'coverage' : coverage.LastzCoverage(),
'customtrack' : interval.CustomTrack(),
'csfasta' : sequence.csFasta(),
@@ -310,7 +309,6 @@ class Registry( object ):
'axt' : 'text/plain',
'bam' : 'application/octet-stream',
'bed' : 'text/plain',
'blastxml' : 'application/xml',
'customtrack' : 'text/plain',
'csfasta' : 'text/plain',
'eland' : 'application/octet-stream',
@@ -348,7 +346,6 @@ class Registry( object ):
self.sniff_order = [
binary.Bam(),
binary.Sff(),
xml.BlastXml(),
xml.GenericXml(),
sequence.Maf(),
sequence.Lav(),
+4 -3
View File
@@ -264,10 +264,10 @@ class Tabular( data.Text ):
def display_data(self, trans, dataset, preview=False, filename=None, to_ext=None, chunk=None):
#TODO Prevent failure when displaying extremely long > 50kb lines.
if to_ext or not preview:
return self._serve_raw(trans, dataset, to_ext)
if chunk:
return self.get_chunk(trans, dataset, chunk)
if to_ext or not preview:
return self._serve_raw(trans, dataset, to_ext)
else:
column_names = 'null'
if dataset.metadata.column_names:
@@ -644,4 +644,5 @@ class FeatureLocationIndex( Tabular ):
"""
file_ext='fli'
MetadataElement( name="columns", default=2, desc="Number of columns", readonly=True, visible=False )
MetadataElement( name="column_types", default=['str', 'str'], param=metadata.ColumnTypesParameter, desc="Column types", readonly=True, visible=False, no_value=[] )
MetadataElement( name="column_types", default=['str', 'str'], param=metadata.ColumnTypesParameter, desc="Column types", readonly=True, visible=False, no_value=[] )
-120
View File
@@ -27,9 +27,6 @@ class GenericXml( data.Text ):
>>> fname = get_test_fname( 'megablast_xml_parser_test1.blastxml' )
>>> GenericXml().sniff( fname )
True
>>> fname = get_test_fname( 'tblastn_four_human_vs_rhodopsin.xml' )
>>> BlastXml().sniff( fname )
True
>>> fname = get_test_fname( 'interval.interval' )
>>> GenericXml().sniff( fname )
False
@@ -50,123 +47,6 @@ class GenericXml( data.Text ):
data.Text.merge(split_files, output_file)
merge = staticmethod(merge)
class BlastXml( GenericXml ):
"""NCBI Blast XML Output data"""
file_ext = "blastxml"
def set_peek( self, dataset, is_multi_byte=False ):
"""Set the peek and blurb text"""
if not dataset.dataset.purged:
dataset.peek = data.get_file_peek( dataset.file_name, is_multi_byte=is_multi_byte )
dataset.blurb = 'NCBI Blast XML data'
else:
dataset.peek = 'file does not exist'
dataset.blurb = 'file purged from disk'
def sniff( self, filename ):
"""
Determines whether the file is blastxml
>>> fname = get_test_fname( 'megablast_xml_parser_test1.blastxml' )
>>> BlastXml().sniff( fname )
True
>>> fname = get_test_fname( 'tblastn_four_human_vs_rhodopsin.xml' )
>>> BlastXml().sniff( fname )
True
>>> fname = get_test_fname( 'interval.interval' )
>>> BlastXml().sniff( fname )
False
"""
#TODO - Use a context manager on Python 2.5+ to close handle
handle = open(filename)
line = handle.readline()
if line.strip() != '<?xml version="1.0"?>':
handle.close()
return False
line = handle.readline()
if line.strip() not in ['<!DOCTYPE BlastOutput PUBLIC "-//NCBI//NCBI BlastOutput/EN" "http://www.ncbi.nlm.nih.gov/dtd/NCBI_BlastOutput.dtd">',
'<!DOCTYPE BlastOutput PUBLIC "-//NCBI//NCBI BlastOutput/EN" "NCBI_BlastOutput.dtd">']:
handle.close()
return False
line = handle.readline()
if line.strip() != '<BlastOutput>':
handle.close()
return False
handle.close()
return True
def merge(split_files, output_file):
"""Merging multiple XML files is non-trivial and must be done in subclasses."""
if len(split_files) == 1:
#For one file only, use base class method (move/copy)
return data.Text.merge(split_files, output_file)
out = open(output_file, "w")
h = None
for f in split_files:
h = open(f)
body = False
header = h.readline()
if not header:
out.close()
h.close()
raise ValueError("BLAST XML file %s was empty" % f)
if header.strip() != '<?xml version="1.0"?>':
out.write(header) #for diagnosis
out.close()
h.close()
raise ValueError("%s is not an XML file!" % f)
line = h.readline()
header += line
if line.strip() not in ['<!DOCTYPE BlastOutput PUBLIC "-//NCBI//NCBI BlastOutput/EN" "http://www.ncbi.nlm.nih.gov/dtd/NCBI_BlastOutput.dtd">',
'<!DOCTYPE BlastOutput PUBLIC "-//NCBI//NCBI BlastOutput/EN" "NCBI_BlastOutput.dtd">']:
out.write(header) #for diagnosis
out.close()
h.close()
raise ValueError("%s is not a BLAST XML file!" % f)
while True:
line = h.readline()
if not line:
out.write(header) #for diagnosis
out.close()
h.close()
raise ValueError("BLAST XML file %s ended prematurely" % f)
header += line
if "<Iteration>" in line:
break
if len(header) > 10000:
#Something has gone wrong, don't load too much into memory!
#Write what we have to the merged file for diagnostics
out.write(header)
out.close()
h.close()
raise ValueError("BLAST XML file %s has too long a header!" % f)
if "<BlastOutput>" not in header:
out.close()
h.close()
raise ValueError("%s is not a BLAST XML file:\n%s\n..." % (f, header))
if f == split_files[0]:
out.write(header)
old_header = header
elif old_header[:300] != header[:300]:
#Enough to check <BlastOutput_program> and <BlastOutput_version> match
out.close()
h.close()
raise ValueError("BLAST XML headers don't match for %s and %s - have:\n%s\n...\n\nAnd:\n%s\n...\n" \
% (split_files[0], f, old_header[:300], header[:300]))
else:
out.write(" <Iteration>\n")
for line in h:
if "</BlastOutput_iterations>" in line:
break
#TODO - Increment <Iteration_iter-num> and if required automatic query names
#like <Iteration_query-ID>Query_3</Iteration_query-ID> to be increasing?
out.write(line)
h.close()
out.write(" </BlastOutput_iterations>\n")
out.write("</BlastOutput>\n")
out.close()
merge = staticmethod(merge)
class MEMEXml( GenericXml ):
"""MEME XML Output data"""
file_ext = "memexml"
+6 -12
View File
@@ -490,7 +490,6 @@ class JobWrapper( object ):
if stderr contains anything, then False is returned.
Note that the job id is just for messages.
"""
err_msg = ""
# By default, the tool succeeded. This covers the case where the code
# has a bug but the tool was ok, and it lets a workflow continue.
success = True
@@ -507,7 +506,7 @@ class JobWrapper( object ):
# Check the exit code ranges in the order in which
# they were specified. Each exit_code is a StdioExitCode
# that includes an applicable range. If the exit code was in
# that range, then apply the error level and add in a message.
# that range, then apply the error level and add a message.
# If we've reached a fatal error rule, then stop.
max_error_level = galaxy.tools.StdioErrorLevel.NO_ERROR
for stdio_exit_code in self.tool.stdio_exit_codes:
@@ -515,20 +514,16 @@ class JobWrapper( object ):
tool_exit_code <= stdio_exit_code.range_end ):
# Tack on a generic description of the code
# plus a specific code description. For example,
# this might append "Job 42: Warning: Out of Memory\n".
# TODO: Find somewhere to stick the err_msg -
# possibly to the source (stderr/stdout), possibly
# in a new db column.
# this might prepend "Job 42: Warning: Out of Memory\n".
code_desc = stdio_exit_code.desc
if ( None == code_desc ):
code_desc = ""
tool_msg = ( "Job %s: %s: Exit code %d: %s" % (
job.get_id_tag(),
galaxy.tools.StdioErrorLevel.desc( tool_exit_code ),
tool_msg = ( "%s: Exit code %d: %s" % (
galaxy.tools.StdioErrorLevel.desc( stdio_exit_code.error_level ),
tool_exit_code,
code_desc ) )
log.info( tool_msg )
stderr = err_msg + stderr
log.info( "Job %s: %s" % (job.get_id_tag(), tool_msg) )
stderr = tool_msg + "\n" + stderr
max_error_level = max( max_error_level,
stdio_exit_code.error_level )
if ( max_error_level >=
@@ -571,7 +566,6 @@ class JobWrapper( object ):
re.IGNORECASE )
if ( regex_match ):
rexmsg = self.regex_err_msg( regex_match, regex)
# DELETEME
log.info( "Job %s: %s"
% ( job.get_id_tag(), rexmsg ) )
stderr = rexmsg + "\n" + stderr
@@ -0,0 +1,14 @@
"""
The NCBI BLAST+ tools have been eliminated from the distribution. The tools and
datatypes are are now available in repositories named ncbi_blast_plus and
blast_datatypes, respectively, from the main Galaxy tool shed at
http://toolshed.g2.bx.psu.edu will be installed into your local Galaxy instance
at the location discussed above by running the following command.
"""
import sys
def upgrade():
print __doc__
def downgrade():
pass
+1 -1
View File
@@ -2631,7 +2631,7 @@ class Tool:
if for_link:
# Create tool link.
if not self.tool_type.startswith( 'data_source' ):
link = url_for( controller='tool_runner', tool_id=self.id )
link = url_for( '/tool_runner', tool_id=self.id )
else:
link = url_for( self.action, **self.get_static_param_values( trans ) )
@@ -968,29 +968,32 @@ class BBIDataProvider( TracksDataProvider ):
# which we use converted_dataset
f, bbi = self._get_dataset()
# If the stats kwarg was provide, we compute overall summary data for the
# range defined by start and end but no reduced data. This is currently
# used by client to determine the default range.
# If stats requested, compute overall summary data for the range
# start:endbut no reduced data. This is currently used by client
# to determine the default range.
if 'stats' in kwargs:
summary = bbi.summarize( chrom, start, end, 1 )
f.close()
if summary is None:
return None
else:
min = 0
max = 0
mean = 0
sd = 0
if summary is not None:
# Does the summary contain any defined values?
valid_count = summary.valid_count[0]
if summary.valid_count < 1:
return None
if summary.valid_count > 0:
# Compute $\mu \pm 2\sigma$ to provide an estimate for upper and lower
# bounds that contain ~95% of the data.
mean = summary.sum_data[0] / valid_count
var = summary.sum_squares[0] - mean
if valid_count > 1:
var /= valid_count - 1
sd = numpy.sqrt( var )
min = summary.min_val[0]
max = summary.max_val[0]
# Compute $\mu \pm 2\sigma$ to provide an estimate for upper and lower
# bounds that contain ~95% of the data.
mean = summary.sum_data[0] / valid_count
var = summary.sum_squares[0] - mean
if valid_count > 1:
var /= valid_count - 1
sd = numpy.sqrt( var )
return dict( data=dict( min=summary.min_val[0], max=summary.max_val[0], mean=mean, sd=sd ) )
return dict( data=dict( min=min, max=max, mean=mean, sd=sd ) )
# Sample from region using approximately this many samples.
N = 1000
+15 -1
View File
@@ -387,7 +387,21 @@ class TracksController( BaseUIController, UsesVisualizationMixin, UsesHistoryDat
return return_message
extra_info = None
if 'index' in data_sources and data_sources['index']['name'] == "summary_tree" and kwargs.get("mode", "Auto") == "Auto":
mode = kwargs.get( "mode", "Auto" )
# Handle histogram mode uniquely for now:
if mode == "Coverage":
# Get summary using minimal cutoffs.
tracks_dataset_type = data_sources['index']['name']
converted_dataset = dataset.get_converted_dataset( trans, tracks_dataset_type )
indexer = get_data_provider( tracks_dataset_type )( converted_dataset, dataset )
summary = indexer.get_data( chrom, low, high, resolution=kwargs[ 'resolution' ], detail_cutoff=0, draw_cutoff=0 )
if summary == "detail":
# Use maximum level of detail--2--to get summary data no matter the resolution.
summary = indexer.get_data( chrom, low, high, resolution=kwargs[ 'resolution' ], level=2, detail_cutoff=0, draw_cutoff=0 )
frequencies, max_v, avg_v, delta = summary
return { 'dataset_type': tracks_dataset_type, 'data': frequencies, 'max': max_v, 'avg': avg_v, 'delta': delta }
if 'index' in data_sources and data_sources['index']['name'] == "summary_tree" and mode == "Auto":
# Only check for summary_tree if it's Auto mode (which is the default)
#
# Have to choose between indexer and data provider
+4
View File
@@ -0,0 +1,4 @@
#!/bin/sh
cd `dirname $0`/../..
python ./scripts/migrate_tools/migrate_tools.py 0004_tools.xml $@
+12
View File
@@ -0,0 +1,12 @@
<?xml version="1.0"?>
<toolshed name="toolshed.g2.bx.psu.edu">
<repository name="blast_datatypes" description="Datatypes for BLAST" changeset_revision="e1c29f302301" />
<repository name="ncbi_blast_plus" description="Galaxy wrappers for NCBI BLAST+" changeset_revision="d375502056f1">
<tool id="blastxml_to_tabular" version="0.0.8" file="blastxml_to_tabular.xml"/>
<tool id="ncbi_blastn_wrapper" version="0.0.11" file="ncbi_blastn_wrapper.xml"/>
<tool id="ncbi_blastp_wrapper" version="0.0.11" file="ncbi_blastp_wrapper.xml"/>
<tool id="ncbi_blastx_wrapper" version="0.0.11" file="ncbi_blastx_wrapper.xml"/>
<tool id="ncbi_tblastn_wrapper" version="0.0.11" file="ncbi_tblastn_wrapper.xml"/>
<tool id="ncbi_tblastx_wrapper" version="0.0.11" file="ncbi_tblastx_wrapper.xml"/>
</repository>
</toolshed>
-10
View File
@@ -1,10 +0,0 @@
96c96
< if ( drag.dragging ){
---
> if ( drag.dragging ) {
99c99,101
< }
---
> } else {
> hijack( event, "dragclickonly", elem );
> }

Before

Width:  |  Height:  |  Size: 48 B

After

Width:  |  Height:  |  Size: 48 B

+7 -7
View File
@@ -33,13 +33,13 @@ var HistoryItem = BaseModel.extend({
display : function(){},
edit_attr : function(){},
delete : function(){},
remove : function(){},
download : function(){},
details : function(){},
rerun : function(){},
tags : function(){},
annotations : function(){},
peek : function(){},
peek : function(){}
});
//..............................................................................
@@ -51,17 +51,17 @@ var HistoryItemView = BaseView.extend({
icons : {
display : 'path to icon',
edit_attr : 'path to icon',
delete : 'path to icon',
remove : 'path to icon',
download : 'path to icon',
details : 'path to icon',
rerun : 'path to icon',
tags : 'path to icon',
annotations : 'path to icon',
annotations : 'path to icon'
},
render : function(){
this.$el.append( 'div' )
},
this.$el.append( 'div' );
}
});
@@ -139,7 +139,7 @@ var HistoryCollectionView = BaseView.extend({
render : function(){
},
}
});
Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 B

File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1
View File
@@ -0,0 +1 @@
var HistoryItem=BaseModel.extend({display:function(){},edit_attr:function(){},remove:function(){},download:function(){},details:function(){},rerun:function(){},tags:function(){},annotations:function(){},peek:function(){}});var HistoryItemView=BaseView.extend({tagName:"div",className:"historyItemContainer",icons:{display:"path to icon",edit_attr:"path to icon",remove:"path to icon",download:"path to icon",details:"path to icon",rerun:"path to icon",tags:"path to icon",annotations:"path to icon"},render:function(){this.$el.append("div")}});var History=Backbone.Collection.extend({});var HistoryCollectionView=BaseView.extend({tagName:"body",className:"historyCollection",render:function(){}});
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.panel_section=b(function(e,n,d,l,k){d=d||e.helpers;var i="",c,h,o=this,f="function",m=d.helperMissing,g=void 0,j=this.escapeExpression;i+='<div class="toolSectionTitle" id="title_';h=d.id;c=h||n.id;if(typeof c===f){c=c.call(n,{hash:{}})}else{if(c===g){c=m.call(n,"id",{hash:{}})}}i+=j(c)+'">\n <a href="javascript:void(0)"><span>';h=d.name;c=h||n.name;if(typeof c===f){c=c.call(n,{hash:{}})}else{if(c===g){c=m.call(n,"name",{hash:{}})}}i+=j(c)+'</span></a>\n</div>\n<div id="';h=d.id;c=h||n.id;if(typeof c===f){c=c.call(n,{hash:{}})}else{if(c===g){c=m.call(n,"id",{hash:{}})}}i+=j(c)+'" class="toolSectionBody" style="display: none; ">\n <div class="toolSectionBg"></div>\n<div>';return i})})();
(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.panel_section=b(function(e,l,d,k,j){d=d||e.helpers;var h="",c,g,f="function",i=this.escapeExpression;h+='<div class="toolSectionTitle" id="title_';g=d.id;if(g){c=g.call(l,{hash:{}})}else{c=l.id;c=typeof c===f?c():c}h+=i(c)+'">\n <a href="javascript:void(0)"><span>';g=d.name;if(g){c=g.call(l,{hash:{}})}else{c=l.name;c=typeof c===f?c():c}h+=i(c)+'</span></a>\n</div>\n<div id="';g=d.id;if(g){c=g.call(l,{hash:{}})}else{c=l.id;c=typeof c===f?c():c}h+=i(c)+'" class="toolSectionBody" style="display: none; ">\n <div class="toolSectionBg"></div>\n<div>';return h})})();
@@ -1 +1 @@
(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.tool_form=b(function(f,p,e,n,m){e=e||f.helpers;var k="",c,r,j,i,q=this,g="function",o=e.helperMissing,h=void 0,l=this.escapeExpression;function d(v,u){var s="",t;s+='\n <div class="form-row">\n <label for="';j=e.name;t=j||v.name;if(typeof t===g){t=t.call(v,{hash:{}})}else{if(t===h){t=o.call(v,"name",{hash:{}})}}s+=l(t)+'">';j=e.label;t=j||v.label;if(typeof t===g){t=t.call(v,{hash:{}})}else{if(t===h){t=o.call(v,"label",{hash:{}})}}s+=l(t)+':</label>\n <div class="form-row-input">\n ';j=e.html;t=j||v.html;if(typeof t===g){t=t.call(v,{hash:{}})}else{if(t===h){t=o.call(v,"html",{hash:{}})}}if(t||t===0){s+=t}s+='\n </div>\n <div class="toolParamHelp" style="clear: both;">\n ';j=e.help;t=j||v.help;if(typeof t===g){t=t.call(v,{hash:{}})}else{if(t===h){t=o.call(v,"help",{hash:{}})}}s+=l(t)+'\n </div>\n <div style="clear: both;"></div>\n </div>\n ';return s}k+='<div class="toolFormTitle">';j=e.name;c=j||p.name;if(typeof c===g){c=c.call(p,{hash:{}})}else{if(c===h){c=o.call(p,"name",{hash:{}})}}k+=l(c)+" (version ";j=e.version;c=j||p.version;if(typeof c===g){c=c.call(p,{hash:{}})}else{if(c===h){c=o.call(p,"version",{hash:{}})}}k+=l(c)+')</div>\n <div class="toolFormBody">\n ';j=e.inputs;c=j||p.inputs;r=e.each;i=q.program(1,d,m);i.hash={};i.fn=i;i.inverse=q.noop;c=r.call(p,c,i);if(c||c===0){k+=c}k+='\n </div>\n <div class="form-row form-actions">\n <input type="submit" class="btn btn-primary" name="runtool_btn" value="Execute">\n</div>\n<div class="toolHelp">\n <div class="toolHelpBody">';j=e.help;c=j||p.help;if(typeof c===g){c=c.call(p,{hash:{}})}else{if(c===h){c=o.call(p,"help",{hash:{}})}}k+=l(c)+"</div>\n</div>";return k})})();
(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.tool_form=b(function(f,m,e,l,k){e=e||f.helpers;var i="",c,h,g="function",j=this.escapeExpression,n=this;function d(s,r){var p="",q,o;p+='\n <div class="form-row">\n <label for="';o=e.name;if(o){q=o.call(s,{hash:{}})}else{q=s.name;q=typeof q===g?q():q}p+=j(q)+'">';o=e.label;if(o){q=o.call(s,{hash:{}})}else{q=s.label;q=typeof q===g?q():q}p+=j(q)+':</label>\n <div class="form-row-input">\n ';o=e.html;if(o){q=o.call(s,{hash:{}})}else{q=s.html;q=typeof q===g?q():q}if(q||q===0){p+=q}p+='\n </div>\n <div class="toolParamHelp" style="clear: both;">\n ';o=e.help;if(o){q=o.call(s,{hash:{}})}else{q=s.help;q=typeof q===g?q():q}p+=j(q)+'\n </div>\n <div style="clear: both;"></div>\n </div>\n ';return p}i+='<div class="toolFormTitle">';h=e.name;if(h){c=h.call(m,{hash:{}})}else{c=m.name;c=typeof c===g?c():c}i+=j(c)+" (version ";h=e.version;if(h){c=h.call(m,{hash:{}})}else{c=m.version;c=typeof c===g?c():c}i+=j(c)+')</div>\n <div class="toolFormBody">\n ';c=m.inputs;c=e.each.call(m,c,{hash:{},inverse:n.noop,fn:n.program(1,d,k)});if(c||c===0){i+=c}i+='\n </div>\n <div class="form-row form-actions">\n <input type="submit" class="btn btn-primary" name="runtool_btn" value="Execute">\n</div>\n<div class="toolHelp">\n <div class="toolHelpBody">';h=e.help;if(h){c=h.call(m,{hash:{}})}else{c=m.help;c=typeof c===g?c():c}i+=j(c)+"</div>\n</div>";return i})})();
@@ -1 +1 @@
(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.tool_link=b(function(e,n,d,l,k){d=d||e.helpers;var i="",c,h,o=this,f="function",m=d.helperMissing,g=void 0,j=this.escapeExpression;i+='<a class="';h=d.id;c=h||n.id;if(typeof c===f){c=c.call(n,{hash:{}})}else{if(c===g){c=m.call(n,"id",{hash:{}})}}i+=j(c)+' tool-link" href="';h=d.link;c=h||n.link;if(typeof c===f){c=c.call(n,{hash:{}})}else{if(c===g){c=m.call(n,"link",{hash:{}})}}i+=j(c)+'" target="';h=d.target;c=h||n.target;if(typeof c===f){c=c.call(n,{hash:{}})}else{if(c===g){c=m.call(n,"target",{hash:{}})}}i+=j(c)+'" minsizehint="';h=d.min_width;c=h||n.min_width;if(typeof c===f){c=c.call(n,{hash:{}})}else{if(c===g){c=m.call(n,"min_width",{hash:{}})}}i+=j(c)+'">';h=d.name;c=h||n.name;if(typeof c===f){c=c.call(n,{hash:{}})}else{if(c===g){c=m.call(n,"name",{hash:{}})}}i+=j(c)+"</a> ";h=d.description;c=h||n.description;if(typeof c===f){c=c.call(n,{hash:{}})}else{if(c===g){c=m.call(n,"description",{hash:{}})}}i+=j(c);return i})})();
(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.tool_link=b(function(e,l,d,k,j){d=d||e.helpers;var h="",c,g,f="function",i=this.escapeExpression;h+='<a class="';g=d.id;if(g){c=g.call(l,{hash:{}})}else{c=l.id;c=typeof c===f?c():c}h+=i(c)+' tool-link" href="';g=d.link;if(g){c=g.call(l,{hash:{}})}else{c=l.link;c=typeof c===f?c():c}h+=i(c)+'" target="';g=d.target;if(g){c=g.call(l,{hash:{}})}else{c=l.target;c=typeof c===f?c():c}h+=i(c)+'" minsizehint="';g=d.min_width;if(g){c=g.call(l,{hash:{}})}else{c=l.min_width;c=typeof c===f?c():c}h+=i(c)+'">';g=d.name;if(g){c=g.call(l,{hash:{}})}else{c=l.name;c=typeof c===f?c():c}h+=i(c)+"</a> ";g=d.description;if(g){c=g.call(l,{hash:{}})}else{c=l.description;c=typeof c===f?c():c}h+=i(c);return h})})();
@@ -1 +1 @@
(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.tool_search=b(function(e,n,d,l,k){d=d||e.helpers;var i="",c,h,o=this,f="function",m=d.helperMissing,g=void 0,j=this.escapeExpression;i+='<input type="text" name="query" value="search tools" id="tool-search-query" autocomplete="off" class="search-query parent-width" />\n<img src="';h=d.spinner_url;c=h||n.spinner_url;if(typeof c===f){c=c.call(n,{hash:{}})}else{if(c===g){c=m.call(n,"spinner_url",{hash:{}})}}i+=j(c)+'" id="search-spinner" class="search-spinner"/>\n';return i})})();
(function(){var b=Handlebars.template,a=Handlebars.templates=Handlebars.templates||{};a.tool_search=b(function(e,l,d,k,j){d=d||e.helpers;var h="",c,g,f="function",i=this.escapeExpression;h+='<input type="text" name="query" value="';g=d.search_hint_string;if(g){c=g.call(l,{hash:{}})}else{c=l.search_hint_string;c=typeof c===f?c():c}h+=i(c)+'" id="tool-search-query" autocomplete="off" class="search-query parent-width" />\n<a id="search-clear-btn" class="icon-button cross-circle tooltip" title="clear search (esc)"> </a>\n<img src="';g=d.spinner_url;if(g){c=g.call(l,{hash:{}})}else{c=l.spinner_url;c=typeof c===f?c():c}h+=i(c)+'" id="search-spinner" class="search-spinner"/>';return h})})();
File diff suppressed because one or more lines are too long
+12 -97
View File
@@ -4433,7 +4433,7 @@ var FeatureTrack = function(view, container, obj_dict) {
// initialization code.
//
var track = this;
this.display_modes = ["Auto", "Histogram", "Dense", "Squish", "Pack"];
this.display_modes = ["Auto", "Coverage", "Dense", "Squish", "Pack"];
//
// Initialization.
@@ -4516,8 +4516,8 @@ extend(FeatureTrack.prototype, Drawable.prototype, TiledTrack.prototype, {
var track = this,
i;
// If mode is Histogram and tiles do not share max, redraw tiles as necessary using new max.
if (track.mode === "Histogram") {
// If mode is Coverage and tiles do not share max, redraw tiles as necessary using new max.
if (track.mode === "Coverage") {
// Get global max.
var global_max = -1;
for (i = 0; i < tiles.length; i++) {
@@ -4534,7 +4534,7 @@ extend(FeatureTrack.prototype, Drawable.prototype, TiledTrack.prototype, {
track.draw_helper(true, width, tile.index, tile.resolution, tile.html_elt.parent(), w_scale, { more_tile_data: { max: global_max } } );
}
}
}
}
//
// Update filter attributes, UI.
@@ -4649,86 +4649,6 @@ extend(FeatureTrack.prototype, Drawable.prototype, TiledTrack.prototype, {
return slotter.slot_features( features );
},
/**
* Given feature data, returns summary tree data. Feature data must be sorted by start
* position. Return value is a dict with keys 'data', 'delta' (bin size) and 'max.' Data
* is a two-item list; first item is bin start, second is bin's count.
*/
get_summary_tree_data: function(data, low, high, num_bins) {
if (num_bins > high - low) {
num_bins = high - low;
}
var bin_size = Math.floor((high - low)/num_bins),
bins = [],
max_count = 0;
/*
// For debugging:
for (var i = 0; i < data.length; i++)
console.log("\t", data[i][1], data[i][2], data[i][3]);
*/
//
// Loop through bins, counting data for each interval.
//
var data_index_start = 0,
data_index = 0,
data_interval,
bin_index = 0,
bin_interval = [],
cur_bin;
// Set bin interval.
var set_bin_interval = function(interval, low, bin_index, bin_size) {
interval[0] = low + bin_index * bin_size;
interval[1] = low + (bin_index + 1) * bin_size;
};
// Loop through bins, data to compute bin counts. Only compute bin counts as long
// as there is data.
while (bin_index < num_bins && data_index_start !== data.length) {
// Find next bin that has data.
var bin_has_data = false;
for (; bin_index < num_bins && !bin_has_data; bin_index++) {
set_bin_interval(bin_interval, low, bin_index, bin_size);
// Loop through data and break if data found that goes in bin.
for (data_index = data_index_start; data_index < data.length; data_index++) {
data_interval = data[data_index].slice(1, 3);
if (is_overlap(data_interval, bin_interval)) {
bin_has_data = true;
break;
}
}
// Break from bin loop if this bin has data.
if (bin_has_data) {
break;
}
}
// Set start index to current data, which is the first to overlap with this bin
// and perhaps with later bins.
data_start_index = data_index;
// Count intervals that overlap with bin.
bins[bins.length] = cur_bin = [bin_interval[0], 0];
for (; data_index < data.length; data_index++) {
data_interval = data[data_index].slice(1, 3);
if (is_overlap(data_interval, bin_interval)) {
cur_bin[1]++;
}
else { break; }
}
// Update max count.
if (cur_bin[1] > max_count) {
max_count = cur_bin[1];
}
// Go to next bin.
bin_index++;
}
return {max: max_count, delta: bin_size, data: bins};
},
/**
* Returns appropriate display mode based on data.
*/
@@ -4766,8 +4686,7 @@ extend(FeatureTrack.prototype, Drawable.prototype, TiledTrack.prototype, {
* number of pixels required.
*/
get_canvas_height: function(result, mode, w_scale, canvas_width) {
if (mode === "summary_tree" || mode === "Histogram") {
// Extra padding at top of summary tree so label does not overlap data.
if (mode === "summary_tree" || mode === "Coverage") {
return this.summary_draw_height;
}
else {
@@ -4796,16 +4715,8 @@ extend(FeatureTrack.prototype, Drawable.prototype, TiledTrack.prototype, {
tile_high = region.get('end'),
left_offset = this.left_offset;
// Drawing the summary tree (feature coverage histogram)
if (mode === "summary_tree" || mode === "Histogram") {
// Get summary tree data if necessary and set max if there is one.
if (result.dataset_type !== "summary_tree") {
var st_data = this.get_summary_tree_data(result.data, tile_low, tile_high, 200);
if (result.max) {
st_data.max = result.max;
}
result = st_data;
}
// Drawing the summary tree.
if (mode === "summary_tree" || mode === "Coverage") {
// Paint summary tree into canvas
var painter = new painters.SummaryTreePainter(result, tile_low, tile_high, this.prefs);
painter.draw(ctx, canvas.width, canvas.height, w_scale);
@@ -4872,7 +4783,11 @@ extend(FeatureTrack.prototype, Drawable.prototype, TiledTrack.prototype, {
if (mode === "Auto") {
return true;
}
// All other modes--Histogram, Dense, Squish, Pack--require data + details.
// Histogram mode requires summary_tree data.
else if (mode === "Coverage") {
return data.dataset_type === "summary_tree";
}
// All other modes--Dense, Squish, Pack--require data + details.
else if (data.extra_info === "no_detail" || data.dataset_type === "summary_tree") {
return false;
}
+1 -1
View File
@@ -27,7 +27,7 @@
</%def>
<%def name="javascripts()">
${parent.javascripts()}
${h.js("jquery.autocomplete", "autocomplete_tagging" )}
${h.js("libs/jquery/jquery.autocomplete", "galaxy.autocom_tagging" )}
</%def>
##
## Override methods from base.mako and base_panels.mako
@@ -27,7 +27,7 @@
</%def>
<%def name="javascripts()">
${parent.javascripts()}
${h.js("jquery.autocomplete", "autocomplete_tagging" )}
${h.js("libs/jquery/jquery.autocomplete", "galaxy.autocom_tagging" )}
</%def>
##
## Override methods from base.mako and base_panels.mako
+1 -1
View File
@@ -27,7 +27,7 @@
</%def>
<%def name="javascripts()">
${parent.javascripts()}
${h.js("jquery.autocomplete", "autocomplete_tagging" )}
${h.js("libs/jquery/jquery.autocomplete", "galaxy.autocom_tagging" )}
</%def>
##
## Override methods from base.mako and base_panels.mako
@@ -8,7 +8,7 @@
${common_javascripts()}
</%def>
${h.js( "ui.core", "jquery.cookie", "jquery.dynatree" )}
${h.js( "libs/jquery/jquery.ui.core", "libs/jquery/jquery.cookie", "libs/jquery/jquery.dynatree" )}
${h.css( "dynatree_skin/ui.dynatree" )}
<script type="text/javascript">
@@ -9,7 +9,7 @@
<%def name="javascripts()">
${parent.javascripts()}
${h.js( "ui.core", "jquery.dynatree" )}
${h.js( "libs/jquery/jquery.ui.core", "libs/jquery/jquery.dynatree" )}
${browse_files(repository.name, repository.repo_files_directory(trans.app))}
</%def>
@@ -9,7 +9,7 @@
<%def name="javascripts()">
${parent.javascripts()}
${h.js( "ui.core", "jquery.dynatree" )}
${h.js( "libs/jquery/jquery.ui.core", "libs/jquery/jquery.dynatree" )}
${browse_files(tool_dependency.name, tool_dependency.installation_directory( trans.app ))}
</%def>
+2 -2
View File
@@ -24,9 +24,9 @@
## Default javascripts
<%def name="javascripts()">
## <!--[if lt IE 7]>
## <script type='text/javascript' src="/static/scripts/IE7.js"> </script>
## <script type='text/javascript' src="/static/scripts/libs/IE/IE7.js"> </script>
## <![endif]-->
${h.js( "jquery", "bootstrap", "galaxy.base", "libs/underscore", "libs/backbone", "libs/backbone-relational", "libs/handlebars.runtime", "mvc/ui" )}
${h.js( "libs/jquery/jquery", "libs/bootstrap", "galaxy.base", "libs/underscore", "libs/backbone/backbone", "libs/backbone/backbone-relational", "libs/handlebars.runtime", "mvc/ui" )}
<script type="text/javascript">
// Set up needed paths.
var galaxy_paths = new GalaxyPaths({
+3 -3
View File
@@ -46,9 +46,9 @@
## Default javascripts
<%def name="javascripts()">
<!--[if lt IE 7]>
${h.js( 'IE7', 'ie7-recalc' )}
${h.js( 'libs/IE/IE7', 'libs/IE/ie7-recalc' )}
<![endif]-->
${h.js( 'jquery', 'bootstrap', 'libs/underscore', 'libs/backbone', 'libs/backbone-relational', 'libs/handlebars.runtime', 'mvc/ui' )}
${h.js( 'libs/jquery/jquery', 'libs/bootstrap', 'libs/underscore', 'libs/backbone/backbone', 'libs/backbone/backbone-relational', 'libs/handlebars.runtime', 'mvc/ui' )}
<script type="text/javascript">
// Set up needed paths.
var galaxy_paths = new GalaxyPaths({
@@ -73,7 +73,7 @@
<%def name="late_javascripts()">
## Scripts can be loaded later since they progressively add features to
## the panels, but do not change layout
${h.js( 'jquery.event.drag', 'jquery.event.hover', 'jquery.form', 'jquery.rating', 'galaxy.base', 'galaxy.panels' )}
${h.js( 'libs/jquery/jquery.event.drag', 'libs/jquery/jquery.event.hover', 'libs/jquery/jquery.form', 'libs/jquery/jquery.rating', 'galaxy.base', 'galaxy.panels' )}
<script type="text/javascript">
ensure_dd_helper();
+1 -1
View File
@@ -4,7 +4,7 @@
<%def name="javascripts()">
${parent.javascripts()}
${h.js( "jquery", "galaxy.base" )}
${h.js( "libs/jquery/jquery", "galaxy.base" )}
<script type="text/javascript">
$(function() {
+1 -1
View File
@@ -11,7 +11,7 @@
<%def name="javascripts()">
${parent.javascripts()}
${message_ns.javascripts()}
${h.js( "galaxy.base", "jquery.autocomplete", "autocomplete_tagging" )}
${h.js( "galaxy.base", "libs/jquery/jquery.autocomplete", "galaxy.autocom_tagging" )}
</%def>
<%def name="datatype( dataset, datatypes )">
+3 -3
View File
@@ -32,9 +32,9 @@
<%def name="javascripts()">
${parent.javascripts()}
${h.js( "jquery", "bootstrap", "galaxy.base", "json2", "jstorage", "jquery.autocomplete", "jquery.rating",
"autocomplete_tagging", "viz/trackster", "viz/trackster_ui", "jquery.event.drag", "jquery.mousewheel",
"jquery.autocomplete", "jquery.ui.sortable.slider", "farbtastic", "mvc/data", "viz/visualization" )}
${h.js( "libs/jquery/jquery", "libs/bootstrap", "galaxy.base", "libs/json2", "libs/jquery/jstorage", "libs/jquery/jquery.autocomplete", "libs/jquery/jquery.rating",
"galaxy.autocom_tagging", "viz/trackster", "viz/trackster_ui", "libs/jquery/jquery.event.drag", "libs/jquery/jquery.mousewheel",
"libs/jquery/jquery.autocomplete", "libs/jquery/jquery.ui.sortable.slider", "libs/farbtastic", "mvc/data", "viz/visualization" )}
<script type="text/javascript">
+1 -1
View File
@@ -26,7 +26,7 @@
<%def name="javascripts()">
${parent.javascripts()}
${h.js("jquery.autocomplete")}
${h.js("libs/jquery/jquery.autocomplete")}
<script type="text/javascript">
$(function(){
$("input:text:first").focus();
+1 -1
View File
@@ -52,7 +52,7 @@
</%def>
<%def name="grid_javascripts()">
${h.js("jquery.autocomplete", "autocomplete_tagging", "jquery.rating" )}
${h.js("libs/jquery/jquery.autocomplete", "galaxy.autocom_tagging", "libs/jquery/jquery.rating" )}
<script type="text/javascript">
// This is necessary so that, when nested arrays are used in ajax/post/get methods, square brackets ('[]') are
// not appended to the identifier of a nested array.

Some files were not shown because too many files have changed in this diff Show More