galaxy-commits
Threads by month
- ----- 2025 -----
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- 15302 discussions

galaxy-dist commit 5401c7d2e13b: Bug fix for verifying a tool suite uploaded to the tool shed.
by commits-noreply@bitbucket.org 30 Jul '10
by commits-noreply@bitbucket.org 30 Jul '10
30 Jul '10
# HG changeset patch -- Bitbucket.org
# Project galaxy-dist
# URL http://bitbucket.org/galaxy/galaxy-dist/overview
# User Greg Von Kuster <greg(a)bx.psu.edu>
# Date 1280263037 14400
# Node ID 5401c7d2e13bbd214e1a424e71c4fbcbac7cf919
# Parent eacdaf59c8dea773a8525966a8c6b65753ab777c
Bug fix for verifying a tool suite uploaded to the tool shed.
--- a/lib/galaxy/webapps/community/datatypes/__init__.py
+++ b/lib/galaxy/webapps/community/datatypes/__init__.py
@@ -148,7 +148,7 @@ class ToolSuite( Tool ):
tar = tarfile.open( f.name )
except tarfile.ReadError:
raise DatatypeVerificationError( 'The archive is not a readable tar file.' )
- suite_config = filter( lambda x: x.lower() == 'suite_config.xml', tar.getnames() )
+ suite_config = filter( lambda x: x.lower().find( 'suite_config.xml' ) >=0, tar.getnames() )
if not suite_config:
raise DatatypeVerificationError( 'The archive does not contain the required suite_config.xml config file. If you are uploading a single tool archive, set the upload type to "Tool".' )
suite_config = suite_config[ 0 ]
1
0

galaxy-dist commit f94f1f2fa4be: Fixes for generating viewports.
by commits-noreply@bitbucket.org 23 Jul '10
by commits-noreply@bitbucket.org 23 Jul '10
23 Jul '10
# HG changeset patch -- Bitbucket.org
# Project galaxy-dist
# URL http://bitbucket.org/galaxy/galaxy-dist/overview
# User Dan Blankenberg <dan(a)bx.psu.edu>
# Date 1279901436 14400
# Node ID f94f1f2fa4be20f8f90ffa9482a754f69256f449
# Parent cecc290755014c02aa21906d433a3d39f2d657d5
Fixes for generating viewports.
Now, a maximum of 1MB is read from a line to determine the viewport; if a line greater than 10MB is encountered, then no viewport will be generated.
Additional fixes for certain cases when viewport was not determined properly for for WIG tracks and GFF.
--- a/lib/galaxy/datatypes/interval.py
+++ b/lib/galaxy/datatypes/interval.py
@@ -38,6 +38,10 @@ for key, value in alias_spec.items():
for elem in value:
alias_helper[elem] = key
+#Constants for configuring viewport generation
+VIEWPORT_READLINE_BUFFER_SIZE = 1048576 #1MB
+VIEWPORT_MAX_READS_PER_LINE = 10 # If a line is greater than VIEWPORT_MAX_READS_PER_LINE * VIEWPORT_READLINE_BUFFER_SIZE bytes in size, then we will not generate a viewport for that dataset
+
class Interval( Tabular ):
"""Tab delimited data containing interval information"""
file_ext = "interval"
@@ -146,33 +150,55 @@ class Interval( Tabular ):
and dataset.metadata.endCol
except:
return False
- def get_estimated_display_viewport( self, dataset ):
+ def get_estimated_display_viewport( self, dataset, chrom_col = None, start_col = None, end_col = None ):
"""Return a chrom, start, stop tuple for viewing a file."""
+ viewport_feature_count = 100 # viewport should check at least 100 features; excludes comment lines
+ max_line_count = max( viewport_feature_count, 500 ) # maximum number of lines to check; includes comment lines
if self.displayable( dataset ):
try:
- c, s, e = dataset.metadata.chromCol, dataset.metadata.startCol, dataset.metadata.endCol
- c, s, e = int(c)-1, int(s)-1, int(e)-1
- try:
- skipme = int(dataset.metadata.comment_lines)
- except:
- skipme = 0
- peek = []
- for idx, line in enumerate(file(dataset.file_name)):
- if line[0] != '#':
- peek.append( line.rstrip( '\n\r' ).split() )
- if idx > 100 and idx > skipme: # viewport should have at least 100 features
- break
- chr, start, stop = peek[skipme][c], int( peek[skipme][s] ), int( peek[skipme][e] )
- for p in peek[(skipme+1):]:
- if p[0] == chr:
- start = min( start, int( p[s] ) )
- stop = max( stop, int( p[e] ) )
- except Exception, exc:
- log.exception( str(exc) )
- return ( None, None, None )
- return (chr, str( start ), str( stop ))
- else:
- return ( None, None, None )
+ chrom = None
+ start = sys.maxint
+ end = 0
+ if chrom_col is None:
+ chrom_col = int( dataset.metadata.chromCol ) - 1
+ if start_col is None:
+ start_col = int( dataset.metadata.startCol ) - 1
+ if end_col is None:
+ end_col = int( dataset.metadata.endCol ) - 1
+ max_col = max( chrom_col, start_col, end_col )
+ fh = open( dataset.file_name )
+ while True:
+ line = fh.readline( VIEWPORT_READLINE_BUFFER_SIZE )
+ if not line: break #EOF
+ if not line.startswith( '#' ):
+ try:
+ fields = line.rstrip().split( '\t' )
+ if len( fields ) > max_col:
+ if chrom is None or chrom == fields[ chrom_col ]:
+ start = min( start, int( fields[ start_col ] ) )
+ end = max( end, int( fields[ end_col ] ) )
+ chrom = fields[ chrom_col ] #set chrom last, in case start and end are not integers
+ viewport_feature_count -= 1
+ except Exception:
+ #most likely a non-integer field has been encountered for start / stop
+ continue
+ #make sure we are at the next new line
+ readline_count = VIEWPORT_MAX_READS_PER_LINE
+ while line.rstrip( '\n\r' ) == line:
+ assert readline_count > 0, Exception( 'Viewport readline count exceeded for dataset %s.' % dataset.id )
+ line = fh.readline( VIEWPORT_READLINE_BUFFER_SIZE )
+ if not line: break #EOF
+ readline_count -= 1
+ max_line_count -= 1
+ if not viewport_feature_count or not max_line_count:
+ #exceeded viewport or total line count to check
+ break
+ if chrom is not None:
+ return ( chrom, str( start ), str( end ) ) #Necessary to return strings?
+ except Exception, e:
+ #unexpected error, possibly missing metadata
+ log.exception( str( e ) )
+ return ( None, None, None ) #could not determine viewport
def as_ucsc_display_file( self, dataset, **kwd ):
"""Returns file contents with only the bed data"""
fd, temp_name = tempfile.mkstemp()
@@ -336,49 +362,11 @@ class BedGraph( Interval ):
"""
return open( dataset.file_name )
- def get_estimated_display_viewport( self, dataset ):
+ def get_estimated_display_viewport( self, dataset, chrom_col = 0, start_col = 1, end_col = 2 ):
"""
Set viewport based on dataset's first 100 lines.
"""
- if self.displayable( dataset ):
- try:
- # Set seqid, start, stop.
- seqid = None
- start = 2147483647 # Maximum value of a signed 32 bit integer ( 2**31 - 1 )
- stop = 0
- for i, line in enumerate( file( dataset.file_name ) ):
- line = line.rstrip( '\r\n' )
- if not line:
- continue
- elems = line.split('\t')
- if len( elems ) == 4:
- # Update seq id, start, end.
- if not seqid:
- # We can only set the viewport for a single chromosome
- seqid = elems[0]
- if seqid == elems[0]:
- # Make sure we have not spanned chromosomes
- start = min( start, int( elems[1] ) )
- stop = max( stop, int( elems[2] ) )
- else:
- # We've spanned a chromosome
- break
- else:
- continue
- # Only look through 100 lines.
- if i > 100:
- break
-
- # Set valid values for start, stop if necessary.
- if start == 2147483647:
- start = 0
- if stop == 0:
- stop = 1
- return ( seqid, str( start ), str( stop ) )
- except Exception, exc:
- log.exception( str( exc ) )
- return ( None, None, None )
- return ( None, None, None )
+ return Interval.get_estimated_display_viewport( self, dataset, chrom_col = chrom_col, start_col = start_col, end_col = end_col )
class Bed( Interval ):
"""Tab delimited data in BED format"""
@@ -644,61 +632,75 @@ class Gff( Tabular, _RemoteCallMixin ):
Return a chrom, start, stop tuple for viewing a file. There are slight differences between gff 2 and gff 3
formats. This function should correctly handle both...
"""
+ viewport_feature_count = 100 # viewport should check at least 100 features; excludes comment lines
+ max_line_count = max( viewport_feature_count, 500 ) # maximum number of lines to check; includes comment lines
if self.displayable( dataset ):
try:
- seqid = ''
- start = 2147483647 # Maximum value of a signed 32 bit integer ( 2**31 - 1 )
+ seqid = None
+ start = sys.maxint
stop = 0
- for i, line in enumerate( file( dataset.file_name ) ):
- line = line.rstrip( '\r\n' )
- if not line:
- continue
- if line.startswith( '##sequence-region' ): # ##sequence-region IV 6000000 6030000
- elems = line.split()
- if len( elems ) > 3:
- # line looks like:
- # ##sequence-region ctg123 1 1497228
- seqid = elems[1] # IV
- start = elems[2] # 6000000
- stop = elems[3] # 6030000
- break
- elif len( elems ) == 2 and elems[1].find( '..' ) > 0:
- # line looks like this:
- # ##sequence-region X:120000..140000
- elems = elems[1].split( ':' )
- seqid = elems[0]
- start = elems[1].split( '..' )[0]
- stop = elems[1].split( '..' )[1]
- break
- else:
- log.exception( "line (%s) uses an unsupported ##sequence-region definition." % str( line ) )
- break
- # Allow UCSC style browser and track info in the GFF file
- if line.startswith("browser position"):
- pos_info = line.split()[-1]
- seqid, startend = pos_info.split(":")
- start, end = startend.split("-")
+ fh = open( dataset.file_name )
+ while True:
+ line = fh.readline( VIEWPORT_READLINE_BUFFER_SIZE )
+ if not line: break #EOF
+ try:
+ if line.startswith( '##sequence-region' ): # ##sequence-region IV 6000000 6030000
+ elems = line.rstrip( '\n\r' ).split()
+ if len( elems ) > 3:
+ # line looks like:
+ # ##sequence-region ctg123 1 1497228
+ seqid = elems[1] # IV
+ start = int( elems[2] )# 6000000
+ stop = int( elems[3] ) # 6030000
+ break #use location declared in file
+ elif len( elems ) == 2 and elems[1].find( '..' ) > 0:
+ # line looks like this:
+ # ##sequence-region X:120000..140000
+ elems = elems[1].split( ':' )
+ seqid = elems[0]
+ start = int( elems[1].split( '..' )[0] )
+ stop = int( elems[1].split( '..' )[1] )
+ break #use location declared in file
+ else:
+ log.exception( "line (%s) uses an unsupported ##sequence-region definition." % str( line ) )
+ #break #no break, if bad definition, we try another method
+ elif line.startswith("browser position"):
+ # Allow UCSC style browser and track info in the GFF file
+ pos_info = line.split()[-1]
+ seqid, startend = pos_info.split(":")
+ start, stop = map( int, startend.split("-") )
+ break #use location declared in file
+ elif True not in map( line.startswith, ( '#', 'track', 'browser' ) ):# line.startswith() does not accept iterator in python2.4
+ viewport_feature_count -= 1
+ elems = line.rstrip( '\n\r' ).split( '\t' )
+ if len( elems ) > 3:
+ if not seqid:
+ # We can only set the viewport for a single chromosome
+ seqid = elems[0]
+ if seqid == elems[0]:
+ # Make sure we have not spanned chromosomes
+ start = min( start, int( elems[3] ) )
+ stop = max( stop, int( elems[4] ) )
+ except:
+ #most likely start/stop is not an int or not enough fields
+ pass
+ #make sure we are at the next new line
+ readline_count = VIEWPORT_MAX_READS_PER_LINE
+ while line.rstrip( '\n\r' ) == line:
+ assert readline_count > 0, Exception( 'Viewport readline count exceeded for dataset %s.' % dataset.id )
+ line = fh.readline( VIEWPORT_READLINE_BUFFER_SIZE )
+ if not line: break #EOF
+ readline_count -= 1
+ max_line_count -= 1
+ if not viewport_feature_count or not max_line_count:
+ #exceeded viewport or total line count to check
break
- if not line.startswith(('#', 'track', 'browser')) :
- elems = line.split( '\t' )
- if not seqid:
- # We can only set the viewport for a single chromosome
- seqid = elems[0]
- if seqid == elems[0]:
- # Make sure we have not spanned chromosomes
- start = min( start, int( elems[3] ) )
- stop = max( stop, int( elems[4] ) )
- else:
- # We've spanned a chromosome
- break
- if i > 10:
- break
+ if seqid is not None:
+ return ( seqid, str( start ), str( stop ) ) #Necessary to return strings?
except Exception, e:
+ #unexpected error
log.exception( str( e ) )
- return ( None, None, None )
- return ( seqid, str( start ), str( stop ) )
- else:
- return ( None, None, None )
+ return ( None, None, None ) #could not determine viewport
def ucsc_links( self, dataset, type, app, base_url ):
ret_val = []
seqid, start, stop = self.get_estimated_display_viewport( dataset )
@@ -963,44 +965,67 @@ class Wiggle( Tabular, _RemoteCallMixin
Tabular.__init__( self, **kwd )
self.add_display_app( 'ucsc', 'display at UCSC', 'as_ucsc_display_file', 'ucsc_links' )
self.add_display_app( 'gbrowse', 'display in Gbrowse', 'as_gbrowse_display_file', 'gbrowse_links' )
-
def get_estimated_display_viewport( self, dataset ):
+ """Return a chrom, start, stop tuple for viewing a file."""
+ viewport_feature_count = 100 # viewport should check at least 100 features; excludes comment lines
+ max_line_count = max( viewport_feature_count, 500 ) # maximum number of lines to check; includes comment lines
if self.displayable( dataset ):
- num_check_lines = 100 # only check up to this many non empty lines
- vstart = None
- vend = 0
- vwig_chr = '?'
- value = None
- for i, line in enumerate( file( dataset.file_name ) ):
- line = line.rstrip( '\r\n' )
- if line:
- if line.startswith( "browser" ):
- chr_info = line.split()[-1]
- wig_chr, coords = chr_info.split( ":" )
- start, end = coords.split( "-" )
- value = ( wig_chr, start, end )
+ try:
+ chrom = None
+ start = sys.maxint
+ end = 0
+ span = 1
+ step = None
+ fh = open( dataset.file_name )
+ while True:
+ line = fh.readline( VIEWPORT_READLINE_BUFFER_SIZE )
+ if not line: break #EOF
+ try:
+ if line.startswith( "browser" ):
+ chr_info = line.rstrip( '\n\r' ).split()[-1]
+ chrom, coords = chr_info.split( ":" )
+ start, end = map( int, coords.split( "-" ) )
+ break # use the browser line
+ # variableStep chrom=chr20
+ if line and ( line.lower().startswith( "variablestep" ) or line.lower().startswith( "fixedstep" ) ):
+ if chrom is not None: break #different chrom or different section of the chrom
+ chrom = line.rstrip( '\n\r' ).split("chrom=")[1].split()[0]
+ if 'span=' in line:
+ span = int( line.rstrip( '\n\r' ).split("span=")[1].split()[0] )
+ if 'step=' in line:
+ step = int( line.rstrip( '\n\r' ).split("step=")[1].split()[0] )
+ start = int( line.rstrip( '\n\r' ).split("start=")[1].split()[0] )
+ else:
+ fields = line.rstrip( '\n\r' ).split()
+ if fields:
+ if step is not None:
+ if not end:
+ end = start + span
+ else:
+ end += step
+ else:
+ start = min( int( fields[0] ), start )
+ end = max( end, int( fields[0] ) + span )
+ viewport_feature_count -= 1
+ except:
+ pass
+ #make sure we are at the next new line
+ readline_count = VIEWPORT_MAX_READS_PER_LINE
+ while line.rstrip( '\n\r' ) == line:
+ assert readline_count > 0, Exception( 'Viewport readline count exceeded for dataset %s.' % dataset.id )
+ line = fh.readline( VIEWPORT_READLINE_BUFFER_SIZE )
+ if not line: break #EOF
+ readline_count -= 1
+ max_line_count -= 1
+ if not viewport_feature_count or not max_line_count:
+ #exceeded viewport or total line count to check
break
- # variableStep chrom=chr20
- if line and (line.lower().startswith( "variablestep" ) or line.lower().startswith( "fixedstep" )):
- c = line.split("chr")[-1]
- c = c.split()[0]
- vwig_chr = 'chr%s' % c
- else:
- try:
- offset = line.split()[0]
- offset = int(offset)
- vend = max(vend,offset)
- if not vstart:
- vstart = offset # first
- except:
- pass
- if i > num_check_lines:
- break
- if value == None:
- value = (vwig_chr, vstart, vend)
- return value
- else:
- return ( None, None, None )
+ if chrom is not None:
+ return ( chrom, str( start ), str( end ) ) #Necessary to return strings?
+ except Exception, e:
+ #unexpected error
+ log.exception( str( e ) )
+ return ( None, None, None ) #could not determine viewport
def gbrowse_links( self, dataset, type, app, base_url ):
ret_val = []
chrom, start, stop = self.get_estimated_display_viewport( dataset )
@@ -1119,44 +1144,61 @@ class CustomTrack ( Tabular ):
def display_peek( self, dataset ):
"""Returns formated html of peek"""
return Tabular.make_html_table( self, dataset, skipchars=['track', '#'] )
- def get_estimated_display_viewport( self, dataset ):
+ def get_estimated_display_viewport( self, dataset, chrom_col = None, start_col = None, end_col = None ):
+ """Return a chrom, start, stop tuple for viewing a file."""
+ #FIXME: only BED and WIG custom tracks are currently supported
+ #As per previously existing behavior, viewport will only be over the first intervals
+ max_line_count = 100 # maximum number of lines to check; includes comment lines
+ variable_step_wig = False
+ chrom = None
+ span = 1
if self.displayable( dataset ):
try:
- wiggle_format = False
- for line in open(dataset.file_name):
- if (line.startswith("chr") or line.startswith("scaffold")):
- line = line.rstrip( '\n\r' )
- start = line.split("\t")[1].replace(",","")
- end = line.split("\t")[2].replace(",","")
-
- if int(start) < int(end):
- value = ( line.split("\t")[0], start, end )
- else:
- value = ( line.split("\t")[0], end, start )
-
+ fh = open( dataset.file_name )
+ while True:
+ line = fh.readline( VIEWPORT_READLINE_BUFFER_SIZE )
+ if not line: break #EOF
+ if not line.startswith( '#' ):
+ try:
+ if variable_step_wig:
+ fields = line.rstrip().split()
+ if len( fields ) == 2:
+ start = int( fields[ 0 ] )
+ return ( chrom, str( start ), str( start + span ) )
+ elif line and ( line.lower().startswith( "variablestep" ) or line.lower().startswith( "fixedstep" ) ):
+ chrom = line.rstrip( '\n\r' ).split("chrom=")[1].split()[0]
+ if 'span=' in line:
+ span = int( line.rstrip( '\n\r' ).split("span=")[1].split()[0] )
+ if 'start=' in line:
+ start = int( line.rstrip( '\n\r' ).split("start=")[1].split()[0] )
+ return ( chrom, str( start ), str( start + span ) )
+ else:
+ variable_step_wig = True
+ else:
+ fields = line.rstrip().split( '\t' )
+ if len( fields ) >= 3:
+ chrom = fields[ 0 ]
+ start = int( fields[ 1 ] )
+ end = int( fields[ 2 ] )
+ return ( chrom, str( start ), str( end ) )
+ except Exception:
+ #most likely a non-integer field has been encountered for start / stop
+ continue
+ #make sure we are at the next new line
+ readline_count = VIEWPORT_MAX_READS_PER_LINE
+ while line.rstrip( '\n\r' ) == line:
+ assert readline_count > 0, Exception( 'Viewport readline count exceeded for dataset %s.' % dataset.id )
+ line = fh.readline( VIEWPORT_READLINE_BUFFER_SIZE )
+ if not line: break #EOF
+ readline_count -= 1
+ max_line_count -= 1
+ if not max_line_count:
+ #exceeded viewport or total line count to check
break
-
- elif (line.startswith('variableStep')):
- # wiggle format
- wiggle_format = True
- wig_chr = line.split()[1].split('=')[1]
- if not wig_chr.startswith("chr"):
- value = ('', '', '')
- break
- elif wiggle_format:
- # wiggle format
- if line.split("\t")[0].isdigit():
- start = line.split("\t")[0]
- end = str(int(start) + 1)
- value = (wig_chr, start, end)
- else:
- value = (wig_chr, '', '')
- break
- return value #returns the co-ordinates of the 1st track/dataset
- except:
- return ( None, None, None )
- else:
- return ( None, None, None )
+ except Exception, e:
+ #unexpected error
+ log.exception( str( e ) )
+ return ( None, None, None ) #could not determine viewport
def ucsc_links( self, dataset, type, app, base_url ):
ret_val = []
chrom, start, stop = self.get_estimated_display_viewport(dataset)
1
0

galaxy-dist commit cecc29075501: Galaxy Tool Shed enhancements
by commits-noreply@bitbucket.org 23 Jul '10
by commits-noreply@bitbucket.org 23 Jul '10
23 Jul '10
# HG changeset patch -- Bitbucket.org
# Project galaxy-dist
# URL http://bitbucket.org/galaxy/galaxy-dist/overview
# User Greg Von Kuster <greg(a)bx.psu.edu>
# Date 1279831412 14400
# Node ID cecc290755014c02aa21906d433a3d39f2d657d5
# Parent db1ae0bc8995cb30deef73ce9d14ef175c512f90
Galaxy Tool Shed enhancements
1. Rename Galaxy Community Space to Galaxy Tool Shed
2. Add the ability to upload an archive consisting of a suite of tools in addition to a single tool archive.
3. Miscellaneous code cleanup including elimination of all sniffer related code.
--- a/templates/webapps/community/tool/edit_tool.mako
+++ b/templates/webapps/community/tool/edit_tool.mako
@@ -93,7 +93,7 @@
%if can_edit:
<form id="edit_tool" name="edit_tool" action="${h.url_for( controller='common', action='edit_tool' )}" method="post">
- %if tool.is_rejected():
+ %if tool.is_rejected:
<div class="toolForm"><div class="toolFormTitle">Reason for rejection</div><div class="toolFormBody">
@@ -169,7 +169,7 @@
</div></div><p/>
- %if tool.is_new() or tool.is_rejected():
+ %if tool.is_new or tool.is_rejected:
<div class="toolForm"><div class="toolFormTitle">Get approval for publishing</div><div class="toolFormBody">
--- a/lib/galaxy/webapps/community/security/__init__.py
+++ b/lib/galaxy/webapps/community/security/__init__.py
@@ -1,5 +1,5 @@
"""
-Galaxy Community Space Security
+Galaxy Tool Shed Security
"""
import logging, socket, operator
from datetime import datetime, timedelta
@@ -167,14 +167,14 @@ class CommunityRBACAgent( RBACAgent ):
def can_approve_or_reject( self, user, user_is_admin, cntrller, item ):
# The current user can approve or reject the item if the user
# is an admin, and the item's state is WAITING.
- return user and user_is_admin and cntrller=='admin' and item.is_waiting()
+ return user and user_is_admin and cntrller=='admin' and item.is_waiting
def can_delete( self, user, user_is_admin, cntrller, item ):
# The current user can delete the item if they are an admin or if they uploaded the
# item and in either case the item's state is not DELETED.
if user and user_is_admin and cntrller == 'admin':
- can_delete = not item.is_deleted()
+ can_delete = not item.is_deleted
elif cntrller in [ 'tool' ]:
- can_delete = user==item.user and not item.is_deleted()
+ can_delete = user==item.user and not item.is_deleted
else:
can_delete = False
return can_delete
@@ -184,7 +184,7 @@ class CommunityRBACAgent( RBACAgent ):
if user and user_is_admin and cntrller == 'admin':
return True
elif cntrller in [ 'tool' ]:
- can_download = not( item.is_new() or item.is_waiting() )
+ can_download = not( item.is_new or item.is_waiting )
else:
can_download = False
return can_download
@@ -194,7 +194,7 @@ class CommunityRBACAgent( RBACAgent ):
if user and user_is_admin and cntrller == 'admin':
return True
if cntrller in [ 'tool' ]:
- return user and user==item.user and ( item.is_new() or item.is_rejected() )
+ return user and user==item.user and ( item.is_new or item.is_rejected )
return False
def can_purge( self, user, user_is_admin, cntrller ):
# The current user can purge the item if they are an admin.
@@ -206,7 +206,7 @@ class CommunityRBACAgent( RBACAgent ):
versions = get_versions( item )
state_ok = True
for version in versions:
- if version.is_new() or version.is_waiting():
+ if version.is_new or version.is_waiting:
state_ok = False
break
return state_ok
@@ -215,7 +215,7 @@ class CommunityRBACAgent( RBACAgent ):
# or if the item's state is APPROVED.
if user and user_is_admin and cntrller == 'admin':
return True
- if cntrller in [ 'tool' ] and item.is_approved():
+ if cntrller in [ 'tool' ] and item.is_approved:
return True
return user and user==item.user
def get_all_action_permissions( self, user, user_is_admin, cntrller, item ):
@@ -236,7 +236,7 @@ class CommunityRBACAgent( RBACAgent ):
elif cntrller in [ 'tool' ]:
visible_versions = []
for version in get_versions( item ):
- if version.is_approved() or version.is_archived() or version.user == user:
+ if version.is_approved or version.is_archived or version.user == user:
visible_versions.append( version )
else:
visible_versions = []
--- a/templates/webapps/community/tool/view_tool.mako
+++ b/templates/webapps/community/tool/view_tool.mako
@@ -85,7 +85,7 @@
%endif
%if can_view:
- %if tool.is_rejected():
+ %if tool.is_rejected:
<div class="toolForm"><div class="toolFormTitle">Reason for rejection</div><div class="toolFormBody">
@@ -168,7 +168,7 @@
<div class="toolFormBody"><div class="form-row"><ul class="toolFile">
- <li><a href="${h.url_for( controller='tool', action='download_tool', id=trans.app.security.encode_id( tool.id ) )}">${tool.download_file_name}</a></li>
+ <li><a href="${h.url_for( controller='common', action='download_tool', id=trans.app.security.encode_id( tool.id ), cntrller=cntrller )}">${tool.download_file_name}</a></li><ul class="fileBrowser">
%for name in tool_file_contents:
<li><a href="${h.url_for( controller='tool', action='view_tool_file', id=trans.app.security.encode_id( tool.id ), file_name=quote_plus( name ) )}">${name}</a></li>
--- a/lib/galaxy/webapps/community/controllers/common.py
+++ b/lib/galaxy/webapps/community/controllers/common.py
@@ -14,6 +14,11 @@ class ToolListGrid( grids.Grid ):
class NameColumn( grids.TextColumn ):
def get_value( self, trans, grid, tool ):
return tool.name
+ class TypeColumn( grids.GridColumn ):
+ def get_value( self, trans, grid, tool ):
+ if tool.is_suite:
+ return 'Suite'
+ return 'Tool'
class VersionColumn( grids.TextColumn ):
def get_value( self, trans, grid, tool ):
return tool.version
@@ -60,6 +65,10 @@ class ToolListGrid( grids.Grid ):
model_class=model.Tool,
attach_popup=False
),
+ TypeColumn( "Type",
+ key="suite",
+ model_class=model.Tool,
+ attach_popup=False ),
VersionColumn( "Version",
key="version",
model_class=model.Tool,
@@ -229,7 +238,7 @@ class CommonController( BaseController )
in_categories.append( ( category.id, category.name ) )
else:
out_categories.append( ( category.id, category.name ) )
- if tool.is_rejected():
+ if tool.is_rejected:
# Include the comments regarding the reason for rejection
reason_for_rejection = get_most_recent_event( tool ).comment
else:
@@ -283,7 +292,7 @@ class CommonController( BaseController )
visible_versions = trans.app.security_agent.get_visible_versions( trans.user, trans.user_is_admin(), cntrller, tool )
categories = [ tca.category for tca in tool.categories ]
tool_file_contents = tarfile.open( tool.file_name, 'r' ).getnames()
- if tool.is_rejected():
+ if tool.is_rejected:
# Include the comments regarding the reason for rejection
reason_for_rejection = get_most_recent_event( tool ).comment
else:
--- /dev/null
+++ b/lib/galaxy/webapps/community/model/migrate/versions/0002_add_tool_suite_column.py
@@ -0,0 +1,48 @@
+"""
+Migration script to add the suite column to the tool table.
+"""
+
+from sqlalchemy import *
+from sqlalchemy.orm import *
+from migrate import *
+from migrate.changeset import *
+
+import logging
+log = logging.getLogger( __name__ )
+
+metadata = MetaData( migrate_engine )
+db_session = scoped_session( sessionmaker( bind=migrate_engine, autoflush=False, autocommit=True ) )
+
+def upgrade():
+ print __doc__
+ metadata.reflect()
+
+ # Create and initialize imported column in job table.
+ Tool_table = Table( "tool", metadata, autoload=True )
+ c = Column( "suite", Boolean, default=False, index=True )
+ try:
+ # Create
+ c.create( Tool_table )
+ assert c is Tool_table.c.suite
+
+ # Initialize.
+ if migrate_engine.name == 'mysql' or migrate_engine.name == 'sqlite':
+ default_false = "0"
+ elif migrate_engine.name == 'postgres':
+ default_false = "false"
+ db_session.execute( "UPDATE tool SET suite=%s" % default_false )
+
+ except Exception, e:
+ print "Adding suite column to the tool table failed: %s" % str( e )
+ log.debug( "Adding suite column to the tool table failed: %s" % str( e ) )
+
+def downgrade():
+ metadata.reflect()
+
+ # Drop imported column from job table.
+ Tool_table = Table( "tool", metadata, autoload=True )
+ try:
+ Tool_table.c.suite.drop()
+ except Exception, e:
+ print "Dropping column suite from the tool table failed: %s" % str( e )
+ log.debug( "Dropping column suite from the tool table failed: %s" % str( e ) )
--- a/lib/galaxy/webapps/community/controllers/upload.py
+++ b/lib/galaxy/webapps/community/controllers/upload.py
@@ -2,6 +2,7 @@ import sys, os, shutil, logging, urllib2
from galaxy.web.base.controller import *
from galaxy.web.framework.helpers import time_ago, iff, grids
from galaxy.model.orm import *
+from galaxy.web.form_builder import SelectField
from galaxy.webapps.community import datatypes
from common import get_categories, get_category, get_versions
@@ -25,12 +26,13 @@ class UploadController( BaseController )
replace_id = params.get( 'replace_id', None )
replace_version = None
uploaded_file = None
+ upload_type = params.get( 'upload_type', 'tool' )
categories = get_categories( trans )
if not categories:
return trans.response.send_redirect( web.url_for( controller='tool',
action='browse_tools',
cntrller='tool',
- message='No categories have been configured in this instance of the Galaxy Community. An administrator needs to create some via the Administrator control panel before anything can be uploaded',
+ message='No categories have been configured in this instance of the Galaxy Tool Shed. An administrator needs to create some via the Administrator control panel before anything can be uploaded',
status='error' ) )
if params.get( 'upload_button', False ):
url_paste = params.get( 'url', '' ).strip()
@@ -50,8 +52,6 @@ class UploadController( BaseController )
elif file_data not in ( '', None ):
uploaded_file = file_data.file
if uploaded_file:
- # TODO: tool should no longer be the default when we upload histories and workflows
- upload_type = params.get( 'upload_type', 'tool' )
datatype = trans.app.datatypes_registry.get_datatype_by_extension( upload_type )
if datatype is None:
message = 'An unknown file type was selected. This should not be possible, please report the error.'
@@ -62,6 +62,7 @@ class UploadController( BaseController )
meta = datatype.verify( uploaded_file )
meta.user = trans.user
meta.guid = trans.app.security.get_new_guid()
+ meta.suite = upload_type == 'toolsuite'
obj = datatype.create_model_object( meta )
trans.sa_session.add( obj )
if isinstance( obj, trans.app.model.Tool ):
@@ -71,25 +72,32 @@ class UploadController( BaseController )
if replace_id:
replace_version = trans.sa_session.query( trans.app.model.Tool ).get( trans.security.decode_id( replace_id ) )
if existing and not replace_id:
- raise UploadError( 'A tool with the same ID already exists. If you are trying to update this tool to a new version, please use the upload form on the "Edit Tool" page. Otherwise, please choose a new ID.' )
+ raise UploadError( 'A %s with the same Id already exists. If you are trying to update this %s to a new version, use the upload form on the "Edit Tool" page. Otherwise, change the Id in the %s config.' % \
+ ( obj.label, obj.label, obj.label ) )
elif replace_id and not existing:
- raise UploadError( 'Tool ids must match when uploading a new version of a tool. The new tool id does not match the old tool id (%s). Check the tool XML files.' % str( replace_version.tool_id ) )
+ raise UploadError( 'The new %s id (%s) does not match the old %s id (%s). Check the %s config files.' % \
+ ( obj.label, str( meta.id ), obj.label, str( replace_version.tool_id ), obj.label ) )
elif existing and replace_id:
if replace_version.newer_version:
# If the user has picked an old version, switch to the newest version
replace_version = get_versions( replace_version )[0]
if replace_version.tool_id != meta.id:
- raise UploadError( 'Tool ids must match when uploading a new version of a tool. The new tool id (%s) does not match the old tool id (%s). Check the tool XML files.' % ( str( meta.id ), str( replace_version.tool_id ) ) )
+ raise UploadError( 'The new %s id (%s) does not match the old %s id (%s). Check the %s config files.' % \
+ ( obj.label, str( meta.id ), obj.label, str( replace_version.tool_id ), obj.label ) )
for old_version in get_versions( replace_version ):
if old_version.version == meta.version:
- raise UploadError( 'The new version (%s) matches an old version. Check your version in the tool XML file.' % str( meta.version ) )
- if old_version.is_new():
- raise UploadError( 'There is an existing version of this tool which has not yet been submitted for approval, so either <a href="%s">submit or delete it</a> before uploading a new version.' % url_for( controller='common',
- action='view_tool',
- cntrller='tool',
- id=trans.security.encode_id( old_version.id ) ) )
- if old_version.is_waiting():
- raise UploadError( 'There is an existing version of this tool which is waiting for administrative approval, so contact an administrator for help.' )
+ raise UploadError( 'The new version (%s) matches an old version. Check your version in the %s config file.' % \
+ ( str( meta.version ), obj.label ) )
+ if old_version.is_new:
+ raise UploadError( 'There is an existing version of this %s which has not yet been submitted for approval, so either <a href="%s">submit it or delete it</a> before uploading a new version.' % \
+ ( obj.label,
+ url_for( controller='common',
+ action='view_tool',
+ cntrller='tool',
+ id=trans.security.encode_id( old_version.id ) ) ) )
+ if old_version.is_waiting:
+ raise UploadError( 'There is an existing version of this %s which is waiting for administrative approval, so contact an administrator for help.' % \
+ obj.label )
# Defer setting the id since the newer version id doesn't exist until the new Tool object is flushed
if category_ids:
for category_id in category_ids:
@@ -128,10 +136,10 @@ class UploadController( BaseController )
replace_version = trans.sa_session.query( trans.app.model.Tool ).get( int( trans.app.security.decode_id( replace_id ) ) )
old_version = None
for old_version in get_versions( replace_version ):
- if old_version.is_new():
+ if old_version.is_new:
message = 'There is an existing version of this tool which has not been submitted for approval, so either submit or delete it before uploading a new version.'
break
- if old_version.is_waiting():
+ if old_version.is_waiting:
message = 'There is an existing version of this tool which is waiting for administrative approval, so contact an administrator for help.'
break
else:
@@ -143,13 +151,23 @@ class UploadController( BaseController )
id=trans.app.security.encode_id( old_version.id ),
message=message,
status='error' ) )
- selected_upload_type = params.get( 'type', 'tool' )
selected_categories = [ trans.security.decode_id( id ) for id in category_ids ]
+ datatype_labels=trans.app.datatypes_registry.get_datatype_labels()
+ type_ids = [ tup[0] for tup in datatype_labels ]
+ upload_type_select_list = SelectField( 'upload_type',
+ refresh_on_change=True,
+ refresh_on_change_values=type_ids )
+ for type_id, type_label in datatype_labels:
+ if type_id == upload_type:
+ upload_type_select_list.add_option( type_label, type_id, selected = True )
+ else:
+ upload_type_select_list.add_option( type_label, type_id, selected = False )
return trans.fill_template( '/webapps/community/upload/upload.mako',
message=message,
status=status,
- selected_upload_type=selected_upload_type,
- upload_types=trans.app.datatypes_registry.get_datatypes_for_select_list(),
+ selected_upload_type=upload_type,
+ upload_type_select_list=upload_type_select_list,
+ datatype_labels=trans.app.datatypes_registry.get_datatype_labels(),
replace_id=replace_id,
selected_categories=selected_categories,
categories=get_categories( trans ) )
--- a/community_datatypes_conf.xml.sample
+++ b/community_datatypes_conf.xml.sample
@@ -2,8 +2,6 @@
<datatypes><registration><datatype extension="tool" type="galaxy.webapps.community.datatypes:Tool" model="galaxy.webapps.community.model:Tool"/>
+ <datatype extension="toolsuite" type="galaxy.webapps.community.datatypes:ToolSuite" model="galaxy.webapps.community.model:Tool"/></registration>
- <sniffers>
- <sniffer type="galaxy.webapps.community.datatypes:Tool"/>
- </sniffers></datatypes>
--- a/templates/webapps/community/upload/upload.mako
+++ b/templates/webapps/community/upload/upload.mako
@@ -9,16 +9,43 @@
%><%inherit file="${inherit(context)}"/>
-<%def name="title()">Upload</%def>
+<%def name="javascripts()">
+ ${parent.javascripts()}
+ <script type="text/javascript">
+ $( function() {
+ $( "select[refresh_on_change='true']").change( function() {
+ $( "#upload_form" ).submit();
+ });
+ });
+ </script>
+</%def>
-<h2>Upload</h2>
+<%def name="title()">
+ %if selected_upload_type == 'tool':
+ Upload a tool archive
+ %elif selected_upload_type == 'toolsuite':
+ Upload a tool suite archive
+ %endif
+</%def>
+
+<h2>
+ %if selected_upload_type == 'tool':
+ Upload a tool archive
+ %elif selected_upload_type == 'toolsuite':
+ Upload a tool suite archive
+ %endif
+</h2>
%if message:
${render_msg( message, status )}
%endif
<div class="toolForm">
- <div class="toolFormTitle">Upload</div>
+ %if selected_upload_type == 'tool':
+ <div class="toolFormTitle">Upload a single tool archive</div>
+ %else:
+ <div class="toolFormTitle">Upload a tool suite archive</div>
+ %endif
<div class="toolFormBody">
## TODO: nginx
<form id="upload_form" name="upload_form" action="${h.url_for( controller='upload', action='upload' )}" enctype="multipart/form-data" method="post">
@@ -28,18 +55,14 @@
<div class="form-row"><label>Upload Type</label><div class="form-row-input">
- <select name="upload_type">
- %for type_id, type_name in upload_types:
- %if type_id == selected_upload_type:
- <option value="${type_id}" selected>${type_name}</option>
- %else:
- <option value="${type_id}">${type_name}</option>
- %endif
- %endfor
- </select>
+ ${upload_type_select_list.get_html()}
</div><div class="toolParamHelp" style="clear: both;">
- Need help creating a tool file? See the <a href="${h.url_for( controller='tool', action='help' )}">Tool Help</a> page.
+ %if selected_upload_type == 'tool':
+ Need help creating a single tool archive? See details below.
+ %elif selected_upload_type == 'toolsuite':
+ Need help creating a tool suite archive? See details below.
+ %endif
</div><div style="clear: both"></div></div>
@@ -77,3 +100,151 @@
</form></div></div>
+<p/>
+<div class="toolFormTitle">Creating an archive containing a tool or a suite of tools</div>
+<p>
+ A tool or tool suite archive is a tar-format file (bzipped or gzipped tar are valid)
+ containing all the files necessary to load the tool(s) into a Galaxy instance.
+</p>
+%if selected_upload_type == 'toolsuite':
+ <h3>Tool Suite Archive</h3>
+ <p>
+ A tools suite must include a file named <code>suite_config.xml</code> which provides information about the id, name,
+ version and description of the tool suite, as well as the id, name, version and description of each tool
+ in the suite. Here is an example <code>suite_config.xml</code> file.
+ </p>
+ <p>
+<pre>
+ <suite id="lastz_toolsuite" name="Suite of Lastz tools" version="1.0.0">
+ <description>This suite contains all of my Lastz tools for Galaxy</description>
+ <tool id="lastz_wrapper_2" name="Lastz" version="1.1.0">
+ <description> map short reads against reference sequence</description>
+ </tool>
+ <tool id="lastz_paired_reads_wrapper" name="Lastz paired reads" version="1.0.0">
+ <description> map short paired reads against reference sequence</description>
+ </tool>
+ </suite>
+</pre>
+ </p>
+ </p>
+ <p>
+ New versions of the suite can be uploaded, replacing an older version of the suite, but the version attribute
+ of the <suite> tag must be altered the same way that the version attribute of a single tool config must be altered
+ if uploading a new version of a tool.
+ </p>
+ <p>
+ The id, name and version attributes of each <tool> tag in the <code>suite_config.xml</code> file must exactly match the same
+ attributes in each associated tool config in the archive or you will not be allowed to upload the archive.
+ </p>
+ <p>
+ In addition to the <code>suite_config.xml</code> file, the archive must include all
+ <a href="http://bitbucket.org/galaxy/galaxy-central/wiki/ToolConfigSyntax" target="_blank">tool config files</a>,
+ executables, functional test data (if your tool config includes functional tests) and other files needed for each
+ of the tools in your suite to function within Galaxy. See the information about single tool archives below for
+ additional hints to enable ease-of-use when others download your suite of tools.
+ </p>
+ <p>
+ For example, to package the above Lastz suite of tools:
+<pre>
+ user@host:~% tar jcvf ~/Desktop/galaxy_lastz_toolsuite.tar.bz2 lastzsuite
+ lastzsuite/
+ lastzsuite/README
+ lastzsuite/suite_config.xml
+ lastzsuite/lastz_paired_reads_wrapper.py
+ lastzsuite/lastz_paired_reads_wrapper.xml
+ lastzsuite/lastz_wrapper.py
+ lastzsuite/lastz_wrapper.xml
+ lastzsuite/lastz-distrib-1.02.00/
+ lastzsuite/lastz-distrib-1.02.00/src/
+ lastzsuite/lastz-distrib-1.02.00/src/Makefile
+ lastzsuite/lastz-distrib-1.02.00/src/version.mak
+ lastzsuite/lastz-distrib-1.02.00/src/lastz.c
+ lastzsuite/lastz-distrib-1.02.00/src/lastz.h
+ ...
+</pre>
+ ~/Desktop/galaxy_lastz_tool.tar.bz2 is now ready to be uploaded.
+ </p>
+%endif
+<h3>Single Tool Archive</h3>
+<p>
+ A single tool archive must include a
+ <a href="http://bitbucket.org/galaxy/galaxy-central/wiki/ToolConfigSyntax" target="_blank">tool config file</a>
+ and will probably also include a tool script. If any steps are necessary to install your tool beyond the basic
+ instructions below, include a README file to provide details. If the tool (or parts of it) are written in C,
+ the source code can be included (or put links to the source in the README). Do not include pre-compiled binaries
+ without source since Galaxy is run on a wide variety of platforms. Also, if you are only wrapping or providing a
+ Galaxy config for a tool that is not your own, be sure the license allows for redistribution before including any
+ part of that tool in the archive.
+</p>
+<p>
+ There are no requirements about the directory structure inside the archive, but for ease of use it's generally
+ a good idea to put everything inside a sub-directory, instead of directly at the top level.
+</p>
+<p>
+ For example, to package the Lastz tool's config file, Galaxy wrapper, and the C source:
+<pre>
+ user@host:~% tar jcvf ~/Desktop/galaxy_lastz_tool.tar.bz2 lastz
+ lastz/
+ lastz/README
+ lastz/lastz_wrapper.py
+ lastz/lastz_wrapper.xml
+ lastz/lastz-distrib-1.02.00/
+ lastz/lastz-distrib-1.02.00/src/
+ lastz/lastz-distrib-1.02.00/src/Makefile
+ lastz/lastz-distrib-1.02.00/src/version.mak
+ lastz/lastz-distrib-1.02.00/src/lastz.c
+ lastz/lastz-distrib-1.02.00/src/lastz.h
+ ...
+</pre>
+ ~/Desktop/galaxy_lastz_tool.tar.bz2 is now ready to be uploaded.
+</p>
+<h3>Editing Information, Categories, and Submitting For Approval</h3>
+<p>
+ Simply uploading a tool to the Galaxy too shed will not allow other users to find and download your tool. It will
+ need to be approved by an administrator before it appears in the tool list.
+</p>
+<p>
+ After your archive has successfully uploaded, you will be redirected to the Edit Tool page. Provide a detailed
+ description of what the tool does - this will be used by administrators to understand the tool before approving it
+ for display on the site. Once approved, this information will be displayed to users who view your tool. In addition,
+ the site administrators will have configured a number of categories with which you can associate your tool to make it
+ easy to find by users looking to solve specific problems. Associate as many categories as are relevant to your tool.
+ You may change the description and associated categories as often as you'd like until you click the "<strong>Submit for
+ approval</strong>" button. Once submitted, the tool will be approved or rejected by an administrator. If the tool is
+ rejected, you will see information about why it was rejected, and you can make appropriate changes to the archive and
+ re-submit it for approval. When it is approved, your archive will be visible to everyone. At that point, the description
+ and associated categories can only be changed by an administrator.
+</p>
+<p>
+ When the tool has been approved or rejected, you may upload a new version by browsing to the tool's "View Tool" page,
+ clicking the "Tool actions" menu in the upper right corner of the page, and selecting "Upload a new version" from the
+ menu.
+</p>
+<hr/>
+<h3>Downloading and Installing Tools</h3>
+<p>
+ A tool's download link will send you the tool archive. Once downloaded, unpack the tool on your local Galaxy instance's server:
+<pre>
+ user@host:~% tar xvf galaxy_lastz_tool.tar
+ ...
+ user@host:~% tar zxvf galaxy_lastz_tool.tar.gz
+ ...
+ user@host:~% tar jxvf galaxy_lastz_tool.tar.bz2
+ ...
+</pre>
+ If the archive includes a README file, consult it for installation instructions. If not, follow these basic steps:
+ <ol>
+ <li>Create a directory under <code>galaxy_dist/tools/</code> to house downloaded tool(s).</li>
+ <li>In the new directory, place the XML and any script file(s) which were contained in the archive.</li>
+ <li>
+ If the tool includes binaries, you'll need to copy them to a directory on your <code>$PATH</code>. If the tool depends on
+ C binaries but does not come with them (only source), you'll need to compile the source first.
+ </li>
+ <li>Add the tool to <code>galaxy_dist/tool_conf.xml</code>.</li>
+ <li>Restart your Galaxy server process.</li>
+ </ol>
+</p>
+<p>
+ In the near future, we plan to implement a more direct method to install tools via the Galaxy administrator user interface instead
+ of placing files on the filesystem and manually managing the <code>tool_conf.xml</code> file.
+</p>
--- a/templates/webapps/community/admin/index.mako
+++ b/templates/webapps/community/admin/index.mako
@@ -1,7 +1,7 @@
<%inherit file="/webapps/community/base_panels.mako"/>
## Default title
-<%def name="title()">Galaxy Community Space Administration</%def>
+<%def name="title()">Galaxy Tool Shed Administration</%def><%def name="stylesheets()">
${parent.stylesheets()}
--- a/templates/webapps/community/tool/help.mako
+++ b/templates/webapps/community/tool/help.mako
@@ -17,35 +17,87 @@
${render_msg( message, status )}
%endif
-<h3>Uploading Tools</h3>
-
-<p><strong>Tool File Format</strong></p>
+<p/>
+<div class="toolFormTitle">Creating an archive containing a tool or a suite of tools</div><p>
-
- A tool file is a tar-format (bzipped or gzipped tar are valid) archive
- containing all the files necessary to load the tool in Galaxy. At the very
- least, it must contain a
- <a href="http://bitbucket.org/galaxy/galaxy-central/wiki/ToolConfigSyntax" target="_blank">Tool XML File</a>,
- and will probably also include a tool script. If any steps are necessary
- to install your tool beyond the basic instructions below, please include a
- README file which details these steps. If the tool (or parts of it) are
- written in C, the source code can be included (or put links to the source
- in the README). Please do not include precompiled binaries without source,
- since Galaxy is run on a wide variety of platforms. Also, if you are only
- wrapping or providing a Galaxy config for a tool that is not your own,
- please be sure the license allows for redistribution before including any
- part of that tool in the tar archive!
+ A tool or tool suite archive is a tar-format file (bzipped or gzipped tar are valid)
+ containing all the files necessary to load the tool(s) into a Galaxy instance.
+</p>
+<h3>Tool Suite Archive</h3>
+<p>
+ A tools suite must include a file named <code>suite_config.xml</code> which provides information about the id, name,
+ version and description of the tool suite, as well as the id, name, version and description of each tool
+ in the suite. Here is an example <code>suite_config.xml</code> file.
</p><p>
- There are no requirements about the directory structure inside the tar
- archive, but for ease of use, it's generally a good idea to put everything
- inside of a subdirectory, instead of directly at the top level.
+<pre>
+ <suite id="lastz_toolsuite" name="Suite of Lastz tools" version="1.0.0">
+ <description>This suite contains all of my Lastz tools for Galaxy</description>
+ <tool id="lastz_wrapper_2" name="Lastz" version="1.1.0">
+ <description> map short reads against reference sequence</description>
+ </tool>
+ <tool id="lastz_paired_reads_wrapper" name="Lastz paired reads" version="1.0.0">
+ <description> map short paired reads against reference sequence</description>
+ </tool>
+ </suite>
+</pre></p>
-
-<p><strong>Tool File Example</strong></p>
+</p><p>
- To package up the LASTZ tool's config file, Galaxy wrapper, and the C source:
- <pre>
+ New versions of the suite can be uploaded, replacing an older version of the suite, but the version attribute
+ of the <suite> tag must be altered the same way that the version attribute of a single tool config must be altered
+ if uploading a new version of a tool.
+</p>
+<p>
+ The id, name and version attributes of each <tool> tag in the <code>suite_config.xml</code> file must exactly match the same
+ attributes in each associated tool config in the archive or you will not be allowed to upload the archive.
+</p>
+<p>
+ In addition to the <code>suite_config.xml</code> file, the archive must include all
+ <a href="http://bitbucket.org/galaxy/galaxy-central/wiki/ToolConfigSyntax" target="_blank">tool config files</a>,
+ executables, functional test data (if your tool config includes functional tests) and other files needed for each
+ of the tools in your suite to function within Galaxy. See the information about single tool archives below for
+ additional hints to enable ease-of-use when others download your suite of tools.
+</p>
+<p>
+ For example, to package the above Lastz suite of tools:
+<pre>
+ user@host:~% tar jcvf ~/Desktop/galaxy_lastz_toolsuite.tar.bz2 lastzsuite
+ lastzsuite/
+ lastzsuite/README
+ lastzsuite/suite_config.xml
+ lastzsuite/lastz_paired_reads_wrapper.py
+ lastzsuite/lastz_paired_reads_wrapper.xml
+ lastzsuite/lastz_wrapper.py
+ lastzsuite/lastz_wrapper.xml
+ lastzsuite/lastz-distrib-1.02.00/
+ lastzsuite/lastz-distrib-1.02.00/src/
+ lastzsuite/lastz-distrib-1.02.00/src/Makefile
+ lastzsuite/lastz-distrib-1.02.00/src/version.mak
+ lastzsuite/lastz-distrib-1.02.00/src/lastz.c
+ lastzsuite/lastz-distrib-1.02.00/src/lastz.h
+ ...
+</pre>
+ ~/Desktop/galaxy_lastz_tool.tar.bz2 is now ready to be uploaded.
+</p>
+<h3>Single Tool Archive</h3>
+<p>
+ A single tool archive must include a
+ <a href="http://bitbucket.org/galaxy/galaxy-central/wiki/ToolConfigSyntax" target="_blank">tool config file</a>
+ and will probably also include a tool script. If any steps are necessary to install your tool beyond the basic
+ instructions below, include a README file to provide details. If the tool (or parts of it) are written in C,
+ the source code can be included (or put links to the source in the README). Do not include pre-compiled binaries
+ without source since Galaxy is run on a wide variety of platforms. Also, if you are only wrapping or providing a
+ Galaxy config for a tool that is not your own, be sure the license allows for redistribution before including any
+ part of that tool in the archive.
+</p>
+<p>
+ There are no requirements about the directory structure inside the archive, but for ease of use it's generally
+ a good idea to put everything inside a sub-directory, instead of directly at the top level.
+</p>
+<p>
+ For example, to package the Lastz tool's config file, Galaxy wrapper, and the C source:
+<pre>
user@host:~% tar jcvf ~/Desktop/galaxy_lastz_tool.tar.bz2 lastz
lastz/
lastz/README
@@ -58,68 +110,57 @@
lastz/lastz-distrib-1.02.00/src/lastz.c
lastz/lastz-distrib-1.02.00/src/lastz.h
...
- </pre>
- <code>~/Desktop/galaxy_lastz_tool.tar.bz2</code> is now ready to be uploaded.
+</pre>
+ ~/Desktop/galaxy_lastz_tool.tar.bz2 is now ready to be uploaded.
+</p>
+<h3>Editing Information, Categories, and Submitting For Approval</h3>
+<p>
+ Simply uploading a tool to the Galaxy too shed will not allow other users to find and download your tool. It will
+ need to be approved by an administrator before it appears in the tool list.
+</p>
+<p>
+ After your archive has successfully uploaded, you will be redirected to the Edit Tool page. Provide a detailed
+ description of what the tool does - this will be used by administrators to understand the tool before approving it
+ for display on the site. Once approved, this information will be displayed to users who view your tool. In addition,
+ the site administrators will have configured a number of categories with which you can associate your tool to make it
+ easy to find by users looking to solve specific problems. Associate as many categories as are relevant to your tool.
+ You may change the description and associated categories as often as you'd like until you click the "<strong>Submit for
+ approval</strong>" button. Once submitted, the tool will be approved or rejected by an administrator. If the tool is
+ rejected, you will see information about why it was rejected, and you can make appropriate changes to the archive and
+ re-submit it for approval. When it is approved, your archive will be visible to everyone. At that point, the description
+ and associated categories can only be changed by an administrator.
+</p>
+<p>
+ When the tool has been approved or rejected, you may upload a new version by browsing to the tool's "View Tool" page,
+ clicking the "Tool actions" menu in the upper right corner of the page, and selecting "Upload a new version" from the
+ menu.
+</p>
+<hr/>
+<h3>Downloading and Installing Tools</h3>
+<p>
+ A tool's download link will send you the tool archive. Once downloaded, unpack the tool on your local Galaxy instance's server:
+<pre>
+ user@host:~% tar xvf galaxy_lastz_tool.tar
+ ...
+ user@host:~% tar zxvf galaxy_lastz_tool.tar.gz
+ ...
+ user@host:~% tar jxvf galaxy_lastz_tool.tar.bz2
+ ...
+</pre>
+ If the archive includes a README file, consult it for installation instructions. If not, follow these basic steps:
+ <ol>
+ <li>Create a directory under <code>galaxy_dist/tools/</code> to house downloaded tool(s).</li>
+ <li>In the new directory, place the XML and any script file(s) which were contained in the archive.</li>
+ <li>
+ If the tool includes binaries, you'll need to copy them to a directory on your <code>$PATH</code>. If the tool depends on
+ C binaries but does not come with them (only source), you'll need to compile the source first.
+ </li>
+ <li>Add the tool to <code>galaxy_dist/tool_conf.xml</code>.</li>
+ <li>Restart your Galaxy server process.</li>
+ </ol>
+</p>
+<p>
+ In the near future, we plan to implement a more direct method to install tools via the Galaxy administrator user interface instead
+ of placing files on the filesystem and manually managing the <code>tool_conf.xml</code> file.
</p>
-<p><strong>Editing Information, Categories, and Submitting For Approval</strong></p>
-
-<p>
- Simply uploading a tool to the Community will not allow other users to find
- and download your tool. It will need to be approved by an administrator
- before it appears in the tool list.
-</p>
-<p>
- After the tool has successfully uploaded, you will be redirected to the
- Edit Tool page. Please provide a detailed description of what the tool
- does - this will be used by administrators to understand the tool before
- approving it for display on the site. Once approved, this information will
- be displayed to users who view your tool. In addition, the site
- administrators will have configured a number of categories with which you
- can associate your tool to make it easily findable by users looking to
- solve specific problems. Please associate as many categories as are
- relevant to your tool. You may change the description and associated
- categories as often as you'd like until you click the "<strong>Submit for
- approval</strong>" button. Once submitted, the tool will be approved or
- rejected by an administrator. Once approved, it will be visible to
- everyone. At that point, the description and associated categories can
- only be changed by an administrator.
-</p>
-<p>
- Once the tool has been approved or rejected, you may upload a new version
- by browsing to the tool's "View Tool" page, clicking the context menu to
- the right of the tool's name, and selecting "Upload a new version."
-</p>
-
-<hr/>
-
-<h3>Downloading and Installing Tools</h3>
-
-<p>
- A tool's download link will send you the tool tar archive. Once
- downloaded, unpack the tool on your local Galaxy instance's server:
- <pre>
- user@host:~% tar xvf galaxy_tool.tar
- ...
- user@host:~% tar zxvf galaxy_tool.tar.gz
- ...
- user@host:~% tar jxvf galaxy_tool.tar.bz2
- ...
- </pre>
- If the tar archive includes a README file, consult it for installation
- instructions. If not, follow these basic steps:
- <ol>
- <li>Create a directory under <code>galaxy_dist/tools/</code> to house downloaded tool(s).</li>
- <li>In the new directory, place the XML and any script file(s) which were contained in the tar archive.</li>
- <li>If the tool includes binaries, you'll need to copy them to a directory on your <code>$PATH</code>. If the tool depends on C binaries but does not come with them (only source), you'll need to compile the source first.</li>
- <li>Add the tool to <code>galaxy_dist/tool_conf.xml</code>.</li>
- <li>Restart the Galaxy server process.</li>
- </ol>
-</p>
-
-<p>
- We plan to implement a more direct method to install tools via the Galaxy
- administrator user interface instead of placing files on the filesystem and
- managing the <code>tool_conf.xml</code> file by hand. In the meantime,
- this is the process.
-</p>
--- a/lib/galaxy/webapps/community/model/__init__.py
+++ b/lib/galaxy/webapps/community/model/__init__.py
@@ -1,5 +1,5 @@
"""
-Galaxy Community Space data model classes
+Galaxy Tool Shed data model classes
Naming: try to use class names that have a distinct plural form so that
the relationship cardinalities are obvious (e.g. prefer Dataset to Data)
@@ -95,7 +95,7 @@ class Tool( object ):
REJECTED = 'rejected',
ARCHIVED = 'archived' )
def __init__( self, guid=None, tool_id=None, name=None, description=None, user_description=None,
- category=None, version=None, user_id=None, external_filename=None ):
+ category=None, version=None, user_id=None, external_filename=None, suite=False ):
self.guid = guid
self.tool_id = tool_id
self.name = name or "Unnamed tool"
@@ -106,6 +106,7 @@ class Tool( object ):
self.external_filename = external_filename
self.deleted = False
self.__extension = None
+ self.suite = suite
def get_file_name( self ):
if not self.external_filename:
assert self.id is not None, "ID must be set before filename used (commit the object)"
@@ -133,6 +134,8 @@ class Tool( object ):
self.description = datatype_bunch.description
self.version = datatype_bunch.version
self.user_id = datatype_bunch.user.id
+ self.suite = datatype_bunch.suite
+ @property
def state( self ):
if self.events:
# Sort the events in ascending order by update_time
@@ -150,35 +153,47 @@ class Tool( object ):
else:
return ''
return 'No comment'
+ # Tool states
+ @property
def is_new( self ):
- return self.state() == self.states.NEW
+ return self.state == self.states.NEW
+ @property
def is_error( self ):
- return self.state() == self.states.ERROR
+ return self.state == self.states.ERROR
+ @property
def is_deleted( self ):
- return self.state() == self.states.DELETED
+ return self.state == self.states.DELETED
+ @property
def is_waiting( self ):
- return self.state() == self.states.WAITING
+ return self.state == self.states.WAITING
+ @property
def is_approved( self ):
- return self.state() == self.states.APPROVED
+ return self.state == self.states.APPROVED
+ @property
def is_rejected( self ):
- return self.state() == self.states.REJECTED
+ return self.state == self.states.REJECTED
+ @property
def is_archived( self ):
- return self.state() == self.states.ARCHIVED
+ return self.state == self.states.ARCHIVED
def get_state_message( self ):
- if self.is_new():
- return '<font color="red"><b><i>This is an unsubmitted version of this tool</i></b></font>'
- if self.is_error():
- return '<font color="red"><b><i>This tool is in an error state</i></b></font>'
- if self.is_deleted():
- return '<font color="red"><b><i>This is a deleted version of this tool</i></b></font>'
- if self.is_waiting():
- return '<font color="red"><b><i>This version of this tool is awaiting administrative approval</i></b></font>'
- if self.is_approved():
- return '<b><i>This is the latest approved version of this tool</i></b>'
- if self.is_rejected():
- return '<font color="red"><b><i>This version of this tool has been rejected by an administrator</i></b></font>'
- if self.is_archived():
- return '<font color="red"><b><i>This is an archived version of this tool</i></b></font>'
+ if self.is_suite:
+ label = 'tool suite'
+ else:
+ label = 'tool'
+ if self.is_new:
+ return '<font color="red"><b><i>This is an unsubmitted version of this %s</i></b></font>' % label
+ if self.is_error:
+ return '<font color="red"><b><i>This %s is in an error state</i></b></font>' % label
+ if self.is_deleted:
+ return '<font color="red"><b><i>This is a deleted version of this %s</i></b></font>' % label
+ if self.is_waiting:
+ return '<font color="red"><b><i>This version of this %s is awaiting administrative approval</i></b></font>' % label
+ if self.is_approved:
+ return '<b><i>This is the latest approved version of this %s</i></b>' % label
+ if self.is_rejected:
+ return '<font color="red"><b><i>This version of this %s has been rejected by an administrator</i></b></font>' % label
+ if self.is_archived:
+ return '<font color="red"><b><i>This is an archived version of this %s</i></b></font>' % label
@property
def extension( self ):
# if instantiated via a query, this unmapped property won't exist
@@ -202,6 +217,15 @@ class Tool( object ):
self.__extension = 'tar'
return self.__extension
@property
+ def is_suite( self ):
+ return self.suite
+ @property
+ def label( self ):
+ if self.is_suite:
+ return 'tool suite'
+ else:
+ return 'tool'
+ @property
def download_file_name( self ):
return '%s_%s.%s' % ( self.tool_id, self.version, self.extension )
@property
--- a/templates/webapps/community/base_panels.mako
+++ b/templates/webapps/community/base_panels.mako
@@ -1,7 +1,7 @@
<%inherit file="/base_panels.mako"/>
## Default title
-<%def name="title()">Galaxy Community Space</%def>
+<%def name="title()">Galaxy Tool Shed</%def>
## Masthead
<%def name="masthead()">
@@ -94,7 +94,7 @@
<div class="title" style="position: absolute; top: 0; left: 0;"><a href="${app.config.get( 'logo_url', '/' )}"><img border="0" src="${h.url_for('/static/images/galaxyIcon_noText.png')}" style="width: 26px; vertical-align: top;">
- Galaxy Community
+ Galaxy Tool Shed
%if app.config.brand:
<span class='brand'>/ ${app.config.brand}</span>
%endif
--- a/lib/galaxy/webapps/community/model/mapping.py
+++ b/lib/galaxy/webapps/community/model/mapping.py
@@ -113,7 +113,8 @@ Tool.table = Table( "tool", metadata,
Column( "version", TrimmedString( 255 ) ),
Column( "user_id", Integer, ForeignKey( "galaxy_user.id" ), index=True ),
Column( "external_filename" , TEXT ),
- Column( "deleted", Boolean, index=True, default=False ) )
+ Column( "deleted", Boolean, index=True, default=False ),
+ Column( "suite", Boolean, default=False, index=True ) )
Category.table = Table( "category", metadata,
Column( "id", Integer, primary_key=True ),
--- a/lib/galaxy/webapps/community/controllers/tool.py
+++ b/lib/galaxy/webapps/community/controllers/tool.py
@@ -15,7 +15,7 @@ class ApprovedToolListGrid( ToolListGrid
class MyToolsListGrid( ToolListGrid ):
class StateColumn( grids.TextColumn ):
def get_value( self, trans, grid, tool ):
- state = tool.state()
+ state = tool.state
if state == 'approved':
state_color = 'ok'
elif state == 'rejected':
@@ -64,7 +64,7 @@ class ToolCategoryListGrid( CategoryList
viewable_tools = 0
for tca in category.tools:
tool = tca.tool
- if tool.is_approved():
+ if tool.is_approved:
viewable_tools += 1
return viewable_tools
return 0
--- a/lib/galaxy/webapps/community/datatypes/__init__.py
+++ b/lib/galaxy/webapps/community/datatypes/__init__.py
@@ -17,7 +17,6 @@ class DatatypeVerificationError( Excepti
class Registry( object ):
def __init__( self, root_dir=None, config=None ):
self.datatypes_by_extension = {}
- self.sniff_order = []
if root_dir and config:
# Parse datatypes_conf.xml
tree = galaxy.util.parse_xml( config )
@@ -50,98 +49,143 @@ class Registry( object ):
log.debug( 'Added model class: %s to datatype: %s' % ( model_class, dtype ) )
except Exception, e:
log.warning( 'Error loading datatype "%s", problem: %s' % ( extension, str( e ) ) )
- # Load datatype sniffers from the config
- sniff_order = []
- sniffers = root.find( 'sniffers' )
- for elem in sniffers.findall( 'sniffer' ):
- dtype = elem.get( 'type', None )
- if dtype:
- sniff_order.append( dtype )
- for dtype in sniff_order:
- try:
- fields = dtype.split( ":" )
- datatype_module = fields[0]
- datatype_class = fields[1]
- fields = datatype_module.split( "." )
- module = __import__( fields.pop(0) )
- for mod in fields:
- module = getattr( module, mod )
- aclass = getattr( module, datatype_class )()
- included = False
- for atype in self.sniff_order:
- if not issubclass( atype.__class__, aclass.__class__ ) and isinstance( atype, aclass.__class__ ):
- included = True
- break
- if not included:
- self.sniff_order.append( aclass )
- log.debug( 'Loaded sniffer for datatype: %s' % dtype )
- except Exception, exc:
- log.warning( 'Error appending datatype %s to sniff_order, problem: %s' % ( dtype, str( exc ) ) )
def get_datatype_by_extension( self, ext ):
return self.datatypes_by_extension.get( ext, None )
- def get_datatypes_for_select_list( self ):
+ def get_datatype_labels( self ):
rval = []
for ext, datatype in self.datatypes_by_extension.items():
- rval.append( ( ext, datatype.select_name ) )
+ rval.append( ( ext, datatype.label ) )
return rval
- def sniff( self, fname ):
- for datatype in sniff_order:
- try:
- datatype.sniff( fname )
- return datatype.file_ext
- except:
- pass
class Tool( object ):
- select_name = 'Tool'
def __init__( self, model_object=None ):
self.model_object = model_object
- def verify( self, file ):
- msg = ''
+ self.label = 'Tool'
+ def verify( self, f, xml_files=[], tool_tags={} ):
+ # xml_files and tool_tags will only be received if we're called from the ToolSuite.verify() method.
try:
- tar = tarfile.open( file.name )
+ tar = tarfile.open( f.name )
except tarfile.ReadError:
- raise DatatypeVerificationError( 'The tool file is not a readable tar file' )
- xml_names = filter( lambda x: x.lower().endswith( '.xml' ), tar.getnames() )
- if not xml_names:
- raise DatatypeVerificationError( 'The tool file does not contain an XML file' )
- for xml_name in xml_names:
+ raise DatatypeVerificationError( 'The archive is not a readable tar file.' )
+ if not xml_files:
+ # Make sure we're not uploading a tool suite
+ if filter( lambda x: x.lower() == 'tool_suite.xml', tar.getnames() ):
+ raise DatatypeVerificationError( 'The archive includes a tool_suite.xml file, so set the upload type to "Tool Suite".' )
+ xml_files = filter( lambda x: x.lower().endswith( '.xml' ), tar.getnames() )
+ if not xml_files:
+ raise DatatypeVerificationError( 'The archive does not contain any xml config files.' )
+ for xml_file in xml_files:
try:
- tree = ElementTree.parse( tar.extractfile( xml_name ) )
+ tree = ElementTree.parse( tar.extractfile( xml_file ) )
root = tree.getroot()
except:
log.exception( 'fail:' )
continue
if root.tag == 'tool':
- rval = Bunch()
- try:
- rval.id = root.attrib['id']
- rval.name = root.attrib['name']
- rval.version = root.attrib['version']
- except KeyError, e:
- raise DatatypeVerificationError( 'Tool XML file does not conform to the specification. Missing required <tool> tag attribute: %s' % e )
- rval.description = ''
- desc_tag = root.find( 'description' )
- if desc_tag is not None:
- description = desc_tag.text
- if description:
- rval.description = description.strip()
- rval.message = 'Tool: %s %s, Version: %s, ID: %s' % ( str( rval.name ), str( rval.description ), str( rval.version ), str( rval.id ) )
- return rval
- else:
- raise DatatypeVerificationError( 'Unable to find a properly formatted tool XML file' )
+ if tool_tags:
+ # We are verifying the tools inside a tool suite, so the current tag should have been found in the suite_config.xml
+ # file parsed in the ToolSuite verify() method. The tool_tags dictionary should include a key matching the current
+ # tool Id, and a tuple value matching the tool name and version.
+ if root.attrib[ 'id' ] not in tool_tags:
+ raise DatatypeVerificationError( 'Tool Id (%s) is not included in the suite_config.xml file.' % \
+ ( str( root.attrib[ 'id' ] ) ) )
+ tup = tool_tags[ root.attrib[ 'id' ] ]
+ if root.attrib[ 'name' ] != tup[ 0 ]:
+ raise DatatypeVerificationError( 'Tool name (%s) differs between suite_config.xml and the tool config file for tool Id (%s).' % \
+ ( str( root.attrib[ 'name' ] ), str( root.attrib[ 'id' ] ) ) )
+ if root.attrib[ 'version' ] != tup[ 1 ]:
+ raise DatatypeVerificationError( 'Tool version (%s) differs between suite_config.xml and the tool config file for tool Id (%s).' % \
+ ( str( root.attrib[ 'version' ] ), str( root.attrib[ 'id' ] ) ) )
+ else:
+ # We are not verifying a tool suite, so we'll create a bunch for returning to the caller.
+ tool_bunch = Bunch()
+ try:
+ tool_bunch.id = root.attrib['id']
+ tool_bunch.name = root.attrib['name']
+ tool_bunch.version = root.attrib['version']
+ except KeyError, e:
+ raise DatatypeVerificationError( 'Tool XML file does not conform to the specification. Missing required <tool> tag attribute: %s' % str( e ) )
+ tool_bunch.description = ''
+ desc_tag = root.find( 'description' )
+ if desc_tag is not None:
+ description = desc_tag.text
+ if description:
+ tool_bunch.description = description.strip()
+ tool_bunch.message = 'Tool: %s %s, Version: %s, Id: %s' % \
+ ( str( tool_bunch.name ), str( tool_bunch.description ), str( tool_bunch.version ), str( tool_bunch.id ) )
+ return tool_bunch
+ else:
+ # TODO: should we verify files that are not tool configs?
+ log.debug( "The file named (%s) is not a tool config, so skipping verification." % str( xml_file ) )
def create_model_object( self, datatype_bunch ):
if self.model_object is None:
- raise Exception( 'No model object configured for %s, please check the datatype configuration file' % self.__class__.__name__ )
+ raise Exception( 'No model object configured for %s, check the datatype configuration file' % self.__class__.__name__ )
if datatype_bunch is None:
# TODO: do it automatically
raise Exception( 'Unable to create %s model object without passing in data' % self.__class__.__name__ )
o = self.model_object()
o.create_from_datatype( datatype_bunch )
return o
- def sniff( self, fname ):
+
+class ToolSuite( Tool ):
+ def __init__( self, model_object=None ):
+ self.model_object = model_object
+ self.label = 'Tool Suite'
+ def verify( self, f ):
+ """
+ A sample tool suite config:
+ <suite id="onto_toolkit" name="ONTO Toolkit" version="1.0">
+ <description>ONTO-Toolkit is a collection of Galaxy tools which support the manipulation of bio-ontologies.</description>
+ <tool id="get_ancestor_terms" name="Get the ancestor terms of a given OBO term" version="1.0.0">
+ <description>Collects the ancestor terms from a given term in the given OBO ontology</description>
+ </tool>
+ <tool id="get_child_terms" name="Get the child terms of a given OBO term" version="1.0.0">
+ <description>Collects the child terms from a given term in the given OBO ontology</description>
+ </tool>
+ </suite>
+ """
try:
- self.verify( open( fname, 'r' ) )
- return True
+ tar = tarfile.open( f.name )
+ except tarfile.ReadError:
+ raise DatatypeVerificationError( 'The archive is not a readable tar file.' )
+ suite_config = filter( lambda x: x.lower() == 'tool_suite.xml', tar.getnames() )
+ if not suite_config:
+ raise DatatypeVerificationError( 'The archive does not contain the required tool_suite.xml config file. If you are uploading a single tool archive, set the upload type to "Tool".' )
+ suite_config = suite_config[ 0 ]
+ # Parse and verify suite_config
+ archive_ok = False
+ try:
+ tree = ElementTree.parse( tar.extractfile( suite_config ) )
+ root = tree.getroot()
+ archive_ok = True
except:
- return False
+ log.exception( 'fail:' )
+ if archive_ok and root.tag == 'suite':
+ suite_bunch = Bunch()
+ try:
+ suite_bunch.id = root.attrib['id']
+ suite_bunch.name = root.attrib['name']
+ suite_bunch.version = root.attrib['version']
+ except KeyError, e:
+ raise DatatypeVerificationError( 'The file named tool-suite.xml does not conform to the specification. Missing required <suite> tag attribute: %s' % str( e ) )
+ suite_bunch.description = ''
+ desc_tag = root.find( 'description' )
+ if desc_tag is not None:
+ description = desc_tag.text
+ if description:
+ suite_bunch.description = description.strip()
+ suite_bunch.message = 'Tool suite: %s %s, Version: %s, Id: %s' % \
+ ( str( suite_bunch.name ), str( suite_bunch.description ), str( suite_bunch.version ), str( suite_bunch.id ) )
+ # Create a dictionary of the tools in the suite where the keys are tool_ids and the
+ # values are tuples of tool name and version
+ tool_tags = {}
+ for elem in root.findall( 'tool' ):
+ tool_tags[ elem.attrib['id'] ] = ( elem.attrib['name'], elem.attrib['version'] )
+ else:
+ raise DatatypeVerificationError( "The file named %s is not a valid tool suite config." % str( suite_config ) )
+ # Verify all included tool config files
+ xml_files = filter( lambda x: x.lower().endswith( '.xml' ) and x.lower() != 'tool_suite.xml', tar.getnames() )
+ if not xml_files:
+ raise DatatypeVerificationError( 'The archive does not contain any tool config (xml) files.' )
+ Tool.verify( self, f, xml_files=xml_files, tool_tags=tool_tags )
+ return suite_bunch
--- a/lib/galaxy/webapps/community/controllers/admin.py
+++ b/lib/galaxy/webapps/community/controllers/admin.py
@@ -299,7 +299,7 @@ class GroupListGrid( grids.Grid ):
class AdminToolListGrid( ToolListGrid ):
class StateColumn( grids.TextColumn ):
def get_value( self, trans, grid, tool ):
- state = tool.state()
+ state = tool.state
if state == 'approved':
state_color = 'ok'
elif state == 'rejected':
@@ -441,7 +441,7 @@ class AdminController( BaseController, A
# Called from the ToolStateColumn link
tool_id = kwd.get( 'id', None )
tool = get_tool( trans, tool_id )
- kwd[ 'f-state' ] = tool.state()
+ kwd[ 'f-state' ] = tool.state
elif operation == "tools_by_category":
# Eliminate the current filters if any exist.
for k, v in kwd.items():
@@ -547,7 +547,7 @@ class AdminController( BaseController, A
# If we're approving a tool, all previously approved versions must be set to archived
for version in get_versions( tool ):
# TODO: get latest approved version instead of all versions
- if version != tool and version.is_approved():
+ if version != tool and version.is_approved:
# Create an event with state ARCHIVED for the previously approved version of this tool
self.__create_tool_event( trans,
version,
@@ -799,30 +799,30 @@ def get_tools_by_state( trans, state ):
ids = []
if state == trans.model.Tool.states.NEW:
for tool in get_tools( trans ):
- if tool.is_new():
+ if tool.is_new:
ids.append( tool.id )
elif state == trans.model.Tool.states.ERROR:
for tool in get_tools( trans ):
- if tool.is_error():
+ if tool.is_error:
ids.append( tool.id )
elif state == trans.model.Tool.states.DELETED:
for tool in get_tools( trans ):
- if tool.is_deleted():
+ if tool.is_deleted:
ids.append( tool.id )
elif state == trans.model.Tool.states.WAITING:
for tool in get_tools( trans ):
- if tool.is_waiting():
+ if tool.is_waiting:
ids.append( tool.id )
elif state == trans.model.Tool.states.APPROVED:
for tool in get_tools( trans ):
- if tool.is_approved():
+ if tool.is_approved:
ids.append( tool.id )
elif state == trans.model.Tool.states.REJECTED:
for tool in get_tools( trans ):
- if tool.is_rejected():
+ if tool.is_rejected:
ids.append( tool.id )
elif state == trans.model.Tool.states.ARCHIVED:
for tool in get_tools( trans ):
- if tool.is_archived():
+ if tool.is_archived:
ids.append( tool.id )
return ids
1
0

galaxy-dist commit 1acae496c220: Added sam_indel_filter tool test files
by commits-noreply@bitbucket.org 23 Jul '10
by commits-noreply@bitbucket.org 23 Jul '10
23 Jul '10
# HG changeset patch -- Bitbucket.org
# Project galaxy-dist
# URL http://bitbucket.org/galaxy/galaxy-dist/overview
# User Kelly Vincent <kpvincent(a)bx.psu.edu>
# Date 1279744462 14400
# Node ID 1acae496c2200747aa79e7ac52cce74f5a3a3c83
# Parent 1dc82a345db24860b31b73624030fa2644c18d38
Added sam_indel_filter tool test files
--- a/test-data/sam_indel_filter_in2.sam
+++ b/test-data/sam_indel_filter_in2.sam
@@ -1,12 +1,16 @@
-081017-and-081020:1:6:774:1836 0 PHIX174 4973 37 26M1I9M * 0 0 GCTTAAAGCTACCAGTTATATGGCTGTTTGGTTTTT IIIIIIIIIIIIIIIIIIIIII@III/IE;%II;I= XT:A:U NM:i:2 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:1 MD:Z:33C1
-081017-and-081020:1:6:1193:793 0 PHIX174 4971 37 27M1I8M * 0 0 CCGCTTAAAGCTACCAGTTATATGGCTGGTTGTTTT IIIIIIIIIIIIIII7IIIDIIIIIIII,=(>%II? XT:A:U NM:i:2 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:1 MD:Z:31G3
+081017-and-081020:1:6:774:1836 0 PHIX174 4973 37 26M1I9M * 0 0 GCTTAAAGCTACCAGTTATATGGCTGTTTGGTTTTT IIIIIIIIIIIIIIIIIIIIII@IIIDIE;%II;I= XT:A:U NM:i:2 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:1 MD:Z:33C1
+081017-and-081020:1:6:1193:793 0 PHIX174 4971 37 27M1I8M * 0 0 CCGCTTAAAGCTACCAGTTATATGGCTGGTTGTTTT IIIIIIIIIIIIIII7IIIDIIIIIIII&=(>%II? XT:A:U NM:i:2 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:1 MD:Z:31G3
081017-and-081020:1:8:753:970 0 PHIX174 2974 37 29M1I6M * 0 0 GTGGCGCCATGTCTAAATTGTTTGGAGGCGGGTCAA IIIIIIIIIIIIIIII4IIIIII3I&IIIII*%%&' XT:A:U NM:i:1 X0:i:1 X1:i:0 XM:i:0 XO:i:1 XG:i:1 MD:Z:35
-081017-and-081020:1:17:361:871 0 PHIX174 4739 37 30M1I5M * 0 0 TGAGTATGGTACAGCTAATGGCCGTCTTTATTTTCC IIIIIIIIIIIIIIIIIIIGIIIII%II&'III%/# XT:A:U NM:i:2 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:1 MD:Z:28C6
-081017-and-081020:1:18:1164:1678 0 PHIX174 4971 37 27M1I8M * 0 0 CCGCTTAAAGCTACCAGTTATATGGCTGGTTGTTTT IIIIIIIIIIIIIIIIIIIII;IIII1I0I)II.I- XT:A:U NM:i:2 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:1 MD:Z:31G3
-081017-and-081020:1:20:754:1256 16 PHIX174 4772 37 4M1I31M * 0 0 CCCTGGCGGTGCATTTTATGCGGACACTTCCTACAG &II(IIIII3IIIII7II,IIIIIIIIIIIIIIIII XT:A:U NM:i:2 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:1 MD:Z:2A32
-081017-and-081020:1:24:1326:917 0 PHIX174 188 37 25M1D11M * 0 0 TTCGCCATCAACTAACGATTCTGTCAAACCTGACGC IIIIIIIIIIIIIIIIIIIIIIIIII2/&II>'IEI XT:A:U NM:i:2 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:1 MD:Z:25^A3A7
-081017-and-081020:1:25:1466:511 16 PHIX174 1179 37 21M1D15M * 0 0 CTATTGACTCTACTGTAGACATTTTACTTTTTATGT :I<=IIIIII5IIGI5IIIIIIIIIIIIIIIIIIII XT:A:U NM:i:1 X0:i:1 X1:i:0 XM:i:0 XO:i:1 XG:i:1 MD:Z:21^T15
-081017-and-081020:1:27:1267:1275 0 PHIX174 3716 37 28M1D8M * 0 0 TCATCAGCAAACGCAGAATCAGCGGTATGCTCTTCT IIIIIIIIIIIIIIIII;IIIIIII87III%I(@I. XT:A:U NM:i:1 X0:i:1 X1:i:0 XM:i:0 XO:i:1 XG:i:1 MD:Z:28^G8
-081017-and-081020:1:94:1649:147 16 PHIX174 2755 37 15M2D21M * 0 0 TATACCGTCAAGGACTGTGACTATTGACGTCCTTCC 4IIIIII@I7IIIIIIIIIIIIIIIIIIIIIIIIII XT:A:U NM:i:2 X0:i:1 X1:i:0 XM:i:0 XO:i:1 XG:i:2 MD:Z:15^TG21
-081017-and-081020:1:95:74:43 0 PHIX174 4038 37 29M1I6M * 0 0 ATCGAGGCTCTTAAACCTGCTATTGAGGCTTTTTGG IIIIIIIIIIIIIIIIICI;8I,I>IIIIII1I%5& XT:A:U NM:i:2 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:1 MD:Z:31G3
+081017-and-081020:1:11:761:901 4 * 0 0 * * 0 0 GACCTGTGATCCATCGTGATGT CBBAB/$3BB<AB/,CBCABCA
+081017-and-081020:1:17:361:871 0 PHIX174 4739 37 30M1I5M * 0 0 TGAGTATGGTACAGCTAATGGCCGTCTTTATTTTCC IIIIIIIIIIIIIIIIIIIGIIIII%II&I'II%/# XT:A:U NM:i:2 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:1 MD:Z:28C6
+081017-and-081020:1:18:1164:1678 0 PHIX174 4971 37 27M1I8M * 0 0 CCGCTTAAAGCTACCAGTTATATGGCTGGTTGTTTT IIIIIIIIIIIIIIIIIIIII;IIII1#I)II.I-I XT:A:U NM:i:2 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:1 MD:Z:31G3
+081017-and-081020:1:20:754:1256 16 PHIX174 4772 37 4M1I31M * 0 0 CCCTGGCGGTGCATTTTATGCGGACACTTCCTACAG &IIII(III3IIIII7II,IIIIIIIIIIIIIIIII XT:A:U NM:i:2 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:1 MD:Z:2A32
+081017-and-081020:1:24:1326:917 0 PHIX174 188 37 25M1D11M * 0 0 TTCGCCATCAACTAACGATTCTGTCAAACCTGACGC IIIIIIIIIIIIIIIIIIIIIIIIIIA/&II>'IEI XT:A:U NM:i:2 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:1 MD:Z:25^A3A7
+081017-and-081020:1:24:1567:1780 0 PHIX174 3716 37 28M1D8M * 0 0 TCATCAGCAAACGCAGAATCAGCGGTATGCTCTTCT IIIIIIIIIIIIIIIII;IIIIIII87IFII%I(@I. XT:A:U NM:i:1 X0:i:1 X1:i:0 XM:i:0 XO:i:1 XG:i:1 MD:Z:28^G8
+081017-and-081020:1:25:1466:511 16 PHIX174 1179 37 21M1D15M * 0 0 CTATTGACTCTACTGTAGACATTTTACTTTTTATGT :I<=IIIIII5IIGI5IIIIAIIIIIIIIIIIIIII XT:A:U NM:i:1 X0:i:1 X1:i:0 XM:i:0 XO:i:1 XG:i:1 MD:Z:21^T15
+081017-and-081020:1:27:1267:1275 0 PHIX174 3716 37 28M1D8M * 0 0 TCATCAGCAAACGCAGAATCAGCGGTATGCTCTTCT IIIIIIIIIIIIIIIII;IIIIIII87!II%I(@I. XT:A:U NM:i:1 X0:i:1 X1:i:0 XM:i:0 XO:i:1 XG:i:1 MD:Z:28^G8
+081017-and-081020:1:56:7924:8122 4 * 0 0 * * 0 0 GACCTGTGATCCATCGTGATGT CBBAB/$3BB<AB/,CBCABCA
+081017-and-081020:1:94:1649:147 16 PHIX174 2755 37 15M2D21M * 0 0 TATACCGTCAAGGACTGTGACTATTGACGTCCTTCC 4IIIIII@I7IIIIDEIIIIIIIIIIIIIIIIIIII XT:A:U NM:i:2 X0:i:1 X1:i:0 XM:i:0 XO:i:1 XG:i:2 MD:Z:15^TG21
+081017-and-081020:1:95:74:43 0 PHIX174 4038 37 29M3I4M * 0 0 ATCGAGGCTCTTAAACCTGCTATTGAGGCCCTTTTT IIIIIIIIIIIIIIIIICI;8I,I>II#####I1I% XT:A:U NM:i:2 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:1 MD:Z:31G3
+081017-and-081020:1:95:182:353 4 * 0 0 * * 0 0 GACCTGTGATCCATCGTGATGT CBBAB/$3BB<AB/,CBCABCA
081017-and-081020:1:95:58:307 16 PHIX174 3859 37 2M1I33M * 0 0 ACAAATGTCTGGAAAGACGGTAAAGCTGATGGTATT I&*IIIIIIII;IIIBIII>IICIIIIIIFII:III XT:A:U NM:i:2 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:1 MD:Z:5T29
--- a/test-data/sam_indel_filter_out1.sam
+++ b/test-data/sam_indel_filter_out1.sam
@@ -1,3 +1,4 @@
-1378_28_770 89 chr11.nib:1-134452384 72131356 37 17M1I5M = 72131356 0 CACACTGTGACAGACAGCGCAGC 00/02!!0//1200210AA44/1 XT:A:U CM:i:2 SM:i:37 AM:i:0 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:1 MD:Z:22
-1378_69_800 16 chr11.nib:1-125234658 241 255 15M1D8M * 0 0 CGTGGCCGGCGGGCCGAAGGCAT IIIIIIIIIICCCCIII?IIIII
-1378_72_1612 151 chrY.nib:1-124295114 190342418 37 19M1I3M = 190342418 0 TCTAACTTAGCCTCATAATAGCT /<<!"0/4//7//00/BC0121/ XT:A:U CM:i:2 SM:i:37 AM:i:0 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:1 MD:Z:22
+1378_28_770 89 chr11.nib:1-134452384 72131356 37 16M1I5M = 72131356 0 CACACTGTGACAGACAGCGCAGC 00/02!!0//1200210AA44/1 XT:A:U CM:i:2 SM:i:37 AM:i:0 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:1 MD:Z:22
+1378_56_324 153 chr2.nib:1-242951149 80324999 37 7M1I14M = 80324999 0 TTTAGCCCGAAATGCCTAGAGCA 4;?AA@@IE@GGI0110////00 XT:A:U CM:i:2 SM:i:37 AM:i:0 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:1 MD:Z:22
+1378_69_800 16 chr11.nib:1-125234658 241 255 14M1D8M * 0 0 CGTGGCCGGCGGGCCGAAGGCAT IIIIIIIIIICCCCIII?!IIII
+1378_72_1612 151 chrY.nib:1-124295114 190342418 37 18M1I3M = 190342418 0 TCTAACTTAGCCTCATAATAGCT /<<!"0/4//7//@@?BCIIIII XT:A:U CM:i:2 SM:i:37 AM:i:0 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:1 MD:Z:22
--- a/test-data/sam_indel_filter_out3.sam
+++ b/test-data/sam_indel_filter_out3.sam
@@ -1,10 +1,7 @@
-081017-and-081020:1:6:774:1836 0 PHIX174 4973 37 26M1I9M * 0 0 GCTTAAAGCTACCAGTTATATGGCTGTTTGGTTTTT IIIIIIIIIIIIIIIIIIIIII@III/IE;%II;I= XT:A:U NM:i:2 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:1 MD:Z:33C1
-081017-and-081020:1:6:1193:793 0 PHIX174 4971 37 27M1I8M * 0 0 CCGCTTAAAGCTACCAGTTATATGGCTGGTTGTTTT IIIIIIIIIIIIIII7IIIDIIIIIIII,=(>%II? XT:A:U NM:i:2 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:1 MD:Z:31G3
+081017-and-081020:1:6:774:1836 0 PHIX174 4973 37 26M1I9M * 0 0 GCTTAAAGCTACCAGTTATATGGCTGTTTGGTTTTT IIIIIIIIIIIIIIIIIIIIII@IIIDIE;%II;I= XT:A:U NM:i:2 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:1 MD:Z:33C1
081017-and-081020:1:8:753:970 0 PHIX174 2974 37 29M1I6M * 0 0 GTGGCGCCATGTCTAAATTGTTTGGAGGCGGGTCAA IIIIIIIIIIIIIIII4IIIIII3I&IIIII*%%&' XT:A:U NM:i:1 X0:i:1 X1:i:0 XM:i:0 XO:i:1 XG:i:1 MD:Z:35
-081017-and-081020:1:18:1164:1678 0 PHIX174 4971 37 27M1I8M * 0 0 CCGCTTAAAGCTACCAGTTATATGGCTGGTTGTTTT IIIIIIIIIIIIIIIIIIIII;IIII1I0I)II.I- XT:A:U NM:i:2 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:1 MD:Z:31G3
-081017-and-081020:1:20:754:1256 16 PHIX174 4772 37 4M1I31M * 0 0 CCCTGGCGGTGCATTTTATGCGGACACTTCCTACAG &II(IIIII3IIIII7II,IIIIIIIIIIIIIIIII XT:A:U NM:i:2 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:1 MD:Z:2A32
-081017-and-081020:1:24:1326:917 0 PHIX174 188 37 25M1D11M * 0 0 TTCGCCATCAACTAACGATTCTGTCAAACCTGACGC IIIIIIIIIIIIIIIIIIIIIIIIII2/&II>'IEI XT:A:U NM:i:2 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:1 MD:Z:25^A3A7
-081017-and-081020:1:25:1466:511 16 PHIX174 1179 37 21M1D15M * 0 0 CTATTGACTCTACTGTAGACATTTTACTTTTTATGT :I<=IIIIII5IIGI5IIIIIIIIIIIIIIIIIIII XT:A:U NM:i:1 X0:i:1 X1:i:0 XM:i:0 XO:i:1 XG:i:1 MD:Z:21^T15
-081017-and-081020:1:27:1267:1275 0 PHIX174 3716 37 28M1D8M * 0 0 TCATCAGCAAACGCAGAATCAGCGGTATGCTCTTCT IIIIIIIIIIIIIIIII;IIIIIII87III%I(@I. XT:A:U NM:i:1 X0:i:1 X1:i:0 XM:i:0 XO:i:1 XG:i:1 MD:Z:28^G8
-081017-and-081020:1:94:1649:147 16 PHIX174 2755 37 15M2D21M * 0 0 TATACCGTCAAGGACTGTGACTATTGACGTCCTTCC 4IIIIII@I7IIIIIIIIIIIIIIIIIIIIIIIIII XT:A:U NM:i:2 X0:i:1 X1:i:0 XM:i:0 XO:i:1 XG:i:2 MD:Z:15^TG21
-081017-and-081020:1:95:74:43 0 PHIX174 4038 37 29M1I6M * 0 0 ATCGAGGCTCTTAAACCTGCTATTGAGGCTTTTTGG IIIIIIIIIIIIIIIIICI;8I,I>IIIIII1I%5& XT:A:U NM:i:2 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:1 MD:Z:31G3
+081017-and-081020:1:20:754:1256 16 PHIX174 4772 37 4M1I31M * 0 0 CCCTGGCGGTGCATTTTATGCGGACACTTCCTACAG &IIII(III3IIIII7II,IIIIIIIIIIIIIIIII XT:A:U NM:i:2 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:1 MD:Z:2A32
+081017-and-081020:1:24:1326:917 0 PHIX174 188 37 25M1D11M * 0 0 TTCGCCATCAACTAACGATTCTGTCAAACCTGACGC IIIIIIIIIIIIIIIIIIIIIIIIIIA/&II>'IEI XT:A:U NM:i:2 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:1 MD:Z:25^A3A7
+081017-and-081020:1:24:1567:1780 0 PHIX174 3716 37 28M1D8M * 0 0 TCATCAGCAAACGCAGAATCAGCGGTATGCTCTTCT IIIIIIIIIIIIIIIII;IIIIIII87IFII%I(@I. XT:A:U NM:i:1 X0:i:1 X1:i:0 XM:i:0 XO:i:1 XG:i:1 MD:Z:28^G8
+081017-and-081020:1:25:1466:511 16 PHIX174 1179 37 21M1D15M * 0 0 CTATTGACTCTACTGTAGACATTTTACTTTTTATGT :I<=IIIIII5IIGI5IIIIAIIIIIIIIIIIIIII XT:A:U NM:i:1 X0:i:1 X1:i:0 XM:i:0 XO:i:1 XG:i:1 MD:Z:21^T15
+081017-and-081020:1:94:1649:147 16 PHIX174 2755 37 15M2D21M * 0 0 TATACCGTCAAGGACTGTGACTATTGACGTCCTTCC 4IIIIII@I7IIIIDEIIIIIIIIIIIIIIIIIIII XT:A:U NM:i:2 X0:i:1 X1:i:0 XM:i:0 XO:i:1 XG:i:2 MD:Z:15^TG21
--- a/test-data/sam_indel_filter_out2.sam
+++ b/test-data/sam_indel_filter_out2.sam
@@ -1,1 +1,1 @@
-1378_69_800 16 chr11.nib:1-125234658 241 255 15M1D8M * 0 0 CGTGGCCGGCGGGCCGAAGGCAT IIIIIIIIIICCCCIII?IIIII
+1378_56_324 153 chr2.nib:1-242951149 80324999 37 7M1I14M = 80324999 0 TTTAGCCCGAAATGCCTAGAGCA 4;?AA@@IE@GGI0110////00 XT:A:U CM:i:2 SM:i:37 AM:i:0 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:1 MD:Z:22
--- a/test-data/sam_indel_filter_in1.sam
+++ b/test-data/sam_indel_filter_in1.sam
@@ -1,15 +1,17 @@
-1378_28_770 89 chr11.nib:1-134452384 72131356 37 17M1I5M = 72131356 0 CACACTGTGACAGACAGCGCAGC 00/02!!0//1200210AA44/1 XT:A:U CM:i:2 SM:i:37 AM:i:0 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:1 MD:Z:22
+1378_28_770 89 chr11.nib:1-134452384 72131356 37 16M1I5M = 72131356 0 CACACTGTGACAGACAGCGCAGC 00/02!!0//1200210AA44/1 XT:A:U CM:i:2 SM:i:37 AM:i:0 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:1 MD:Z:22
1378_28_770 181 chr11.nib:1-134452384 72131356 0 13M2I6M1D5M = 72131356 0 TTGGTGCGCGCGGTTGAGGGTTGG $$(#%%#$%#%####$%%##$###
1378_33_1945 113 chr2.nib:1-242951149 181247988 0 23M chr12.nib:1-132349534 41710908 0 GAGAGAGAGAGAGAGAGAGAGAG PQRVUMNXYRPUXYXWXSOSZ]M XT:A:R CM:i:0 SM:i:0 AM:i:0 X0:i:163148 XM:i:0 XO:i:0 XG:i:0 MD:Z:23
1378_33_1945 177 chr12.nib:1-132349534 41710908 0 23M chr2.nib:1-242951149 181247988 0 AGAGAGAGAGAGAGAGAGAGAGA SQQWZYURVYWX]]YXTSY]]ZM XT:A:R CM:i:0 SM:i:0 AM:i:0 X0:i:163148 XM:i:0 XO:i:0 XG:i:0 MD:Z:23
1378_35_263 115 chr16.nib:1-88827254 19671878 0 23M = 19671877 -1 AGAGAGAGAGAGAGAGAGAGTCT 77543:<55#"4!&=964518A> XT:A:R CM:i:2 SM:i:0 AM:i:0 X0:i:4 X1:i:137 XM:i:2 XO:i:0 XG:i:0 MD:Z:23
1378_35_263 179 chr16.nib:1-88827254 19671877 0 13M1I4M1I5M = 19671878 1 GAGAGAGAGAGAGAGAGAGAGTC LE7402DD34FL:27AKE>;432 XT:A:R CM:i:0 SM:i:0 AM:i:0 X0:i:265 XM:i:0 XO:i:0 XG:i:0 MD:Z:23
+1378_35_469 4 * 0 0 * * 0 0 TTAAGGGGAACGTGTGGGCTATTTAGGCTTTATG BBB=?BBA?>;?=B=AA=;A@B>=;;>:A=?:?9
1378_51_1671 117 chr2.nib:1-242951149 190342418 0 24M = 190342418 0 CTGGCGTTCTCGGCGTGGATGGGT #####$$##$#%#%%###%$#$##
-1378_51_1671 153 chr2.nib:1-242951149 190342418 37 16M1I6M = 190342418 0 TCTAACTTAGCCTCATAATAGCT /<<!"0///////00/!!0121/ XT:A:U CM:i:2 SM:i:37 AM:i:0 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:1 MD:Z:22
+1378_51_1671 153 chr2.nib:1-242951149 190342418 37 15M1I6M = 190342418 0 TCTAACTTAGCCTCATAATAGCT /<<!"0///////00/!!0121/ XT:A:U CM:i:2 SM:i:37 AM:i:0 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:1 MD:Z:22
1378_56_324 117 chr2.nib:1-242951149 80324999 0 24M = 80324999 0 TCCAGTCGCGTTGTTAGGTTCGGA #$#$$$#####%##%%###**#+/
-1378_56_324 153 chr2.nib:1-242951149 80324999 37 8M1I14M = 80324999 0 TTTAGCCCGAAATGCCTAGAGCA 4;6//11!"11100110////00 XT:A:U CM:i:2 SM:i:37 AM:i:0 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:1 MD:Z:22
+1378_56_324 153 chr2.nib:1-242951149 80324999 37 7M1I14M = 80324999 0 TTTAGCCCGAAATGCCTAGAGCA 4;?AA@@IE@GGI0110////00 XT:A:U CM:i:2 SM:i:37 AM:i:0 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:1 MD:Z:22
1378_67_1795 81 chr16.nib:1-88827254 26739130 0 23M chrY.nib:1-57772954 57401793 0 TGGCATTCCTGTAGGCAGAGAGG AZWWZS]!"QNXZ]VQ]]]/2]] XT:A:R CM:i:2 SM:i:0 AM:i:0 X0:i:3 X1:i:0 XM:i:2 XO:i:0 XG:i:0 MD:Z:23
1378_67_1795 161 chrY.nib:1-57772954 57401793 37 23M chr16.nib:1-88827254 26739130 0 GATCACCCAGGTGATGTAACTCC ]WV]]]]WW]]]]]]]]]]PU]] XT:A:U CM:i:0 SM:i:37 AM:i:0 X0:i:1 X1:i:0 XM:i:0 XO:i:0 XG:i:0 MD:Z:23
-1378_69_800 16 chr11.nib:1-125234658 241 255 15M1D8M * 0 0 CGTGGCCGGCGGGCCGAAGGCAT IIIIIIIIIICCCCIII?IIIII
+1378_68_1186 4 * 0 0 * * 0 0 GTTAATAGGGTGATAGA AB/BC==CC%ACBC/CB
+1378_69_800 16 chr11.nib:1-125234658 241 255 14M1D8M * 0 0 CGTGGCCGGCGGGCCGAAGGCAT IIIIIIIIIICCCCIII?!IIII
1378_69_1777 170 chrX.nib:1-59090954 59090793 37 23M chr16.nib:1-88827254 26739130 0 TATCAATAAGGTGATGTAACTCG ]WV]ABAWW]]]]]P]P//GU]] XT:A:U CM:i:0 SM:i:37 AM:i:0 X0:i:1 X1:i:0 XM:i:0 XO:i:0 XG:i:0 MD:Z:23
-1378_72_1612 151 chrY.nib:1-124295114 190342418 37 19M1I3M = 190342418 0 TCTAACTTAGCCTCATAATAGCT /<<!"0/4//7//00/BC0121/ XT:A:U CM:i:2 SM:i:37 AM:i:0 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:1 MD:Z:22
+1378_72_1612 151 chrY.nib:1-124295114 190342418 37 18M1I3M = 190342418 0 TCTAACTTAGCCTCATAATAGCT /<<!"0/4//7//@@?BCIIIII XT:A:U CM:i:2 SM:i:37 AM:i:0 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:1 MD:Z:22
1
0

galaxy-dist commit db1ae0bc8995: Attempt to reduce costly queries in the job runner, especially when tracking jobs in the database.
by commits-noreply@bitbucket.org 23 Jul '10
by commits-noreply@bitbucket.org 23 Jul '10
23 Jul '10
# HG changeset patch -- Bitbucket.org
# Project galaxy-dist
# URL http://bitbucket.org/galaxy/galaxy-dist/overview
# User Nate Coraor <nate(a)bx.psu.edu>
# Date 1279818642 14400
# Node ID db1ae0bc8995cb30deef73ce9d14ef175c512f90
# Parent 79d38503db4d860f9c9d62560c156fb0a2122b1b
Attempt to reduce costly queries in the job runner, especially when tracking jobs in the database.
--- a/lib/galaxy/jobs/__init__.py
+++ b/lib/galaxy/jobs/__init__.py
@@ -18,7 +18,7 @@ from Queue import Queue, Empty
log = logging.getLogger( __name__ )
# States for running a job. These are NOT the same as data states
-JOB_WAIT, JOB_ERROR, JOB_INPUT_ERROR, JOB_INPUT_DELETED, JOB_OK, JOB_READY, JOB_DELETED, JOB_ADMIN_DELETED = 'wait', 'error', 'input_error', 'input_deleted', 'ok', 'ready', 'deleted', 'admin_deleted'
+JOB_WAIT, JOB_INPUT_ERROR, JOB_INPUT_DELETED, JOB_READY, JOB_DELETED, JOB_ADMIN_DELETED = 'wait', 'input_error', 'input_deleted', 'ready', 'deleted', 'admin_deleted'
# This file, if created in the job's working directory, will be used for
# setting advanced metadata properties on the job and its associated outputs.
@@ -106,14 +106,14 @@ class JobQueue( object ):
for job in self.sa_session.query( model.Job ).filter( model.Job.state == model.Job.states.NEW ):
if job.tool_id not in self.app.toolbox.tools_by_id:
log.warning( "Tool '%s' removed from tool config, unable to recover job: %s" % ( job.tool_id, job.id ) )
- JobWrapper( job, None, self ).fail( 'This tool was disabled before the job completed. Please contact your Galaxy administrator, or' )
+ JobWrapper( job, self ).fail( 'This tool was disabled before the job completed. Please contact your Galaxy administrator, or' )
else:
log.debug( "no runner: %s is still in new state, adding to the jobs queue" %job.id )
self.queue.put( ( job.id, job.tool_id ) )
for job in self.sa_session.query( model.Job ).filter( ( model.Job.state == model.Job.states.RUNNING ) | ( model.Job.state == model.Job.states.QUEUED ) ):
if job.tool_id not in self.app.toolbox.tools_by_id:
log.warning( "Tool '%s' removed from tool config, unable to recover job: %s" % ( job.tool_id, job.id ) )
- JobWrapper( job, None, self ).fail( 'This tool was disabled before the job completed. Please contact your Galaxy administrator, or' )
+ JobWrapper( job, self ).fail( 'This tool was disabled before the job completed. Please contact your Galaxy administrator, or' )
elif job.job_runner_name is None:
log.debug( "no runner: %s is still in queued state, adding to the jobs queue" %job.id )
if self.track_jobs_in_database:
@@ -121,7 +121,7 @@ class JobQueue( object ):
else:
self.queue.put( ( job.id, job.tool_id ) )
else:
- job_wrapper = JobWrapper( job, self.app.toolbox.tools_by_id[ job.tool_id ], self )
+ job_wrapper = JobWrapper( job, self )
self.dispatcher.recover( job, job_wrapper )
if self.sa_session.dirty:
self.sa_session.flush()
@@ -154,11 +154,12 @@ class JobQueue( object ):
# Pull all new jobs from the queue at once
new_jobs = []
if self.track_jobs_in_database:
- for j in self.sa_session.query( model.Job ) \
+ # Clear the session so we get fresh states for job and all datasets
+ self.sa_session.expunge_all()
+ # Fetch all new jobs
+ new_jobs = self.sa_session.query( model.Job ) \
.options( lazyload( "external_output_metadata" ), lazyload( "parameters" ) ) \
- .filter( model.Job.state == model.Job.states.NEW ):
- job = JobWrapper( j, self.app.toolbox.tools_by_id[ j.tool_id ], self )
- new_jobs.append( job )
+ .filter( model.Job.state == model.Job.states.NEW ).all()
else:
try:
while 1:
@@ -168,8 +169,7 @@ class JobQueue( object ):
# Unpack the message
job_id, tool_id = message
# Create a job wrapper from it
- job_entity = self.sa_session.query( model.Job ).get( job_id )
- job = JobWrapper( job_entity, self.app.toolbox.tools_by_id[ tool_id ], self )
+ job = self.sa_session.query( model.Job ).get( job_id )
# Append to watch queue
new_jobs.append( job )
except Empty:
@@ -179,52 +179,43 @@ class JobQueue( object ):
new_waiting = []
for job in ( new_jobs + self.waiting ):
try:
- # Clear the session for each job so we get fresh states for
- # job and all datasets
- self.sa_session.expunge_all()
- # Get the real job entity corresponding to the wrapper (if we
- # are tracking in the database this is probably cached in
- # the session from the origianl query above)
- job_entity = self.sa_session.query( model.Job ).get( job.job_id )
+ # Since we don't expunge when not tracking jobs in the
+ # database, refresh the job here so it's not stale.
+ if not self.track_jobs_in_database:
+ self.sa_session.refresh( job )
# Check the job's dependencies, requeue if they're not done
- job_state = self.__check_if_ready_to_run( job, job_entity )
- if job_state == JOB_WAIT:
+ job_state = self.__check_if_ready_to_run( job )
+ if job_state == JOB_WAIT:
if not self.track_jobs_in_database:
new_waiting.append( job )
- elif job_state == JOB_ERROR:
- log.info( "job %d ended with an error" % job.job_id )
elif job_state == JOB_INPUT_ERROR:
- log.info( "job %d unable to run: one or more inputs in error state" % job.job_id )
+ log.info( "job %d unable to run: one or more inputs in error state" % job.id )
elif job_state == JOB_INPUT_DELETED:
- log.info( "job %d unable to run: one or more inputs deleted" % job.job_id )
+ log.info( "job %d unable to run: one or more inputs deleted" % job.id )
elif job_state == JOB_READY:
if self.job_lock:
- log.info("Job dispatch attempted for %s, but prevented by administrative lock." % job.job_id)
+ log.info( "Job dispatch attempted for %s, but prevented by administrative lock." % job.id )
if not self.track_jobs_in_database:
new_waiting.append( job )
else:
- self.dispatcher.put( job )
- log.debug( "job %d dispatched" % job.job_id)
+ self.dispatcher.put( JobWrapper( job, self ) )
+ log.info( "job %d dispatched" % job.id )
elif job_state == JOB_DELETED:
- msg = "job %d deleted by user while still queued" % job.job_id
- job.info = msg
- log.debug( msg )
+ log.info( "job %d deleted by user while still queued" % job.id )
elif job_state == JOB_ADMIN_DELETED:
- job.fail( job_entity.info )
- log.info( "job %d deleted by admin while still queued" % job.job_id )
+ job.info( "job %d deleted by admin while still queued" % job.id )
else:
- msg = "unknown job state '%s' for job %d" % ( job_state, job.job_id )
- job.info = msg
- log.error( msg )
+ log.error( "unknown job state '%s' for job %d" % ( job_state, job.id ) )
+ if not self.track_jobs_in_database:
+ new_waiting.append( job )
except Exception, e:
- job.info = "failure running job %d: %s" % ( job.job_id, str( e ) )
- log.exception( "failure running job %d" % job.job_id )
+ log.exception( "failure running job %d" % job.id )
# Update the waiting list
self.waiting = new_waiting
# Done with the session
self.sa_session.remove()
- def __check_if_ready_to_run( self, job_wrapper, job ):
+ def __check_if_ready_to_run( self, job ):
"""
Check if a job is ready to run by verifying that each of its input
datasets is ready (specifically in the OK state). If any input dataset
@@ -244,11 +235,11 @@ class JobQueue( object ):
continue
# don't run jobs for which the input dataset was deleted
if idata.deleted:
- job_wrapper.fail( "input data %d (file: %s) was deleted before the job started" % ( idata.hid, idata.file_name ) )
+ JobWrapper( job, self ).fail( "input data %d (file: %s) was deleted before the job started" % ( idata.hid, idata.file_name ) )
return JOB_INPUT_DELETED
# an error in the input data causes us to bail immediately
elif idata.state == idata.states.ERROR:
- job_wrapper.fail( "input data %d is in error state" % ( idata.hid ) )
+ JobWrapper( job, self ).fail( "input data %d is in error state" % ( idata.hid ) )
return JOB_INPUT_ERROR
elif idata.state != idata.states.OK and not ( idata.state == idata.states.SETTING_METADATA and job.tool_id is not None and job.tool_id == self.app.datatypes_registry.set_external_metadata_tool.id ):
# need to requeue
@@ -280,11 +271,11 @@ class JobWrapper( object ):
Wraps a 'model.Job' with convience methods for running processes and
state management.
"""
- def __init__(self, job, tool, queue ):
+ def __init__( self, job, queue ):
self.job_id = job.id
self.session_id = job.session_id
self.user_id = job.user_id
- self.tool = tool
+ self.tool = queue.app.toolbox.tools_by_id.get( job.tool_id, None )
self.queue = queue
self.app = queue.app
self.sa_session = self.app.model.context
--- a/lib/galaxy/tools/actions/__init__.py
+++ b/lib/galaxy/tools/actions/__init__.py
@@ -5,7 +5,6 @@ from galaxy.tools.parameters.grouping im
from galaxy.util.template import fill_template
from galaxy.util.none_like import NoneDataset
from galaxy.web import url_for
-from galaxy.jobs import JOB_OK
import galaxy.tools
from types import *
@@ -353,7 +352,7 @@ class DefaultToolAction( object ):
assert GALAXY_URL is not None, "GALAXY_URL parameter missing in tool config."
redirect_url += "&GALAXY_URL=%s" % GALAXY_URL
# Job should not be queued, so set state to ok
- job.state = JOB_OK
+ job.state = trans.app.model.Job.states.OK
job.info = "Redirected to: %s" % redirect_url
trans.sa_session.add( job )
trans.sa_session.flush()
1
0

galaxy-dist commit 3ce0b7c2b008: Add patch to from Assaf Gordon to include job runner and job runner id on the job info page of the reports.
by commits-noreply@bitbucket.org 23 Jul '10
by commits-noreply@bitbucket.org 23 Jul '10
23 Jul '10
# HG changeset patch -- Bitbucket.org
# Project galaxy-dist
# URL http://bitbucket.org/galaxy/galaxy-dist/overview
# User Greg Von Kuster <greg(a)bx.psu.edu>
# Date 1279804702 14400
# Node ID 3ce0b7c2b0083ad37fb6b11679632675a8aea043
# Parent ebc01826650f07ee5a5d1a8ef61e7c2dccc56494
Add patch to from Assaf Gordon to include job runner and job runner id on the job info page of the reports.
--- a/templates/webapps/reports/job_info.mako
+++ b/templates/webapps/reports/job_info.mako
@@ -29,18 +29,22 @@
<td>${job.session_id}</td></tr><tr class="header">
- <td colspan="3">Tool</td>
- <td colspan="2">User</td>
+ <td colspan="2">Tool</td>
+ <td>User</td>
+ <td>Runner</td>
+ <td>Runner Id</td></tr><tr>
- <td colspan="3">${job.tool_id}</td>
- <td colspan="2">
+ <td colspan="2">${job.tool_id}</td>
+ <td>
%if job.user and job.user.email:
${job.user.email}
%else:
anonymous
%endif
</td>
+ <td>${job.job_runner_name}</td>
+ <td>${job.job_runner_external_id}</td></tr><tr class="header"><td colspan="5">Remote Host</td>
1
0

galaxy-dist commit 79d38503db4d: First selenium test for trackster
by commits-noreply@bitbucket.org 23 Jul '10
by commits-noreply@bitbucket.org 23 Jul '10
23 Jul '10
# HG changeset patch -- Bitbucket.org
# Project galaxy-dist
# URL http://bitbucket.org/galaxy/galaxy-dist/overview
# User Kanwei Li <kanwei(a)gmail.com>
# Date 1279808223 14400
# Node ID 79d38503db4d860f9c9d62560c156fb0a2122b1b
# Parent 3ce0b7c2b0083ad37fb6b11679632675a8aea043
First selenium test for trackster
--- /dev/null
+++ b/test/selenium/visualization/Trackster.html
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head profile="http://selenium-ide.openqa.org/profiles/test-case">
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<link rel="selenium.base" href="http://localhost:8000/" />
+<title>New Browser</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">New Browser</td></tr>
+</thead><tbody>
+<tr>
+ <td>open</td>
+ <td>/visualization/list</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>link=New Track Browser</td>
+ <td></td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>new-title</td>
+ <td>Test</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>new-dbkey</td>
+ <td>Human Mar. 2006 (NCBI36/hg18) (hg18)</td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>//div[@id='overlay']/table/tbody/tr/td/div/div/div[3]/div[1]/button[2]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>verifyTextPresent</td>
+ <td>Test (hg18)</td>
+ <td></td>
+</tr>
+<tr>
+ <td>select</td>
+ <td>chrom</td>
+ <td>label=chr21</td>
+</tr>
+<tr>
+ <td>verifyValue</td>
+ <td>//div[@id='center']/div[3]/div[2]/div[2]/form/input[1]</td>
+ <td>0</td>
+</tr>
+<tr>
+ <td>verifyValue</td>
+ <td>//div[@id='center']/div[3]/div[2]/div[2]/form/input[2]</td>
+ <td>46,944,323</td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
1
0

galaxy-dist commit ebc01826650f: Fix tool_form.mako which I broke in 4045:8ffcaf3d9a0c
by commits-noreply@bitbucket.org 23 Jul '10
by commits-noreply@bitbucket.org 23 Jul '10
23 Jul '10
# HG changeset patch -- Bitbucket.org
# Project galaxy-dist
# URL http://bitbucket.org/galaxy/galaxy-dist/overview
# User Nate Coraor <nate(a)bx.psu.edu>
# Date 1279745173 14400
# Node ID ebc01826650f07ee5a5d1a8ef61e7c2dccc56494
# Parent 1acae496c2200747aa79e7ac52cce74f5a3a3c83
Fix tool_form.mako which I broke in 4045:8ffcaf3d9a0c
--- a/templates/tool_form.mako
+++ b/templates/tool_form.mako
@@ -215,7 +215,7 @@ function checkUncheckAll( name, check )
<div class="toolFormTitle">${tool.name}</div>
%endif
<div class="toolFormBody">
- <form id="tool_form" name="tool_form" action="${tool_url}" enctype="${tool.enctype}" target="${tool.target}" method="${tool.method}"><input type="hidden" name="tool_id" value="${tool.id}"><input type="hidden" name="tool_state" value="${util.object_to_string( tool_state.encode( tool, app ) )}">
+ <form id="tool_form" name="tool_form" action="${tool_url}" enctype="${tool.enctype}" target="${tool.target}" method="${tool.method}"><input type="hidden" name="tool_id" value="${tool.id}"><input type="hidden" name="tool_state" value="${util.object_to_string( tool_state.encode( tool, app ) )}">
%if tool.display_by_page[tool_state.page]:
1
0

galaxy-dist commit 95491a8e9e1b: lims: fixed lims documentation link
by commits-noreply@bitbucket.org 23 Jul '10
by commits-noreply@bitbucket.org 23 Jul '10
23 Jul '10
# HG changeset patch -- Bitbucket.org
# Project galaxy-dist
# URL http://bitbucket.org/galaxy/galaxy-dist/overview
# User rc
# Date 1279735164 14400
# Node ID 95491a8e9e1bca9267ec5830ac5df2a6d30ed915
# Parent a37b8a979f7d0d040527413695c5828d22ca5e54
lims: fixed lims documentation link
--- a/templates/webapps/galaxy/base_panels.mako
+++ b/templates/webapps/galaxy/base_panels.mako
@@ -42,7 +42,7 @@
<div class="submenu"><ul><li><a href="${h.url_for( controller='/requests', action='index' )}">Sequencing Requests</a></li>
- <li><a target="_blank" href="${app.config.get( "lims_doc_url", "http://main.g2.bx.psu.edu/u/rc/p/sts" )}">Help</a></li>
+ <li><a target="_blank" href="${app.config.get( "lims_doc_url", "http://main.g2.bx.psu.edu/u/rkchak/p/sts" )}">Help</a></li></ul></div></td>
1
0

galaxy-dist commit 1dc82a345db2: Updated indel analysis tools: fixed counting bugs in indel_analysis and improved help section; standardized CIGAR regex across tools; updated test files for several tools
by commits-noreply@bitbucket.org 23 Jul '10
by commits-noreply@bitbucket.org 23 Jul '10
23 Jul '10
# HG changeset patch -- Bitbucket.org
# Project galaxy-dist
# URL http://bitbucket.org/galaxy/galaxy-dist/overview
# User Kelly Vincent <kpvincent(a)bx.psu.edu>
# Date 1279743946 14400
# Node ID 1dc82a345db24860b31b73624030fa2644c18d38
# Parent 95491a8e9e1bca9267ec5830ac5df2a6d30ed915
Updated indel analysis tools: fixed counting bugs in indel_analysis and improved help section; standardized CIGAR regex across tools; updated test files for several tools
--- a/test-data/indel_analysis_out1.interval
+++ b/test-data/indel_analysis_out1.interval
@@ -1,4 +1,7 @@
-ref 10 11 1 1 9.09
-ref 12 14 2 1 7.69
-ref 13 14 1 1 7.69
-ref 18 20 2 1 8.33
+chr1 11 13 1 100.00
+chr1 21 22 1 25.00
+chr1 21 23 1 25.00
+chrM 16 18 1 9.09
+chrM 19 20 1 8.33
+chrM 21 22 1 9.09
+chrM 22 23 1 9.09
--- a/tools/indels/indel_sam2interval.xml
+++ b/tools/indels/indel_sam2interval.xml
@@ -1,5 +1,5 @@
-<tool id="indel_sam2interval" name="Convert SAM to interval/BED" version="1.0.0">
- <description>for indels</description>
+<tool id="indel_sam2interval" name="Extract indels" version="1.0.0">
+ <description>from SAM</description><command interpreter="python">
indel_sam2interval.py
--input=$input1
@@ -30,7 +30,7 @@
<when value="false" /></conditional><conditional name="del_out">
- <param name="include_del_out" type="select" label="Include insertions output bed file?">
+ <param name="include_del_out" type="select" label="Include deletions output bed file?"><option value="true">Yes</option><option value="false">No</option></param>
@@ -41,10 +41,10 @@
<outputs><data format="interval" name="output1" /><data format="bed" name="output2">
- <filter>ins_out[ "include_ins_out" ] = "true"</filter>
+ <filter>ins_out[ "include_ins_out" ] == "true"</filter></data><data format="bed" name="output3">
- <filter>del_out[ "include_del_out" ] = "true"</filter>
+ <filter>del_out[ "include_del_out" ] == "true"</filter></data></outputs><tests>
@@ -69,48 +69,66 @@ Given a SAM file containing indels, conv
**Example**
-Suppose you have the following::
+Suppose you have the following mapping results::
- r770 89 ref 116 37 17M1I5M = 72131356 0 CACACTGTGACAGACAGCGCAGC 00/02!!0//1200210AA44/1 XT:A:U CM:i:2 SM:i:37 AM:i:0 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:1 MD:Z:22
- r780 181 ref 4567 0 24M = 72131356 0 TTGGTGCGCGCGGTTGAGGGTTGG $$(#%%#$%#%####$%%##$### XT:A:U CM:i:2 SM:i:37 AM:i:0 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:1 MD:Z:22
- r1231 69 * 0 0 * * 0 0 AGACCGGGCGGGGTGGCGTTCGGT %##+'#######%###$#$##$(#
- r1563 133 * 0 0 * * 0 0 GTTCGTGGCCGGTGGGTGTTTGGG ###$$#$#$&#####$'$#$###$
- r1945 177 ref 71908 0 23M 190342418 181247988 0 AGAGAGAGAGAGAGAGAGAGAGA SQQWZYURVYWX]]YXTSY]]ZM XT:A:R CM:i:0 SM:i:0 AM:i:0 X0:i:163148 XM:i:0 XO:i:0 XG:i:0 MD:Z:23
- r3671 117 ref 31903418 0 24M = 190342418 0 CTGGCGTTCTCGGCGTGGATGGGT #####$$##$#%#%%###%$#$## XT:A:U CM:i:2 SM:i:37 AM:i:0 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:1 MD:Z:22
- r3673 153 ref 48819768 37 16M1I6M = 190342418 0 TCTAACTTAGCCTCATAATAGCT /<<!"0///////00/!!0121/ XT:A:U CM:i:2 SM:i:37 AM:i:0 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:1 MD:Z:22
- r3824 117 ref 80729921 0 24M = 80324999 0 TCCAGTCGCGTTGTTAGGTTCGGA #$#$$$#####%##%%###**#+/ XT:A:U CM:i:2 SM:i:37 AM:i:0 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:1 MD:Z:22
- r3911 153 ref 87824718 37 8M1I14M = 80324999 0 TTTAGCCCGAAATGCCTAGAGCA 4;6//11!"11100110////00 XT:A:U CM:i:2 SM:i:37 AM:i:0 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:1 MD:Z:22
- r4795 81 ref 126739130 0 23M 57401793 57401793 0 TGGCATTCCTGTAGGCAGAGAGG AZWWZS]!"QNXZ]VQ]]]/2]] XT:A:R CM:i:2 SM:i:0 AM:i:0 X0:i:3 X1:i:0 XM:i:2 XO:i:0 XG:i:0 MD:Z:23
- r4797 161 ref 57401793 37 23M 26739130 26739130 0 GATCACCCAGGTGATGTAACTCC ]WV]]]]WW]]]]]]]]]]PU]] XT:A:U CM:i:0 SM:i:37 AM:i:0 X0:i:1 X1:i:0 XM:i:0 XO:i:0 XG:i:0 MD:Z:23
- r4800 16 ref 241 255 15M2D8M = 1550 0 CGTGGCCGGCGGGCCGAAGGCAT IIIIIIIIIICCCCIII?IIIII XT:A:U CM:i:2 SM:i:37 AM:i:0 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:1 MD:Z:22
- r5377 170 ref 52090793 37 23M 26739130 26739130 0 TATCAATAAGGTGATGTAACTCG ]WV]ABAWW]]]]]P]P//GU]] XT:A:U CM:i:0 SM:i:37 AM:i:0 X0:i:1 X1:i:0 XM:i:0 XO:i:0 XG:i:0 MD:Z:23
- r5612 151 ref 190341152 37 19M1D4M = 190342418 0 TCTAACTTAGCCTCATAATGCTAA /<<!"0/4/*/7//00/BC0121/ XT:A:U CM:i:2 SM:i:37 AM:i:0 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:1 MD:Z:22
- r5623 151 ref 188841418 37 19M1I3M = 190342418 0 TCTAACTTAGCCTCATAATAGCT /<<!"0/4//7//00/BC0121/ XT:A:U CM:i:2 SM:i:37 AM:i:0 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:1 MD:Z:22
- r7899 69 * 0 0 * * 0 0 CTGCGTGTTGGTGTCTACTGGGGT #%#'##$#$##&%#%$$$%#%#'#
- r9192 133 * 0 0 * * 0 0 GTGCGTCGGGGAGGGTGCTGTCGG ######%#$%#$$###($###&&%
+ r327 16 chrM 11 37 8M1D10M * 0 0 CTTACCAGATAGTCATCA -+<2;?@BA@?-,.+4=4 XT:A:U NM:i:1 X0:i:1 X1:i:0 XM:i:0 XO:i:1 XG:i:1 MD:Z:41^C35
+ r457 0 chr1 14 37 14M * 0 0 ACCTGACAGATATC =/DF;?@1A@?-,. XT:A:U NM:i:0 X0:i:1 X1:i:0 XM:i:0 XO:i:0 XG:i:0 MD:Z:76
+ r501 16 chrM 6 23 7M1I13M * 0 0 TCTGTGCCTACCAGACATTCA +=$2;?@BA@?-,.+4=4=4A XT:A:U NM:i:3 X0:i:1 X1:i:1 XM:i:2 XO:i:1 XG:i:1 MD:Z:28C36G9 XA:Z:chrM,+134263658,14M1I61M,4;
+ r1288 16 chrM 8 37 11M1I7M * 0 0 TCACTTACCTGTACACACA /*F2;?@%A@?-,.+4=4= XT:A:U NM:i:4 X0:i:1 X1:i:0 XM:i:3 XO:i:1 XG:i:1 MD:Z:2T0T1A69
+ r1902 0 chr1 4 37 7M2D18M * 0 0 AGTCTCTTACCTGACGGTTATGA <2;?@BA@?-,.+4=4=4AA663 XT:A:U NM:i:3 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:2 MD:Z:17^CA58A0
+ r2204 16 chrM 9 0 19M * 0 0 CTGGTACCTGACAGGTATC 2;?@BA@?-,.+4=4=4AA XT:A:R NM:i:1 X0:i:2 X1:i:0 XM:i:1 XO:i:0 XG:i:0 MD:Z:0T75 XA:Z:chrM,-564927,76M,1;
+ r2314 16 chrM 6 37 10M2D8M * 0 0 TCACTCTTACGTCTGA <2;?@BA@?-,.+4=4 XT:A:U NM:i:3 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:2 MD:Z:25A5^CA45
+ r3001 0 chrM 13 37 3M1D5M2I7M * 0 0 TACAGTCACCCTCATCA <2;?@BA/(@?-,$& XT:A:U NM:i:3 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:2 MD:Z:17^CA58A0
+ r3218 0 chr1 13 37 8M1D7M * 0 0 TACAGTCACTCATCA <2;?@BA/(@?-,$& XT:A:U NM:i:3 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:2 MD:Z:17^CA58A0
+ r4767 16 chr2 3 37 15M2I7M * 0 0 CAGACTCTCTTACCAAAGACAGAC <2;?@BA/(@?-,.+4=4=4AA66 XT:A:U NM:i:4 X0:i:1 X1:i:0 XM:i:3 XO:i:1 XG:i:1 MD:Z:2T1A4T65
+ r5333 0 chrM 5 37 17M1D8M * 0 0 GTCTCTCATACCAGACAACGGCAT FB3$@BA/(@?-,.+4=4=4AA66 XT:A:U NM:i:4 X0:i:1 X1:i:0 XM:i:3 XO:i:1 XG:i:1 MD:Z:45C10^C0C5C13
+ r6690 16 chrM 7 23 20M * 0 0 CTCTCTTACCAGACAGACAT 2;?@BA/(@?-,.+4=4=4A XT:A:U NM:i:0 X0:i:1 X1:i:1 XM:i:0 XO:i:0 XG:i:0 MD:Z:76 XA:Z:chrM,-568532,76M,1;
+ r7211 0 chrM 7 37 24M * 0 0 CGACAGAGACAAAATAACATTTAA //<2;?@BA@?-,.+4=442;;6: XT:A:U NM:i:3 X0:i:1 X1:i:0 XM:i:2 XO:i:1 XG:i:1 MD:Z:73G0G0
+ r7899 69 * 0 0 * * 0 0 CTGCGTGTTGGTGTCTACTGGGGT #%#'##$#$##&%#%$$$%#%#'#
+ r9192 133 * 0 0 * * 0 0 GTGCGTCGGGGAGGGTGCTGTCGG ######%#$%#$$###($###&&%
+ r9922 16 chrM 4 0 7M3I9M * 0 0 CCAGACATTTGAAATCAGG F/D4=44^D++26632;;6 XT:A:U NM:i:0 X0:i:1 X1:i:1 XM:i:0 XO:i:0 XG:i:0 MD:Z:76
+ r9987 16 chrM 4 0 9M1I18M * 0 0 AGGTTCTCATTACCTGACACTCATCTTG G/AD6"/+4=4426632;;6:<2;?@BA XT:A:U NM:i:0 X0:i:1 X1:i:1 XM:i:0 XO:i:0 XG:i:0 MD:Z:76
+ r10145 16 chr1 16 0 5M2D7M * 0 0 CACATTGTTGTA G//+4=44=4AA XT:A:U NM:i:0 X0:i:1 X1:i:1 XM:i:0 XO:i:0 XG:i:0 MD:Z:76
+ r10324 16 chrM 15 0 6M1D5M * 0 0 CCGTTCTACTTG A(a)??8.G//+4= XT:A:U NM:i:0 X0:i:1 X1:i:1 XM:i:0 XO:i:0 XG:i:0 MD:Z:76
+ r12331 16 chrM 17 0 4M2I6M * 0 0 AGTCGAATACGTG 632;;6:<2;?@B XT:A:U NM:i:0 X0:i:1 X1:i:1 XM:i:0 XO:i:0 XG:i:0 MD:Z:76
+ r12914 16 chr2 24 0 4M3I3M * 0 0 ACTACCCCAA G//+4=42,. XT:A:U NM:i:0 X0:i:1 X1:i:1 XM:i:0 XO:i:0 XG:i:0 MD:Z:76
+ r13452 16 chrM 13 0 3M1D11M * 0 0 TACGTCACTCATCA IIIABCCCICCCCI XT:A:U NM:i:0 X0:i:1 X1:i:1 XM:i:0 XO:i:0 XG:i:0 MD:Z:76
The following three files will be produced (Interval, Insertions BED and Deletions BED)::
- ref 133 134 I C 1
- ref 256 258 D - 1
- ref 48819784 48819785 I A 1
- ref 87824726 87824727 I G 1
- ref 188841437 188841419 I T 1
- ref 190341171 190341172 D - 1
+ chr1 11 13 D - 1
+ chr1 21 22 D - 1
+ chr1 21 23 D - 1
+ chr2 18 19 I AA 1
+ chr2 28 29 I CCC 1
+ chrM 11 12 I TTT 1
+ chrM 13 14 I C 1
+ chrM 13 14 I T 1
+ chrM 16 17 D - 1
+ chrM 16 18 D - 1
+ chrM 19 20 D - 1
+ chrM 19 20 I T 1
+ chrM 21 22 D - 1
+ chrM 21 22 I GA 1
+ chrM 22 23 D - 1
- ref 133 134
- ref 48819784 48819785
- ref 87824726 87824727
- ref 188841437 188841419
+ chr2 18 19
+ chr2 28 29
+ chrM 11 12
+ chrM 13 14
+ chrM 13 14
+ chrM 19 20
+ chrM 21 22
- ref 256 258
- ref 190341171 190341172
-
-
-
-
-
+ chr1 11 13
+ chr1 21 22
+ chr1 21 23
+ chrM 16 17
+ chrM 16 18
+ chrM 19 20
+ chrM 21 22
+ chrM 22 23
For more information on SAM, please consult the `SAM format description`__.
--- a/tools/indels/indel_sam2interval.py
+++ b/tools/indels/indel_sam2interval.py
@@ -72,11 +72,11 @@ def __main__():
output_bed_del = None
# the pattern to match, assuming just one indel per cigar string
- pat_indel = re.compile( '(?P<lmatch>\d+)M(?P<ins_del_width>\d+)(?P<ins_del>[ID])(?P<rmatch>\d+)M' )
+ pat_indel = re.compile( '^(?P<lmatch>\d+)M(?P<ins_del_width>\d+)(?P<ins_del>[ID])(?P<rmatch>\d+)M$' )
pat_multi = re.compile( '(\d+[MIDNSHP])(\d+[MIDNSHP])(\d+[MIDNSHP])+' )
# go through all lines in input file
- out_data = []
+ out_data = {}
multi_indel_lines = 0
for line in open( options.input, 'rb' ):
if line and not line.startswith( '#' ) and not line.startswith( '@' ) :
@@ -84,14 +84,14 @@ def __main__():
if split_line < 12:
continue
# grab relevant pieces
- cigar = split_line[5]
+ cigar = split_line[5].strip()
pos = int( split_line[3] )
chr = split_line[2]
base_string = split_line[9]
# parse cigar string
- m = pat_indel.search( cigar )
+ m = pat_indel.match( cigar )
if not m:
- m = pat_multi.search( cigar )
+ m = pat_multi.match( cigar )
# skip this line if no match
if not m:
continue
@@ -109,37 +109,43 @@ def __main__():
start = left + pos
if middle_type == 'D':
end = start + middle
- d = [ chr, start, end, 'D' ]
+ data = [ chr, start, end, 'D' ]
if options.include_base == "true":
- d.append( '-' )
- out_data.append( tuple( d ) )
- if output_bed_del:
- output_bed_del.write( '%s\t%s\t%s\n' % ( chr, start, end ) )
+ data.append( '-' )
else:
- end = start + 1#+ middle
- d = [ chr, start, end, 'I' ]
+ end = start + 1
+ data = [ chr, start, end, 'I' ]
if options.include_base == "true":
- d.append( bases )
- out_data.append( tuple( d ) )
- if output_bed_ins:
- output_bed_ins.write( '%s\t%s\t%s\n' % ( chr, start, end ) )
+ data.append( bases )
+ location = '\t'.join( [ '%s' % d for d in data ] )
+ try:
+ out_data[ location ] += 1
+ except KeyError:
+ out_data[ location ] = 1
# output to interval file
- if options.collapse == 'true':
- out_dict = {}
- # first collapse and get counts
- for data in out_data:
- location = ' '.join( [ '%s' % d for d in data ] )
- try:
- out_dict[ location ].append( data )
- except KeyError:
- out_dict[ location ] = [ data ]
- locations = out_dict.keys()
- locations.sort( numeric_sort )
- for loc in locations:
- output.write( '%s\t%s\n' % ( '\t'.join( [ '%s' % d for d in out_dict[ loc ][0] ] ), len( out_dict[ loc ] ) ) )
- else:
- for data in out_data:
- output.write( '%s\n' % '\t'.join( [ '%s' % d for d in data ] ) )
+ # get all locations and sort
+ locations = out_data.keys()
+ locations.sort( numeric_sort )
+ last_line = ''
+ # output each location, either with counts or each occurrence
+ for loc in locations:
+ sp_loc = loc.split( '\t' )
+ cur_line = '\t'.join( sp_loc[:3] )
+ if options.collapse == 'true':
+ output.write( '%s\t%s\n' % ( loc, out_data[ loc ] ) )
+ if output_bed_del and sp_loc[3] == 'D':
+ output_bed_del.write( '%s\n' % cur_line )
+ if output_bed_ins and sp_loc[3] == 'I' and last_line != cur_line:
+ output_bed_ins.write( '%s\n' % cur_line )
+ last_line = cur_line
+ else:
+ for i in range( out_data[ loc ] ):
+ output.write( '%s\n' % loc )
+ if output_bed_del or output_bed_ins:
+ if output_bed_del and sp_loc[3] == 'D':
+ output_bed_del.write( '%s\n' % cur_line )
+ if output_bed_ins and sp_loc[3] == 'I':
+ output_bed_ins.write( '%s\n' % cur_line )
# cleanup, close files
if output_bed_ins:
@@ -150,6 +156,6 @@ def __main__():
# if skipped lines because of more than one indel, output message
if multi_indel_lines > 0:
- sys.stdout.write( '%s alignments were skipped because they contained more than one indel or had unhandled operations (N/S/H/P).' % multi_indel_lines )
+ sys.stdout.write( '%s alignments were skipped because they contained more than one indel.' % multi_indel_lines )
if __name__=="__main__": __main__()
--- a/test-data/indel_sam2interval_in1.sam
+++ b/test-data/indel_sam2interval_in1.sam
@@ -1,17 +1,24 @@
-r770 89 ref 116 37 17M1I5M = 72131356 0 CACACTGTGACAGACAGCGCAGC 00/02!!0//1200210AA44/1 XT:A:U CM:i:2 SM:i:37 AM:i:0 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:1 MD:Z:22
-r780 181 ref 4567 0 24M = 72131356 0 TTGGTGCGCGCGGTTGAGGGTTGG $$(#%%#$%#%####$%%##$### XT:A:U CM:i:2 SM:i:37 AM:i:0 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:1 MD:Z:22
+r327 16 chrM 11 37 8M1D10M * 0 0 CTTACCAGATAGTCATCA -+<2;?@BA@?-,.+4=4 XT:A:U NM:i:1 X0:i:1 X1:i:0 XM:i:0 XO:i:1 XG:i:1 MD:Z:41^C35
+r457 0 chr1 14 37 14M * 0 0 ACCTGACAGATATC =/DF;?@1A@?-,. XT:A:U NM:i:0 X0:i:1 X1:i:0 XM:i:0 XO:i:0 XG:i:0 MD:Z:76
+r501 16 chrM 6 23 7M1I13M * 0 0 TCTGTGCCTACCAGACATTCA +=$2;?@BA@?-,.+4=4=4A XT:A:U NM:i:3 X0:i:1 X1:i:1 XM:i:2 XO:i:1 XG:i:1 MD:Z:28C36G9 XA:Z:chrM,+134263658,14M1I61M,4;
r1231 69 * 0 0 * * 0 0 AGACCGGGCGGGGTGGCGTTCGGT %##+'#######%###$#$##$(#
+r1288 16 chrM 8 37 11M1I7M * 0 0 TCACTTACCTGTACACACA /*F2;?@%A@?-,.+4=4= XT:A:U NM:i:4 X0:i:1 X1:i:0 XM:i:3 XO:i:1 XG:i:1 MD:Z:2T0T1A69
r1563 133 * 0 0 * * 0 0 GTTCGTGGCCGGTGGGTGTTTGGG ###$$#$#$&#####$'$#$###$
-r1945 177 ref 71908 0 23M 190342418 181247988 0 AGAGAGAGAGAGAGAGAGAGAGA SQQWZYURVYWX]]YXTSY]]ZM XT:A:R CM:i:0 SM:i:0 AM:i:0 X0:i:163148 XM:i:0 XO:i:0 XG:i:0 MD:Z:23
-r3671 117 ref 31903418 0 24M = 190342418 0 CTGGCGTTCTCGGCGTGGATGGGT #####$$##$#%#%%###%$#$##
-r3673 153 ref 48819768 37 16M1I6M = 190342418 0 TCTAACTTAGCCTCATAATAGCT /<<!"0///////00/!!0121/ XT:A:U CM:i:2 SM:i:37 AM:i:0 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:1 MD:Z:22
-r3824 117 ref 80729921 0 24M = 80324999 0 TCCAGTCGCGTTGTTAGGTTCGGA #$#$$$#####%##%%###**#+/
-r3911 153 ref 87824718 37 8M1I14M = 80324999 0 TTTAGCCCGAAATGCCTAGAGCA 4;6//11!"11100110////00 XT:A:U CM:i:2 SM:i:37 AM:i:0 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:1 MD:Z:22
-r4795 81 ref 126739130 0 23M 57401793 57401793 0 TGGCATTCCTGTAGGCAGAGAGG AZWWZS]!"QNXZ]VQ]]]/2]] XT:A:R CM:i:2 SM:i:0 AM:i:0 X0:i:3 X1:i:0 XM:i:2 XO:i:0 XG:i:0 MD:Z:23
-r4797 161 ref 57401793 37 23M 26739130 26739130 0 GATCACCCAGGTGATGTAACTCC ]WV]]]]WW]]]]]]]]]]PU]] XT:A:U CM:i:0 SM:i:37 AM:i:0 X0:i:1 X1:i:0 XM:i:0 XO:i:0 XG:i:0 MD:Z:23
-r4800 16 ref 241 255 15M2D8M = 1550 0 CGTGGCCGGCGGGCCGAAGGCAT IIIIIIIIIICCCCIII?IIIII
-r5377 170 ref 52090793 37 23M 26739130 26739130 0 TATCAATAAGGTGATGTAACTCG ]WV]ABAWW]]]]]P]P//GU]] XT:A:U CM:i:0 SM:i:37 AM:i:0 X0:i:1 X1:i:0 XM:i:0 XO:i:0 XG:i:0 MD:Z:23
-r5612 151 ref 190341152 37 19M1D4M = 190342418 0 TCTAACTTAGCCTCATAATGCTAA /<<!"0/4/*/7//00/BC0121/ XT:A:U CM:i:2 SM:i:37 AM:i:0 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:1 MD:Z:22
-r5623 151 ref 188841418 37 19M1I3M = 190342418 0 TCTAACTTAGCCTCATAATAGCT /<<!"0/4//7//00/BC0121/ XT:A:U CM:i:2 SM:i:37 AM:i:0 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:1 MD:Z:22
+r1902 0 chr1 4 37 7M2D18M * 0 0 AGTCTCTTACCTGACGGTTATGA <2;?@BA@?-,.+4=4=4AA663 XT:A:U NM:i:3 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:2 MD:Z:17^CA58A0
+r2204 16 chrM 9 0 19M * 0 0 CTGGTACCTGACAGGTATC 2;?@BA@?-,.+4=4=4AA XT:A:R NM:i:1 X0:i:2 X1:i:0 XM:i:1 XO:i:0 XG:i:0 MD:Z:0T75 XA:Z:chrM,-564927,76M,1;
+r2314 16 chrM 6 37 10M2D8M * 0 0 TCACTCTTACGTCTGA <2;?@BA@?-,.+4=4 XT:A:U NM:i:3 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:2 MD:Z:25A5^CA45
+r3001 0 chrM 13 37 3M1D5M2I7M * 0 0 TACAGTCACCCTCATCA <2;?@BA/(@?-,$& XT:A:U NM:i:3 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:2 MD:Z:17^CA58A0
+r3218 0 chr1 13 37 8M1D7M * 0 0 TACAGTCACTCATCA <2;?@BA/(@?-,$& XT:A:U NM:i:3 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:2 MD:Z:17^CA58A0
+r4767 16 chr2 3 37 15M2I7M * 0 0 CAGACTCTCTTACCAAAGACAGAC <2;?@BA/(@?-,.+4=4=4AA66 XT:A:U NM:i:4 X0:i:1 X1:i:0 XM:i:3 XO:i:1 XG:i:1 MD:Z:2T1A4T65
+r5333 0 chrM 5 37 17M1D8M * 0 0 GTCTCTCATACCAGACAACGGCAT FB3$@BA/(@?-,.+4=4=4AA66 XT:A:U NM:i:4 X0:i:1 X1:i:0 XM:i:3 XO:i:1 XG:i:1 MD:Z:45C10^C0C5C13
+r6690 16 chrM 7 23 20M * 0 0 CTCTCTTACCAGACAGACAT 2;?@BA/(@?-,.+4=4=4A XT:A:U NM:i:0 X0:i:1 X1:i:1 XM:i:0 XO:i:0 XG:i:0 MD:Z:76 XA:Z:chrM,-568532,76M,1;
+r7211 0 chrM 7 37 24M * 0 0 CGACAGAGACAAAATAACATTTAA //<2;?@BA@?-,.+4=442;;6: XT:A:U NM:i:3 X0:i:1 X1:i:0 XM:i:2 XO:i:1 XG:i:1 MD:Z:73G0G0
r7899 69 * 0 0 * * 0 0 CTGCGTGTTGGTGTCTACTGGGGT #%#'##$#$##&%#%$$$%#%#'#
r9192 133 * 0 0 * * 0 0 GTGCGTCGGGGAGGGTGCTGTCGG ######%#$%#$$###($###&&%
+r9922 16 chrM 4 0 7M3I9M * 0 0 CCAGACATTTGAAATCAGG F/D4=44^D++26632;;6 XT:A:U NM:i:0 X0:i:1 X1:i:1 XM:i:0 XO:i:0 XG:i:0 MD:Z:76
+r9987 16 chrM 4 0 9M1I18M * 0 0 AGGTTCTCATTACCTGACACTCATCTTG G/AD6"/+4=4426632;;6:<2;?@BA XT:A:U NM:i:0 X0:i:1 X1:i:1 XM:i:0 XO:i:0 XG:i:0 MD:Z:76
+r10145 16 chr1 16 0 5M2D7M * 0 0 CACATTGTTGTA G//+4=44=4AA XT:A:U NM:i:0 X0:i:1 X1:i:1 XM:i:0 XO:i:0 XG:i:0 MD:Z:76
+r10324 16 chrM 15 0 6M1D5M * 0 0 CCGTTCTACTTG A(a)??8.G//+4= XT:A:U NM:i:0 X0:i:1 X1:i:1 XM:i:0 XO:i:0 XG:i:0 MD:Z:76
+r12331 16 chrM 17 0 4M2I6M * 0 0 AGTCGAATACGTG 632;;6:<2;?@B XT:A:U NM:i:0 X0:i:1 X1:i:1 XM:i:0 XO:i:0 XG:i:0 MD:Z:76
+r12914 16 chr2 24 0 4M3I3M * 0 0 ACTACCCCAA G//+4=42,. XT:A:U NM:i:0 X0:i:1 X1:i:1 XM:i:0 XO:i:0 XG:i:0 MD:Z:76
+r13452 16 chrM 13 0 3M2D11M * 0 0 TACTCACTCATCAG IIIABCCCICCCCI XT:A:U NM:i:0 X0:i:1 X1:i:1 XM:i:0 XO:i:0 XG:i:0 MD:Z:76
--- a/tools/indels/indel_analysis.xml
+++ b/tools/indels/indel_analysis.xml
@@ -24,7 +24,7 @@
</test><test><param name="input1" value="indel_analysis_in2.sam" ftype="sam"/>
- <param name="threshold" value="0.08"/>
+ <param name="threshold" value="0.09"/><output name="out_del" file="indel_analysis_out3.interval" ftype="interval"/><output name="out_ins" file="indel_analysis_out4.interval" ftype="interval"/></test>
@@ -35,75 +35,87 @@
Given an input sam file, this tool provides analysis of the indels. It filters out matches that do not meet the frequency threshold. The way this frequency of occurence is calculated is different for deletions and insertions. The CIGAR string's "M" can indicate an exact match or a mismatch. For SAM containing the following bits of information (assuming the reference "ACTGCTCGAT")::
- CHROM POS CIGAR SEQ
- ref 3 2M1I3M TATCTC
- ref 2 3M1D2M ATGTC
- ref 4 2M2I3M GTTGAAG
- ref 1 2M2D2M ACCT
- ref 2 3M1I2M TCCATC
- ref 7 4M CTAT
- ref 5 5M CGTGA
+ CHROM POS CIGAR SEQ
+ ref 3 2M1I3M TACTTC
+ ref 1 2M1D3M ACGCT
+ ref 4 4M2I3M GTTCAAGAT
+ ref 2 2M2D3M CTCCG
+ ref 1 3M1D4M AACCTGG
+ ref 6 3M1I2M TTCAAT
+ ref 5 3M1I3M CTCTGTT
+ ref 7 4M CTAT
+ ref 5 5M CGCTA
+ ref 3 2M1D2M TGCC
-The following totals would be calculated::
+The following totals would be calculated (this is an intermediate step and not output)::
- Counts for chromosome "ref", where "-" indicates a deletion and
- "+" an insertion
- ----------------------------------------------------------------
- POS BASE NUMREADS DELPROPCALC DELPROP INSPROPCALC INSPROP
- 1 A 1 1/1 1.00 -- --
- 2 A 1 1/2 0.50 -- --
- C 1 1/2 0.50 -- --
- 3 T 3 3/4 0.75 -- --
- -- 1 1/4 0.25 -- --
- 4 A 1 1/5 0.20 -- --
- G 2 2/5 0.40 -- --
- C 1 1/5 0.20 -- --
- - 1 1/5 0.20 -- --
- 5 C 4 4/5 0.80 -- --
- T 1 1/5 0.20 -- --
- +A 1 --- --- 1/6 0.17
- +T 1 --- --- 1/6 0.17
- 6 A 1 1/6 0.17 -- --
- C 1 1/6 0.17 -- --
- T 4 4/6 0.67 -- --
- +TG 1 --- --- 1/7 0.14
- 7 A 1 1/6 0.17 -- --
- C 3 3/6 0.50 -- --
- G 1 1/6 0.17 -- --
- T 1 1/6 0.17 -- --
- 8 G 2 2/3 0.67 -- --
- T 1 1/3 0.33 -- --
- 9 A 2 2/2 1.00 -- --
- 10 T 1 1/1 1.00 -- --
+ -------------------------------------------------------------------------------------------------------
+ POS BASE NUMREADS DELPROPCALC DELPROP INSPROPSTARTCALC INSSTARTPROP INSPROPENDCALC INSENDPROP
+ -------------------------------------------------------------------------------------------------------
+ 1 A 2 2/2 1.00 --- --- --- ---
+ 2 A 1 1/3 0.33 --- --- --- ---
+ C 2 2/3 0.67 --- --- --- ---
+ 3 C 1 1/5 0.20 --- --- --- ---
+ T 3 3/5 0.60 --- --- --- ---
+ - 1 1/5 0.20 --- --- --- ---
+ 4 A 1 1/6 0.17 --- --- --- ---
+ G 3 3/6 0.50 --- --- --- ---
+ - 1 1/6 0.17 --- --- --- ---
+ -- 1 1/6 0.17 --- --- --- ---
+ 5 C 4 4/7 0.57 --- --- --- ---
+ T 2 2/7 0.29 --- --- --- ---
+ - 1 1/7 0.14 --- --- --- ---
+ +C 1 --- --- 1/7 0.14 1/9 0.11
+ 6 C 2 2/9 0.22 --- --- --- ---
+ G 1 1/9 0.11 --- --- --- ---
+ T 6 6/9 0.67 --- --- --- ---
+ 7 C 7 7/9 0.78 --- --- --- ---
+ G 1 1/9 0.11 --- --- --- ---
+ T 1 1/9 0.11 --- --- --- ---
+ 8 C 1 1/7 0.14 --- --- --- ---
+ G 4 4/7 0.57 --- --- --- ---
+ T 2 2/7 0.29 --- --- --- ---
+ +T 1 --- --- 1/8 0.13 1/6 0.17
+ +AA 1 --- --- 1/8 0.13 1/6 0.17
+ 9 A 4 4/5 0.80 --- --- --- ---
+ T 1 1/5 0.20 --- --- --- ---
+ +A 1 --- --- 1/6 0.17 1/5 0.20
+ 10 T 4 4/4 1.00 --- --- --- ---
-Note that the way these are calculated may not be immediately clear. First, the basic total number of reads at a given position is the number of reads with a particular base plus the number of reads with that a deletion at that given position. Note that deletions of two bases and one base would be counted separately. Insertions are not counted in this total, which is used to calculate the proportion of occurrences of each individual base and deletion. For position 4 above, the reference base is G, and there are 2 occurrences of it along with one each of mismatching bases A and C. Also, there is on 1-base deletion. So there are a total of 5 matches/mismatches/deletions, and the proportions for each base are either 1/5 = 0.20 or 2/5 = 0.40, and for the deletion it is 1/5 = 0.20. Insertions are slightly more complicated. Each insertion is regarded individually, and the total number of occurrences of that insertion is divided by the sum of the number of its occurrences and the b
asic total. So for position 5, there are a total of 5 matches/mismatches/deletions, and two insertions that each occur once, so each has a insertion has a proportion of 1/6 = 0.17.
+The general idea for calculating these is that we want to find out the proportion of times a particular event occurred at a position among all reads that touch that base in some way. First, the basic total number of reads at a given position is the number of reads with each particular base plus the number of reads with that a deletion at that given position (including the bases that are "mismatches"). Note that deletions of two bases and one base would be counted completely separately. Insertions are not counted in this total. For position 4 above, the reference base is G, and there are 3 occurrences of it along with one mismatching base, A. Also, there is a 1-base deletion and another 2-base deletion. So there are a total of 5 matches/mismatches/deletions, and the proportions for each base are 1/6 = 0.17 (A) and 3/6 = 0.50 (G), and for each deletion it is 1/6 = 0.17.
-The DELPROP or INSPROP needs to be greater than the threshold frequency specified by the user.
+Insertions are slightly more complicated. We actually want to get the frequency of occurrence for both the associated start and end positions, since an insertion appears between those two bases. Each insertion is regarded individually, and the total number of occurrences of that insertion is divided by the sum of the number of its occurrences and the basic total for either the start or end. So for the insertions at position 8, there are a total of 7 matches/mismatches/deletions at position 8, and two insertions that each occur once, so each has an INSSTARTPROP of 1/8 = 0.13. For the end position there are 5 matches/mismatches/deletions, so the INSENDPROP is 1/6 = 0.17 for both insertions (T and AA).
-The output varies for deletions and insertions, though for both, the first three columns are chromosome, start position, and end position.
+These proportions (DELPROP and either INSSTARTPROP or INSENDPROP) need to be greater than the threshold frequency specified by the user in order for that base, deletion or insertion to be included in the output.
+
+
+** Output format **
+
+The output varies for deletions and insertions, although for both, the first three columns are chromosome, start position, and end position.
Columns in the deletions file::
- Column Description
- ---------------------------- ------------------------------------------------------------------------------------
- 1 Chrom Chromosome
- 2 Start Starting position
- 3 End Ending position
- 4 Number of Deleted Base(s) The number of bases deleted at Start position
- 5 Frequency Percentage Frequency of this exact deletion (2 and 1 are mutually exclusive), as percentage (%)
+ Column Description
+ ----------------------------- ---------------------------------------------------------------------------------------------------
+ 1 Chrom Chromosome
+ 2 Start Starting position
+ 3 End Ending position
+ 4 Coverage Number of reads containing this exact deletion
+ 5 Frequency Percentage Frequency of this exact deletion (2 and 1 are mutually exclusive, for instance), as percentage (%)
Columns in the insertions file::
- Column Description
- -------------------------- -------------------------------------------------------------------------------------------------------------
- 1 Chrom Chromosome
- 2 Start Starting position
- 3 End Ending position (always Start + 1 for insertions)
- 4 Inserted Base(s) The exact base(s) inserted at Start position
- 5 Freq. Perc. at Start Frequency of this exact insertion given Start position ("GG" and "G" are considered distinct), as percentage (%)
- 6 Freq. Perc. at End Frequency of this exact insertion given End position ("GG" and "G" are considered distinct), as percentage (%)
+ Column Description
+ ------------------------ -----------------------------------------------------------------------------------------------------------------
+ 1 Chrom Chromosome
+ 2 Start Starting position
+ 3 End Ending position (always Start + 1 for insertions)
+ 4 Inserted Base(s) The exact base(s) inserted at Start position
+ 5 Coverage Number of reads containing this exact insertion
+ 6 Freq. Perc. at Start Frequency of this exact insertion given Start position ("GG" and "G" are considered distinct), as percentage (%)
+ 7 Freq. Perc. at End Frequency of this exact insertion given End position ("GG" and "G" are considered distinct), as percentage (%)
-Before using this tool, you probably will want to use the Filter SAM for indels tool to filter out indels on bases with insufficient quality scores, but this is not required.
+Before using this tool, you may will want to use the Filter SAM for indels tool to filter out indels on bases with insufficient quality scores, but this is not required.
-----
@@ -112,38 +124,43 @@ Before using this tool, you probably wil
If you set the threshold to 0.0 and have the following SAM file::
- r770 89 ref 6 37 7M1I5M = 0 0 TGGATCTTCATAG !0//110AA44/1 XT:A:U CM:i:2 SM:i:37 AM:i:0 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:1 MD:Z:22
- r1124 113 ref 4 0 23M = 0 0 CATCGTTCTGTTAGATCTACGTA PQRVUMNXYRPUXYXWXSOSZ]M XT:A:R CM:i:0 SM:i:0 AM:i:0 X0:i:163148 XM:i:0 XO:i:0 XG:i:0 MD:Z:23
- r1789 177 ref 6 0 17M = 0 0 TCGATCGCTTAGTTCTC SQQWZY]]YXTSY]]ZM XT:A:R CM:i:0 SM:i:0 AM:i:0 X0:i:163148 XM:i:0 XO:i:0 XG:i:0 MD:Z:23
- r3671 153 ref 10 37 6M1I6M = 0 0 TCTCTTTAGGTCT /<<!"0/////// XT:A:U CM:i:2 SM:i:37 AM:i:0 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:1 MD:Z:22
- r3824 153 ref 5 37 8M1I7M = 0 0 ATTGATGTTCTTAGAT 4;6//11!"100110/ XT:A:U CM:i:2 SM:i:37 AM:i:0 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:1 MD:Z:22
- r4800 16 ref 7 255 5M2D6M = 0 0 CGATCTTTGAT IIIIIIIIIIC XT:A:U CM:i:2 SM:i:37 AM:i:0 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:1 MD:Z:22
- r5612 151 ref 5 37 8M1D9M = 0 0 ATCTATCTTTTGATCTC /<<!"0/4/*/7//B0/ XT:A:U CM:i:2 SM:i:37 AM:i:0 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:1 MD:Z:22
- r5612 151 ref 11 37 3M1I10M = 0 0 CTCCTTAGCTCTCC /<<!"0/4//7//0 XT:A:U CM:i:2 SM:i:37 AM:i:0 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:1 MD:Z:22
- r9145 115 ref 11 0 19M = 0 -1 CTCTTAGCTCTCCGAATTAG 7753:<5#"4!&=9518A> XT:A:R CM:i:2 SM:i:0 AM:i:0 X0:i:4 X1:i:137 XM:i:2 XO:i:0 XG:i:0 MD:Z:23
- r11770 89 ref 10 37 10M2I8M = 0 0 TCTCTTAGATGGCTCCGTAT 00/02!!0/120210AA4/1 XT:A:U CM:i:2 SM:i:37 AM:i:0 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:1 MD:Z:22
- r13671 153 ref 1 37 12M1I12M = 0 0 TCGCATCGATCTCCGTAGATCTCCG /<""<!"0///////00/!!0121/ XT:A:U CM:i:2 SM:i:37 AM:i:0 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:1 MD:Z:22
- r13824 153 ref 13 37 9M1I7M = 0 0 CATAGATCTACCGGATT 4;6//11!"11100110 XT:A:U CM:i:2 SM:i:37 AM:i:0 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:1 MD:Z:22
- r24800 16 ref 3 255 15M2D9M = 0 0 GCATCTATCTGATAGCTCCGAATT IIIIIIIII45"CCCIII?IIIII XT:A:U CM:i:2 SM:i:37 AM:i:0 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:1 MD:Z:22
- r25612 151 ref 1 37 9M1D5M = 0 0 TCGCATCGACTCTT 0/4/*/7//00/1C XT:A:U CM:i:2 SM:i:37 AM:i:0 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:1 MD:Z:22
- r25612 151 ref 21 37 4M1I7M = 0 0 TGCGTTATTGGG <!"0/70/BC01 XT:A:U CM:i:2 SM:i:37 AM:i:0 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:1 MD:Z:22
- r29962 16 ref 20 37 4M1I7M = 0 0 CTCCGGTATGAGG <!"0/70/7BC01 XT:A:U CM:i:2 SM:i:37 AM:i:0 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:1 MD:Z:22
+ r327 16 chrM 11 37 8M1D10M * 0 0 CTTACCAGATAGTCATCA -+<2;?@BA@?-,.+4=4 XT:A:U NM:i:1 X0:i:1 X1:i:0 XM:i:0 XO:i:1 XG:i:1 MD:Z:41^C35
+ r457 0 chr1 14 37 14M * 0 0 ACCTGACAGATATC =/DF;?@1A@?-,. XT:A:U NM:i:0 X0:i:1 X1:i:0 XM:i:0 XO:i:0 XG:i:0 MD:Z:76
+ r501 16 chrM 6 23 7M1I13M * 0 0 TCTGTGCCTACCAGACATTCA +=$2;?@BA@?-,.+4=4=4A XT:A:U NM:i:3 X0:i:1 X1:i:1 XM:i:2 XO:i:1 XG:i:1 MD:Z:28C36G9 XA:Z:chrM,+134263658,14M1I61M,4;
+ r1288 16 chrM 8 37 11M1I7M * 0 0 TCACTTACCTGTACACACA /*F2;?@%A@?-,.+4=4= XT:A:U NM:i:4 X0:i:1 X1:i:0 XM:i:3 XO:i:1 XG:i:1 MD:Z:2T0T1A69
+ r1902 0 chr1 4 37 7M2D18M * 0 0 AGTCTCTTACCTGACGGTTATGA <2;?@BA@?-,.+4=4=4AA663 XT:A:U NM:i:3 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:2 MD:Z:17^CA58A0
+ r2204 16 chrM 9 0 19M * 0 0 CTGGTACCTGACAGGTATC 2;?@BA@?-,.+4=4=4AA XT:A:R NM:i:1 X0:i:2 X1:i:0 XM:i:1 XO:i:0 XG:i:0 MD:Z:0T75 XA:Z:chrM,-564927,76M,1;
+ r2314 16 chrM 6 37 10M2D8M * 0 0 TCACTCTTACGTCTGA <2;?@BA@?-,.+4=4 XT:A:U NM:i:3 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:2 MD:Z:25A5^CA45
+ r3001 0 chrM 13 37 3M1D5M2I7M * 0 0 TACAGTCACCCTCATCA <2;?@BA/(@?-,$& XT:A:U NM:i:3 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:2 MD:Z:17^CA58A0
+ r3218 0 chr1 13 37 8M1D7M * 0 0 TACAGTCACTCATCA <2;?@BA/(@?-,$& XT:A:U NM:i:3 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:2 MD:Z:17^CA58A0
+ r4767 16 chr2 3 37 15M2I7M * 0 0 CAGACTCTCTTACCAAAGACAGAC <2;?@BA/(@?-,.+4=4=4AA66 XT:A:U NM:i:4 X0:i:1 X1:i:0 XM:i:3 XO:i:1 XG:i:1 MD:Z:2T1A4T65
+ r5333 0 chrM 5 37 17M1D8M * 0 0 GTCTCTCATACCAGACAACGGCAT FB3$@BA/(@?-,.+4=4=4AA66 XT:A:U NM:i:4 X0:i:1 X1:i:0 XM:i:3 XO:i:1 XG:i:1 MD:Z:45C10^C0C5C13
+ r6690 16 chrM 7 23 20M * 0 0 CTCTCTTACCAGACAGACAT 2;?@BA/(@?-,.+4=4=4A XT:A:U NM:i:0 X0:i:1 X1:i:1 XM:i:0 XO:i:0 XG:i:0 MD:Z:76 XA:Z:chrM,-568532,76M,1;
+ r7211 0 chrM 7 37 24M * 0 0 CGACAGAGACAAAATAACATTTAA //<2;?@BA@?-,.+4=442;;6: XT:A:U NM:i:3 X0:i:1 X1:i:0 XM:i:2 XO:i:1 XG:i:1 MD:Z:73G0G0
+ r9922 16 chrM 4 0 7M3I9M * 0 0 CCAGACATTTGAAATCAGG F/D4=44^D++26632;;6 XT:A:U NM:i:0 X0:i:1 X1:i:1 XM:i:0 XO:i:0 XG:i:0 MD:Z:76
+ r9987 16 chrM 4 0 9M1I18M * 0 0 AGGTTCTCATTACCTGACACTCATCTTG G/AD6"/+4=4426632;;6:<2;?@BA XT:A:U NM:i:0 X0:i:1 X1:i:1 XM:i:0 XO:i:0 XG:i:0 MD:Z:76
+ r10145 16 chr1 16 0 5M2D7M * 0 0 CACATTGTTGTA G//+4=44=4AA XT:A:U NM:i:0 X0:i:1 X1:i:1 XM:i:0 XO:i:0 XG:i:0 MD:Z:76
+ r10324 16 chrM 15 0 6M1D5M * 0 0 CCGTTCTACTTG A(a)??8.G//+4= XT:A:U NM:i:0 X0:i:1 X1:i:1 XM:i:0 XO:i:0 XG:i:0 MD:Z:76
+ r12331 16 chrM 17 0 4M2I6M * 0 0 AGTCGAATACGTG 632;;6:<2;?@B XT:A:U NM:i:0 X0:i:1 X1:i:1 XM:i:0 XO:i:0 XG:i:0 MD:Z:76
+ r12914 16 chr2 24 0 4M3I3M * 0 0 ACTACCCCAA G//+4=42,. XT:A:U NM:i:0 X0:i:1 X1:i:1 XM:i:0 XO:i:0 XG:i:0 MD:Z:76
The following will be produced (deletions file followed by insertions file)::
- ref 10 11 1 1 9.09
- ref 12 14 2 1 7.69
- ref 13 14 1 1 7.69
- ref 18 20 2 1 8.33
+ chr1 11 13 1 100.00
+ chr1 21 22 1 25.00
+ chr1 21 23 1 25.00
+ chrM 16 18 1 9.09
+ chrM 19 20 1 8.33
+ chrM 21 22 1 9.09
+ chrM 22 23 1 9.09
- ref 13 14 C 1 6.25 6.67
- ref 13 14 T 2 12.50 13.33
- ref 14 15 C 1 6.67 7.14
- ref 16 17 T 1 7.14 7.69
- ref 20 21 GG 1 8.33 8.33
- ref 22 23 A 1 8.33 11.11
- ref 24 25 G 1 11.11 12.50
- ref 25 26 T 1 12.50 14.29
+ chr2 18 19 AA 1 50.00 50.00
+ chr2 28 29 CCC 1 50.00 50.00
+ chrM 11 12 TTT 1 9.09 9.09
+ chrM 13 14 C 1 9.09 9.09
+ chrM 13 14 T 1 9.09 9.09
+ chrM 19 20 T 1 7.69 8.33
+ chrM 21 22 GA 1 8.33 8.33
</help>
--- a/test-data/indel_analysis_out3.interval
+++ b/test-data/indel_analysis_out3.interval
@@ -1,2 +1,6 @@
-ref 10 11 1 1 9.09
-ref 18 20 2 1 8.33
+chr1 11 13 1 100.00
+chr1 21 22 1 25.00
+chr1 21 23 1 25.00
+chrM 16 18 1 9.09
+chrM 21 22 1 9.09
+chrM 22 23 1 9.09
--- a/test-data/indel_analysis_out4.interval
+++ b/test-data/indel_analysis_out4.interval
@@ -1,5 +1,5 @@
-ref 13 14 T 2 13.33 14.29
-ref 20 21 GG 1 8.33 8.33
-ref 22 23 A 1 8.33 11.11
-ref 24 25 G 1 11.11 14.29
-ref 25 26 T 1 12.50 14.29
+chr2 18 19 AA 1 50.00 50.00
+chr2 28 29 CCC 1 50.00 50.00
+chrM 11 12 TTT 1 9.09 9.09
+chrM 13 14 C 1 9.09 9.09
+chrM 13 14 T 1 9.09 9.09
--- a/tools/indels/indel_analysis.py
+++ b/tools/indels/indel_analysis.py
@@ -10,7 +10,7 @@ usage: %prog [options] [input3 sum3[ inp
-D, --out_del=D: The interval output file showing deletions
"""
-import re, sys
+import re, sets, sys
from galaxy import eggs
import pkg_resources; pkg_resources.require( "bx-python" )
from bx.cookbook import doc_optparse
@@ -20,18 +20,18 @@ def stop_err( msg ):
sys.stderr.write( '%s\n' % msg )
sys.exit()
-def add_to_ref_pos( ref_pos, pos, bases ):
+def add_to_mis_matches( mis_matches, pos, bases ):
"""
- Adds the bases and counts to the ref_pos dict
+ Adds the bases and counts to the mis_matches dict
"""
for j, base in enumerate( bases ):
try:
- ref_pos[ pos + j ][ base ] += 1
+ mis_matches[ pos + j ][ base ] += 1
except KeyError:
try:
- ref_pos[ pos + j ][ base ] = 1
+ mis_matches[ pos + j ][ base ] = 1
except KeyError:
- ref_pos[ pos + j ] = { base: 1 }
+ mis_matches[ pos + j ] = { base: 1 }
def __main__():
#Parse Command Line
@@ -39,17 +39,16 @@ def __main__():
# prep output files
out_ins = open( options.out_ins, 'wb' )
out_del = open( options.out_del, 'wb' )
- # pattern
- pat = re.compile( '(^(?P<lmatch>\d+)M(?P<ins_del_width>\d+)(?P<ins_del>[ID])(?P<rmatch>\d+)M$)|(^(?P<match_width>\d+)M$)' )
+ # patterns
+ pat = re.compile( '^((?P<lmatch>\d+)M(?P<ins_del_width>\d+)(?P<ins_del>[ID])(?P<rmatch>\d+)M)$|((?P<match_width>\d+)M)$' )
pat_multi = re.compile( '(\d+[MIDNSHP])(\d+[MIDNSHP])(\d+[MIDNSHP])+' )
# for tracking occurences at each pos of ref
- ref_pos = {}
+ mis_matches = {}
indels = {}
- num_reads = {}
multi_indel_lines = 0
# go through all lines in input file
for i,line in enumerate( open( options.input, 'rb' ) ):
- if line and not line.startswith( '#' ) and not line.startswith( '@' ) :
+ if line.strip() and not line.startswith( '#' ) and not line.startswith( '@' ) :
split_line = line.split( '\t' )
chrom = split_line[2].strip()
pos = int( split_line[3].strip() )
@@ -59,11 +58,11 @@ def __main__():
if chrom == '*':
continue
# find matches like 3M2D7M or 7M3I10M
- matches = ''
- m = pat.search( cigar )
+ match = {}
+ m = pat.match( cigar )
# unprocessable CIGAR
if not m:
- m = pat_multi.search( cigar )
+ m = pat_multi.match( cigar )
# skip this line if no match
if not m:
continue
@@ -72,11 +71,9 @@ def __main__():
multi_indel_lines += 1
# get matching parts for the indel or full match if matching
else:
- if not ref_pos.has_key( chrom ):
- ref_pos[ chrom ] = {}
+ if not mis_matches.has_key( chrom ):
+ mis_matches[ chrom ] = {}
indels[ chrom ] = { 'D': {}, 'I': {} }
- if not num_reads.has_key( chrom ):
- num_reads[ chrom ] = {}
parts = m.groupdict()
if parts[ 'match_width' ] or ( parts[ 'lmatch' ] and parts[ 'ins_del_width' ] and parts[ 'rmatch' ] ):
match = parts
@@ -84,12 +81,7 @@ def __main__():
if match:
# match/mismatch
if parts[ 'match_width' ]:
- add_to_ref_pos( ref_pos[ chrom ], pos, bases )
- for i, base in enumerate( bases ):
- try:
- num_reads[ chrom ][ i + pos ] += 1
- except KeyError:
- num_reads[ chrom ][ i + pos ] = 1
+ add_to_mis_matches( mis_matches[ chrom ], pos, bases )
# indel
else:
# pieces of CIGAR string
@@ -104,86 +96,81 @@ def __main__():
right_bases = bases[ -right : ]
start = pos + left
# add data to ref_pos dict for match/mismatch bases on left and on right
- add_to_ref_pos( ref_pos[ chrom ], pos, left_bases )
- for i, base in enumerate( left_bases ):
- try:
- num_reads[ chrom ][ i + pos ] += 1
- except KeyError:
- num_reads[ chrom ][ i + pos ] = 1
+ add_to_mis_matches( mis_matches[ chrom ], pos, left_bases )
if match[ 'ins_del' ] == 'I':
- add_to_ref_pos( ref_pos[ chrom ], start, right_bases )
- indel_pos = start
+ add_to_mis_matches( mis_matches[ chrom ], start, right_bases )
else:
- add_to_ref_pos( ref_pos[ chrom ], start + middle, right_bases )
- indel_pos = start + middle
- for i, base in enumerate( right_bases ):
- try:
- num_reads[ chrom ][ i + indel_pos ] += 1
- except KeyError:
- num_reads[ chrom ][ i + indel_pos ] = 1
+ add_to_mis_matches( mis_matches[ chrom ], start + middle, right_bases )
# for insertions, count instances of particular inserted bases
if match[ 'ins_del' ] == 'I':
if indels[ chrom ][ 'I' ].has_key( start ):
- if indels[ chrom ][ 'I' ][ start ].has_key( middle_bases ):
+ try:
indels[ chrom ][ 'I' ][ start ][ middle_bases ] += 1
- else:
+ except KeyError:
indels[ chrom ][ 'I' ][ start ][ middle_bases ] = 1
else:
indels[ chrom ][ 'I' ][ start ] = { middle_bases: 1 }
# for deletions, count number of deletions bases
else:
if indels[ chrom ][ 'D' ].has_key( start ):
- if indels[ chrom ][ 'D' ][ start ].has_key( middle ):
+ try:
indels[ chrom ][ 'D' ][ start ][ middle ] += 1
- else:
+ except KeyError:
indels[ chrom ][ 'D' ][ start ][ middle ] = 1
else:
indels[ chrom ][ 'D' ][ start ] = { middle: 1 }
# compute deletion frequencies and insertion frequencies for checking against threshold
freqs = {}
ins_freqs = {}
- chroms = ref_pos.keys()
+ chroms = mis_matches.keys()
chroms.sort()
for chrom in chroms:
freqs[ chrom ] = {}
ins_freqs[ chrom ] = {}
- poses = num_reads[ chrom ].keys()
- poses.sort()
+ poses = mis_matches[ chrom ].keys()
+ poses.extend( indels[ chrom ][ 'D' ].keys() )
+ poses.extend( indels[ chrom ][ 'I' ].keys() )
+ poses = list( sets.Set( poses ) )
for pos in poses:
# all reads touching this particular position
freqs[ chrom ][ pos ] = {}
sum_counts = 0.0
sum_counts_end = 0.0
# get basic counts (match/mismatch)
- if num_reads[ chrom ].has_key( pos ):
- sum_counts += float( num_reads[ chrom ][ pos ] )
- try:
- sum_counts_end += float( num_reads[ chrom ][ pos + 1 ] )
- except KeyError:
- pass
+ try:
+ sum_counts += float( sum( mis_matches[ chrom ][ pos ].values() ) )
+ except KeyError:
+ pass
+ try:
+ sum_counts_end += float( sum( mis_matches[ chrom ][ pos + 1 ].values() ) )
+ except KeyError:
+ pass
# add deletions also touching this position
try:
sum_counts += float( sum( indels[ chrom ][ 'D' ][ pos ].values() ) )
- try:
- sum_counts_end += float( sum( indels[ chrom ][ 'D' ][ pos + 1 ].values() ) )
- except KeyError:
- pass
- for d in indels[ chrom ][ 'D' ][ pos ].keys():
- freqs[ chrom ][ pos ][ '-' * d ] = indels[ chrom ][ 'D' ][ pos ][ d ] / sum_counts
except KeyError:
pass
+ try:
+ sum_counts_end += float( sum( indels[ chrom ][ 'D' ][ pos + 1 ].values() ) )
+ except KeyError:
+ pass
+ freqs[ chrom ][ pos ][ 'total' ] = sum_counts
# calculate actual frequencies
# deletions
- freqs[ chrom ][ pos ][ 'total' ] = sum_counts
- for base in ref_pos[ chrom ][ pos ].keys():
- try:
- prop = float( ref_pos[ chrom ][ pos ][ base ] ) / sum_counts
- freqs[ chrom ][ pos ][ base ] = prop
- except ZeroDivisionError:
- freqs[ chrom ][ pos ][ base ] = 0.0
+ # frequencies for deletions
try:
for d in indels[ chrom ][ 'D' ][ pos ].keys():
- freqs[ chrom ][ pos ][ '-' * d ] = indels[ chrom ][ 'D' ][ pos ][ d ] / sum_counts
+ freqs[ chrom ][ pos ][ d ] = indels[ chrom ][ 'D' ][ pos ][ d ] / sum_counts
+ except KeyError:
+ pass
+ # frequencies for matches/mismatches
+ try:
+ for base in mis_matches[ chrom ][ pos ].keys():
+ try:
+ prop = float( mis_matches[ chrom ][ pos ][ base ] ) / sum_counts
+ freqs[ chrom ][ pos ][ base ] = prop
+ except ZeroDivisionError:
+ freqs[ chrom ][ pos ][ base ] = 0.0
except KeyError:
pass
# insertions
@@ -191,7 +178,7 @@ def __main__():
for bases in indels[ chrom ][ 'I' ][ pos ].keys():
prop_start = indels[ chrom ][ 'I' ][ pos ][ bases ] / ( indels[ chrom ][ 'I' ][ pos ][ bases ] + sum_counts )
try:
- prop_end = indels[ chrom ][ 'I' ][ pos ][ bases ] / sum_counts_end
+ prop_end = indels[ chrom ][ 'I' ][ pos ][ bases ] / ( indels[ chrom ][ 'I' ][ pos ][ bases ] + sum_counts_end )
except ZeroDivisionError:
prop_end = 0.0
try:
@@ -204,7 +191,7 @@ def __main__():
threshold = float( options.threshold )
#out_del.write( '#Chrom\tStart\tEnd\t#Del\t#Reads\t%TotReads\n' )
#out_ins.write( '#Chrom\tStart\tEnd\tInsBases\t#Reads\t%TotReadsAtStart\t%ReadsAtEnd\n' )
- for chrom in ref_pos.keys():
+ for chrom in chroms:
# deletions file
poses = indels[ chrom ][ 'D' ].keys()
poses.sort()
@@ -214,9 +201,9 @@ def __main__():
dels.sort()
for d in dels:
end = start + d
- prop = freqs[ chrom ][ start ][ '-' * d ]
+ prop = freqs[ chrom ][ start ][ d ]
if prop > threshold :
- out_del.write( '%s\t%s\t%s\t%s\t%s\t%.2f\n' % ( chrom, start, end, d, indels[ chrom ][ 'D' ][ pos ][ d ], 100.0 * prop ) )
+ out_del.write( '%s\t%s\t%s\t%s\t%.2f\n' % ( chrom, start, end, indels[ chrom ][ 'D' ][ pos ][ d ], 100.0 * prop ) )
# insertions file
poses = indels[ chrom ][ 'I' ].keys()
poses.sort()
@@ -235,6 +222,6 @@ def __main__():
out_ins.close()
# if skipped lines because of more than one indel, output message
if multi_indel_lines > 0:
- sys.stdout.write( '%s alignments were skipped because they contained more than one indel or had unhandled operations (N/S/H/P).' % multi_indel_lines )
+ sys.stdout.write( '%s alignments were skipped because they contained more than one indel.' % multi_indel_lines )
if __name__=="__main__": __main__()
--- a/test-data/indel_sam2interval_out1.interval
+++ b/test-data/indel_sam2interval_out1.interval
@@ -1,6 +1,14 @@
-ref 133 134 I C 1
-ref 256 258 D - 1
-ref 48819784 48819785 I A 1
-ref 87824726 87824727 I G 1
-ref 188841437 188841438 I A 1
-ref 190341171 190341172 D - 1
+chr1 11 13 D - 1
+chr1 21 22 D - 1
+chr1 21 23 D - 1
+chr2 18 19 I AA 1
+chr2 28 29 I CCC 1
+chrM 11 12 I TTT 1
+chrM 13 14 I C 1
+chrM 13 14 I T 1
+chrM 16 18 D - 2
+chrM 19 20 D - 1
+chrM 19 20 I T 1
+chrM 21 22 D - 1
+chrM 21 22 I GA 1
+chrM 22 23 D - 1
--- a/test-data/indel_analysis_in1.sam
+++ b/test-data/indel_analysis_in1.sam
@@ -1,22 +1,19 @@
-r770 89 ref 6 37 7M1I5M = 0 0 TCGATCTTCATAG !0//110AA44/1 XT:A:U CM:i:2 SM:i:37 AM:i:0 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:1 MD:Z:22
-r1124 113 ref 4 0 23M = 0 0 CATCGTTCTGTTAGATCTACGTA PQRVUMNXYRPUXYXWXSOSZ]M XT:A:R CM:i:0 SM:i:0 AM:i:0 X0:i:163148 XM:i:0 XO:i:0 XG:i:0 MD:Z:23
-r1231 69 * 0 0 * * 0 0 AGACCGGGCGGGGTGGCGTTCGGT %##+'#######%###$#$##$(#
-r1563 133 * 0 0 * * 0 0 GTTCGTGGCCGGTGGGTGTTTGGG ###$$#$#$&#####$'$#$###$
-r1789 177 ref 6 0 17M = 0 0 TCGATCGCTTAGTTCTC SQQWZY]]YXTSY]]ZM XT:A:R CM:i:0 SM:i:0 AM:i:0 X0:i:163148 XM:i:0 XO:i:0 XG:i:0 MD:Z:23
-r3671 153 ref 10 37 6M1I6M = 0 0 TCTCTTTAGGTCT /<<!"0/////// XT:A:U CM:i:2 SM:i:37 AM:i:0 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:1 MD:Z:22
-r3824 153 ref 5 37 8M1I7M = 0 0 ATCGATGTTCTTAGAT 4;6//11!"100110/ XT:A:U CM:i:2 SM:i:37 AM:i:0 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:1 MD:Z:22
-r4800 16 ref 7 255 5M2D6M = 0 0 CGATCTTTGAT IIIIIIIIIIC XT:A:U CM:i:2 SM:i:37 AM:i:0 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:1 MD:Z:22
-r5612 151 ref 5 37 8M1D9M = 0 0 ATCTATCTTTTGATCTC /<<!"0/4/*/7//B0/ XT:A:U CM:i:2 SM:i:37 AM:i:0 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:1 MD:Z:22
-r5929 151 ref 11 37 3M1I10M = 0 0 CTCCTTAGCTCTCC /<<!"0/4//7//0 XT:A:U CM:i:2 SM:i:37 AM:i:0 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:1 MD:Z:22
-r6743 69 * 0 0 * * 0 0 TGCCGTGTCTTGCTAACGCCGATT #'#$$#$###%%##$$$$######
-r9145 115 ref 11 0 19M = 0 -1 CTCTTAGCTCTCCGAATTAG 7753:<5#"4!&=9518A> XT:A:R CM:i:2 SM:i:0 AM:i:0 X0:i:4 X1:i:137 XM:i:2 XO:i:0 XG:i:0 MD:Z:23
-r11770 89 ref 10 37 10M2I8M = 0 0 TCTCTTAGATGGCTCCGTAT 00/02!!0/120210AA4/1 XT:A:U CM:i:2 SM:i:37 AM:i:0 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:1 MD:Z:22
-r13671 153 ref 1 37 12M1I12M = 0 0 TCGCATCGATCTCCTTAGATCTCCG /<""<!"0///////00/!!0121/ XT:A:U CM:i:2 SM:i:37 AM:i:0 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:1 MD:Z:22
-r13762 133 * 0 0 * * 0 0 TGGGTGGATGTGTTGTCGTTCATG #$#$###$#$#######$#$####
-r13824 153 ref 13 37 9M1I7M = 0 0 CATAGATCTACCGGATT 4;6//11!"11100110 XT:A:U CM:i:2 SM:i:37 AM:i:0 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:1 MD:Z:22
-r24800 16 ref 3 255 15M2D9M = 0 0 GCATCTATCTGATAGCTCCGAATT IIIIIIIII45"CCCIII?IIIII XT:A:U CM:i:2 SM:i:37 AM:i:0 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:1 MD:Z:22
-r25612 151 ref 1 37 9M1D5M = 0 0 TCGCATCGACTCTT 0/4/*/7//00/1C XT:A:U CM:i:2 SM:i:37 AM:i:0 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:1 MD:Z:22
-r25786 151 ref 21 37 4M1I7M = 0 0 TGCGTTATTGGG <!"0/70/BC01 XT:A:U CM:i:2 SM:i:37 AM:i:0 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:1 MD:Z:22
-r27899 69 * 0 0 * * 0 0 CTGCGTGTTGGTGTCTACTGGGGT #%#'##$#$##&%#%$$$%#%#'#
-r29192 133 * 0 0 * * 0 0 GTGCGTCGGGGAGGGTGCTGTCGG ######%#$%#$$###($###&&%
-r29962 16 ref 20 37 4M1I7M = 0 0 CTCCGGTATGAGG <!"0/70/7BC01 XT:A:U CM:i:2 SM:i:37 AM:i:0 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:1 MD:Z:22
+r327 16 chrM 11 37 8M1D10M * 0 0 CTTACCAGATAGTCATCA -+<2;?@BA@?-,.+4=4 XT:A:U NM:i:1 X0:i:1 X1:i:0 XM:i:0 XO:i:1 XG:i:1 MD:Z:41^C35
+r457 0 chr1 14 37 14M * 0 0 ACCTGACAGATATC =/DF;?@1A@?-,. XT:A:U NM:i:0 X0:i:1 X1:i:0 XM:i:0 XO:i:0 XG:i:0 MD:Z:76
+r501 16 chrM 6 23 7M1I13M * 0 0 TCTGTGCCTACCAGACATTCA +=$2;?@BA@?-,.+4=4=4A XT:A:U NM:i:3 X0:i:1 X1:i:1 XM:i:2 XO:i:1 XG:i:1 MD:Z:28C36G9 XA:Z:chr5,+134263658,14M1I61M,4;
+r1288 16 chrM 8 37 11M1I7M * 0 0 TCACTTACCTGTACACACA /*F2;?@%A@?-,.+4=4= XT:A:U NM:i:4 X0:i:1 X1:i:0 XM:i:3 XO:i:1 XG:i:1 MD:Z:2T0T1A69
+r1902 0 chr1 4 37 7M2D18M * 0 0 AGTCTCTTACCTGACGGTTATGA <2;?@BA@?-,.+4=4=4AA663 XT:A:U NM:i:3 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:2 MD:Z:17^CA58A0
+r2204 16 chrM 9 0 19M * 0 0 CTGGTACCTGACAGGTATC 2;?@BA@?-,.+4=4=4AA XT:A:R NM:i:1 X0:i:2 X1:i:0 XM:i:1 XO:i:0 XG:i:0 MD:Z:0T75 XA:Z:chr1,-564927,76M,1;
+r2314 16 chrM 6 37 10M2D8M * 0 0 TCACTCTTACGTCTGA <2;?@BA@?-,.+4=4 XT:A:U NM:i:3 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:2 MD:Z:25A5^CA45
+r3001 0 chrM 13 37 3M1D5M2I7M * 0 0 TACAGTCACCCTCATCA <2;?@BA/(@?-,$& XT:A:U NM:i:3 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:2 MD:Z:17^CA58A0
+r3218 0 chr1 13 37 8M1D7M * 0 0 TACAGTCACTCATCA <2;?@BA/(@?-,$& XT:A:U NM:i:3 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:2 MD:Z:17^CA58A0
+r4767 16 chr2 3 37 15M2I7M * 0 0 CAGACTCTCTTACCAAAGACAGAC <2;?@BA/(@?-,.+4=4=4AA66 XT:A:U NM:i:4 X0:i:1 X1:i:0 XM:i:3 XO:i:1 XG:i:1 MD:Z:2T1A4T65
+r5333 0 chrM 5 37 17M1D8M * 0 0 GTCTCTCATACCAGACAACGGCAT FB3$@BA/(@?-,.+4=4=4AA66 XT:A:U NM:i:4 X0:i:1 X1:i:0 XM:i:3 XO:i:1 XG:i:1 MD:Z:45C10^C0C5C13
+r6690 16 chrM 7 23 20M * 0 0 CTCTCTTACCAGACAGACAT 2;?@BA/(@?-,.+4=4=4A XT:A:U NM:i:0 X0:i:1 X1:i:1 XM:i:0 XO:i:0 XG:i:0 MD:Z:76 XA:Z:chr1,-568532,76M,1;
+r7211 0 chrM 7 37 24M * 0 0 CGACAGAGACAAAATAACATTTAA //<2;?@BA@?-,.+4=442;;6: XT:A:U NM:i:3 X0:i:1 X1:i:0 XM:i:2 XO:i:1 XG:i:1 MD:Z:73G0G0
+r9922 16 chrM 4 0 7M3I9M * 0 0 CCAGACATTTGAAATCAGG F/D4=44^D++26632;;6 XT:A:U NM:i:0 X0:i:1 X1:i:1 XM:i:0 XO:i:0 XG:i:0 MD:Z:76
+r9987 16 chrM 4 0 9M1I18M * 0 0 AGGTTCTCATTACCTGACACTCATCTTG G/AD6"/+4=4426632;;6:<2;?@BA XT:A:U NM:i:0 X0:i:1 X1:i:1 XM:i:0 XO:i:0 XG:i:0 MD:Z:76
+r10145 16 chr1 16 0 5M2D7M * 0 0 CACATTGTTGTA G//+4=44=4AA XT:A:U NM:i:0 X0:i:1 X1:i:1 XM:i:0 XO:i:0 XG:i:0 MD:Z:76
+r10324 16 chrM 15 0 6M1D5M * 0 0 CCGTTCTACTTG A(a)??8.G//+4= XT:A:U NM:i:0 X0:i:1 X1:i:1 XM:i:0 XO:i:0 XG:i:0 MD:Z:76
+r12331 16 chrM 17 0 4M2I6M * 0 0 AGTCGAATACGTG 632;;6:<2;?@B XT:A:U NM:i:0 X0:i:1 X1:i:1 XM:i:0 XO:i:0 XG:i:0 MD:Z:76
+r12914 16 chr2 24 0 4M3I3M * 0 0 ACTACCCCAA G//+4=42,. XT:A:U NM:i:0 X0:i:1 X1:i:1 XM:i:0 XO:i:0 XG:i:0 MD:Z:76
--- a/tools/indels/sam_indel_filter.py
+++ b/tools/indels/sam_indel_filter.py
@@ -26,11 +26,11 @@ def __main__():
# prep output file
output = open( options.output, 'wb' )
# patterns
- pat_indel = re.compile( '(?P<before_match>(\d+[MNSHP])*)(?P<lmatch>\d+)M(?P<ins_del_width>\d+)(?P<ins_del>[ID])(?P<rmatch>\d+)M(?P<after_match>(\d+[MNSHP])*)' )
- pat_matches = re.compile( '(\d+[MIDNSHP])+' )
+ pat = re.compile( '^(?P<lmatch>\d+)M(?P<ins_del_width>\d+)(?P<ins_del>[ID])(?P<rmatch>\d+)M$' )
+ pat_multi = re.compile( '(\d+[MIDNSHP])(\d+[MIDNSHP])(\d+[MIDNSHP])+' )
try:
- qual_thresh = int( options.quality_threshold ) + 33
- if qual_thresh < 33 or qual_thresh > 126:
+ qual_thresh = int( options.quality_threshold )
+ if qual_thresh < 0 or qual_thresh > 93:
raise ValueError
except ValueError:
stop_err( 'Your quality threshold should be an integer between 0 and 93, inclusive.' )
@@ -46,54 +46,39 @@ def __main__():
for i,line in enumerate(open( options.input, 'rb' )):
if line and not line.startswith( '#' ) and not line.startswith( '@' ) :
split_line = line.split( '\t' )
- cigar = split_line[5]
- # find all possible matches, like 3M2D7M and 7M3I10M in 3M2D7M3I10M
- cigar_copy = cigar[:]
- matches = []
- while len( cigar_copy ) >= 6: # nMnInM or nMnDnM
- m = pat_indel.search( cigar_copy )
+ cigar = split_line[5].strip()
+ # find matches like 3M2D7M or 7M3I10M
+ match = {}
+ m = pat.match( cigar )
+ # if unprocessable CIGAR
+ if not m:
+ m = pat_multi.match( cigar )
+ # skip this line if no match
if not m:
- break
+ continue
+ # account for multiple indels or operations we don't process
else:
- parts = m.groupdict()
- if parts[ 'lmatch' ] and parts[ 'ins_del_width' ] and parts[ 'rmatch' ]:
- pre_left = 0
- if m.start() > 0:
- pre_left_groups = pat_matches.search( cigar_copy[ : m.start() ] )
- if pre_left_groups:
- for pl in pre_left_groups.groups():
- if pl.endswith( 'M' ) or pl.endswith( 'S' ) or pl.endswith( 'P' ):
- pre_left += pl[:-1]
- parts[ 'pre_left' ] = pre_left
- matches.append( parts )
- cigar_copy = cigar_copy[ len( parts[ 'lmatch' ] ) + 1 : ]
- # see if matches meet filter requirements
- if len( matches ) > 1:
- multi_indel_lines += 1
- elif len( matches ) == 1:
- pre_left = int( matches[0][ 'pre_left' ] )
- left = int( matches[0][ 'lmatch' ] )
- right = int( matches[0][ 'rmatch' ] )
- if matches[0][ 'ins_del' ] == 'D':
- middle = int( matches[0][ 'ins_del_width' ] )
+ multi_indel_lines += 1
+ # otherwise get matching parts
+ else:
+ match = m.groupdict()
+ # process for indels
+ if match:
+ left = int( match[ 'lmatch' ] )
+ right = int( match[ 'rmatch' ] )
+ if match[ 'ins_del' ] == 'I':
+ middle = int( match[ 'ins_del_width' ] )
else:
middle = 0
# if there are enough adjacent bases to check, then do so
if left >= adj_bases and right >= adj_bases:
quals = split_line[10]
- left_quals = quals[ pre_left : pre_left + left ][ -adj_bases : ]
- middle_quals = quals[ pre_left + left : pre_left + left + middle ]
- right_quals = quals[ pre_left + left + middle : pre_left + left + middle + right ][ : adj_bases ]
+ eligible_quals = quals[ left - adj_bases : left + middle + adj_bases ]
qual_thresh_met = True
- for l in left_quals:
- if ord( l ) < qual_thresh:
+ for q in eligible_quals:
+ if ord( q ) - 33 < qual_thresh:
qual_thresh_met = False
break
- if qual_thresh_met:
- for r in right_quals:
- if ord( r ) < qual_thresh:
- qual_thresh_met = False
- break
# if filter reqs met, output line
if qual_thresh_met:
output.write( line )
--- a/tools/indels/sam_indel_filter.xml
+++ b/tools/indels/sam_indel_filter.xml
@@ -1,5 +1,5 @@
-<tool id="sam_indel_filter" name="Filter SAM" version="1.0.0">
- <description>for indels</description>
+<tool id="sam_indel_filter" name="Filter Indels" version="1.0.0">
+ <description>for SAM</description><command interpreter="python">
sam_indel_filter.py
--input=$input1
--- a/test-data/indel_sam2interval_out3.bed
+++ b/test-data/indel_sam2interval_out3.bed
@@ -1,2 +1,7 @@
-ref 256 258
-ref 190341171 190341172
+chr1 11 13
+chr1 21 22
+chr1 21 23
+chrM 16 18
+chrM 19 20
+chrM 21 22
+chrM 22 23
--- a/test-data/indel_sam2interval_out2.bed
+++ b/test-data/indel_sam2interval_out2.bed
@@ -1,4 +1,6 @@
-ref 133 134
-ref 48819784 48819785
-ref 87824726 87824727
-ref 188841437 188841438
+chr2 18 19
+chr2 28 29
+chrM 11 12
+chrM 13 14
+chrM 19 20
+chrM 21 22
--- a/test-data/indel_analysis_out2.interval
+++ b/test-data/indel_analysis_out2.interval
@@ -1,8 +1,7 @@
-ref 13 14 C 1 7.14 7.14
-ref 13 14 T 2 13.33 14.29
-ref 14 15 C 1 6.67 7.14
-ref 16 17 T 1 7.14 7.69
-ref 20 21 GG 1 8.33 8.33
-ref 22 23 A 1 8.33 11.11
-ref 24 25 G 1 11.11 14.29
-ref 25 26 T 1 12.50 14.29
+chr2 18 19 AA 1 50.00 50.00
+chr2 28 29 CCC 1 50.00 50.00
+chrM 11 12 TTT 1 9.09 9.09
+chrM 13 14 C 1 9.09 9.09
+chrM 13 14 T 1 9.09 9.09
+chrM 19 20 T 1 7.69 8.33
+chrM 21 22 GA 1 8.33 8.33
--- a/test-data/indel_analysis_in2.sam
+++ b/test-data/indel_analysis_in2.sam
@@ -1,16 +1,24 @@
-r770 89 ref 6 37 7M1I5M = 0 0 TCGATCTTCATAG !0//110AA44/1 XT:A:U CM:i:2 SM:i:37 AM:i:0 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:1 MD:Z:22
-r1124 113 ref 4 0 23M = 0 0 CATCGTTCTGTTAGATCTACGTA PQRVUMNXYRPUXYXWXSOSZ]M XT:A:R CM:i:0 SM:i:0 AM:i:0 X0:i:163148 XM:i:0 XO:i:0 XG:i:0 MD:Z:23
-r1789 177 ref 6 0 17M = 0 0 TCGATCGCTTAGTTCTC SQQWZY]]YXTSY]]ZM XT:A:R CM:i:0 SM:i:0 AM:i:0 X0:i:163148 XM:i:0 XO:i:0 XG:i:0 MD:Z:23
-r3671 153 ref 10 37 6M1I6M = 0 0 TCTCTTTAGGTCT /<<!"0/////// XT:A:U CM:i:2 SM:i:37 AM:i:0 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:1 MD:Z:22
-r3824 153 ref 5 37 8M1I7M = 0 0 ATCGATGTTCTTAGAT 4;6//11!"100110/ XT:A:U CM:i:2 SM:i:37 AM:i:0 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:1 MD:Z:22
-r4800 16 ref 7 255 5M2D6M = 0 0 CGATCTTTGAT IIIIIIIIIIC XT:A:U CM:i:2 SM:i:37 AM:i:0 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:1 MD:Z:22
-r5612 151 ref 5 37 8M1D9M = 0 0 ATCTATCTTTTGATCTC /<<!"0/4/*/7//B0/ XT:A:U CM:i:2 SM:i:37 AM:i:0 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:1 MD:Z:22
-r5929 151 ref 11 37 3M1I10M = 0 0 CTCCTTAGCTCTCC /<<!"0/4//7//0 XT:A:U CM:i:2 SM:i:37 AM:i:0 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:1 MD:Z:22
-r9145 115 ref 11 0 19M = 0 -1 CTCTTAGCTCTCCGAATTAG 7753:<5#"4!&=9518A> XT:A:R CM:i:2 SM:i:0 AM:i:0 X0:i:4 X1:i:137 XM:i:2 XO:i:0 XG:i:0 MD:Z:23
-r11770 89 ref 10 37 10M2I8M = 0 0 TCTCTTAGATGGCTCCGTAT 00/02!!0/120210AA4/1 XT:A:U CM:i:2 SM:i:37 AM:i:0 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:1 MD:Z:22
-r13671 153 ref 1 37 12M1I12M = 0 0 TCGCATCGATCTCCTTAGATCTCCG /<""<!"0///////00/!!0121/ XT:A:U CM:i:2 SM:i:37 AM:i:0 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:1 MD:Z:22
-r13824 153 ref 13 37 9M1I7M = 0 0 CATAGATCTACCGGATT 4;6//11!"11100110 XT:A:U CM:i:2 SM:i:37 AM:i:0 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:1 MD:Z:22
-r24800 16 ref 3 255 15M2D9M = 0 0 GCATCTATCTGATAGCTCCGAATT IIIIIIIII45"CCCIII?IIIII XT:A:U CM:i:2 SM:i:37 AM:i:0 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:1 MD:Z:22
-r25612 151 ref 1 37 9M1D5M = 0 0 TCGCATCGACTCTT 0/4/*/7//00/1C XT:A:U CM:i:2 SM:i:37 AM:i:0 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:1 MD:Z:22
-r25786 151 ref 21 37 4M1I7M = 0 0 TGCGTTATTGGG <!"0/70/BC01 XT:A:U CM:i:2 SM:i:37 AM:i:0 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:1 MD:Z:22
-r29962 16 ref 20 37 4M1I7M = 0 0 CTCCGGTATGAGG <!"0/70/7BC01 XT:A:U CM:i:2 SM:i:37 AM:i:0 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:1 MD:Z:22
+r327 16 chrM 11 37 8M1D10M * 0 0 CTTACCAGATAGTCATCA -+<2;?@BA@?-,.+4=4 XT:A:U NM:i:1 X0:i:1 X1:i:0 XM:i:0 XO:i:1 XG:i:1 MD:Z:41^C35
+r457 0 chr1 14 37 14M * 0 0 ACCTGACAGATATC =/DF;?@1A@?-,. XT:A:U NM:i:0 X0:i:1 X1:i:0 XM:i:0 XO:i:0 XG:i:0 MD:Z:76
+r501 16 chrM 6 23 7M1I13M * 0 0 TCTGTGCCTACCAGACATTCA +=$2;?@BA@?-,.+4=4=4A XT:A:U NM:i:3 X0:i:1 X1:i:1 XM:i:2 XO:i:1 XG:i:1 MD:Z:28C36G9 XA:Z:chr5,+134263658,14M1I61M,4;
+r764 4 * 0 0 * * 0 0 TTAAGGGGAACGTGTGGGCTATTTAGGCTTTATG BBB=?BBA?>;?=B=AA=;A@B>=;;>:A=?:?9
+r1288 16 chrM 8 37 11M1I7M * 0 0 TCACTTACCTGTACACACA /*F2;?@%A@?-,.+4=4= XT:A:U NM:i:4 X0:i:1 X1:i:0 XM:i:3 XO:i:1 XG:i:1 MD:Z:2T0T1A69
+r1902 0 chr1 4 37 7M2D18M * 0 0 AGTCTCTTACCTGACGGTTATGA <2;?@BA@?-,.+4=4=4AA663 XT:A:U NM:i:3 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:2 MD:Z:17^CA58A0
+r2204 16 chrM 9 0 19M * 0 0 CTGGTACCTGACAGGTATC 2;?@BA@?-,.+4=4=4AA XT:A:R NM:i:1 X0:i:2 X1:i:0 XM:i:1 XO:i:0 XG:i:0 MD:Z:0T75 XA:Z:chr1,-564927,76M,1;
+r2314 16 chrM 6 37 10M2D6M * 0 0 TCACTCTTACGTCTGA <2;?@BA@?-,.+4=4 XT:A:U NM:i:3 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:2 MD:Z:25A5^CA45
+r3001 0 chrM 13 37 3M1D5M2I7M * 0 0 TACAGTCACCCTCATCA <2;?@BA/(@?-,$& XT:A:U NM:i:3 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:2 MD:Z:17^CA58A0
+r3218 0 chr1 13 37 8M1D7M * 0 0 TACAGTCACTCATCA <2;?@BA/(@?-,$& XT:A:U NM:i:3 X0:i:1 X1:i:0 XM:i:1 XO:i:1 XG:i:2 MD:Z:17^CA58A0
+r3760 4 * 0 0 * * 0 0 CCTGTGATCCATCGTGATGTCTTATTTAAGG BABCBCBBBABBACBCABCAACBBCBBB=?B
+r4767 16 chr2 3 37 15M2I7M * 0 0 CAGACTCTCTTACCAAAGACAGAC <2;?@BA/(@?-,.+4=4=4AA66 XT:A:U NM:i:4 X0:i:1 X1:i:0 XM:i:3 XO:i:1 XG:i:1 MD:Z:2T1A4T65
+r5333 0 chrM 5 37 17M1D8M * 0 0 GTCTCTCATACCAGACAACGGCAT FB3$@BA/(@?-,.+4=4=4AA66 XT:A:U NM:i:4 X0:i:1 X1:i:0 XM:i:3 XO:i:1 XG:i:1 MD:Z:45C10^C0C5C13
+r6121 4 * 0 0 * * 0 0 GTTAATAGGGTGATAGA AB/BC==CC%ACBC/CB
+r6690 16 chrM 7 23 20M * 0 0 CTCTCTTACCAGACAGACAT 2;?@BA/(@?-,.+4=4=4A XT:A:U NM:i:0 X0:i:1 X1:i:1 XM:i:0 XO:i:0 XG:i:0 MD:Z:76 XA:Z:chr1,-568532,76M,1;
+r7211 0 chrM 7 37 24M * 0 0 CGACAGAGACAAAATAACATTTAA //<2;?@BA@?-,.+4=442;;6: XT:A:U NM:i:3 X0:i:1 X1:i:0 XM:i:2 XO:i:1 XG:i:1 MD:Z:73G0G0
+r8122 4 * 0 0 * * 0 0 GACCTGTGATCCATCGTGATGT CBBAB/$3BB<AB/,CBCABCA
+r9922 16 chrM 4 0 7M3I9M * 0 0 CCAGACATTTGAAATCAGG F/D4=44^D++26632;;6 XT:A:U NM:i:0 X0:i:1 X1:i:1 XM:i:0 XO:i:0 XG:i:0 MD:Z:76
+r9987 16 chrM 4 0 9M1I18M * 0 0 AGGTTCTCATTACCTGACACTCATCTTG G/AD6"/+4=4426632;;6:<2;?@BA XT:A:U NM:i:0 X0:i:1 X1:i:1 XM:i:0 XO:i:0 XG:i:0 MD:Z:76
+r10145 16 chr1 16 0 5M2D7M * 0 0 CACATTGTTGTA G//+4=44=4AA XT:A:U NM:i:0 X0:i:1 X1:i:1 XM:i:0 XO:i:0 XG:i:0 MD:Z:76
+r10324 16 chrM 15 0 6M1D5M * 0 0 CCGTTCTACTTG A(a)??8.G//+4= XT:A:U NM:i:0 X0:i:1 X1:i:1 XM:i:0 XO:i:0 XG:i:0 MD:Z:76
+r11324 4 * 0 0 * * 0 0 AATAGGGTGATAGACCTG //CCCC#ACB;;C3BA5C
+r12331 16 chrM 17 0 4M2I6M * 0 0 AGTCGAATACGTG 632;;6:<2;?@B XT:A:U NM:i:0 X0:i:1 X1:i:1 XM:i:0 XO:i:0 XG:i:0 MD:Z:76
+r12914 16 chr2 24 0 4M3I3M * 0 0 ACTACCCCAA G//+4=42,. XT:A:U NM:i:0 X0:i:1 X1:i:1 XM:i:0 XO:i:0 XG:i:0 MD:Z:76
1
0

galaxy-dist commit 8ffcaf3d9a0c: Patch from Brad Chapman: Handle URLs for uploading in the case where Galaxy is served under a prefix and nginx is used to handle the uploads.
by commits-noreply@bitbucket.org 23 Jul '10
by commits-noreply@bitbucket.org 23 Jul '10
23 Jul '10
# HG changeset patch -- Bitbucket.org
# Project galaxy-dist
# URL http://bitbucket.org/galaxy/galaxy-dist/overview
# User Nate Coraor <nate(a)bx.psu.edu>
# Date 1279659120 14400
# Node ID 8ffcaf3d9a0c16d080801f3f81104e829403da41
# Parent 7e63649e96b5788bdd72e3d639fca1e8153c2775
Patch from Brad Chapman: Handle URLs for uploading in the case where Galaxy is served under a prefix and nginx is used to handle the uploads.
--- a/lib/galaxy/tools/__init__.py
+++ b/lib/galaxy/tools/__init__.py
@@ -437,10 +437,16 @@ class Tool:
self.check_values = util.string_as_bool( input_elem.get("check_values", "true") )
self.nginx_upload = util.string_as_bool( input_elem.get( "nginx_upload", "false" ) )
self.action = input_elem.get( 'action', '/tool_runner/index' )
+ # If we have an nginx upload, save the action as a tuple instead of
+ # a string. The actual action needs to get url_for run to add any
+ # prefixes, and we want to avoid adding the prefix to the
+ # nginx_upload_path. This logic is handled in the tool_form.mako
+ # template.
if self.nginx_upload and self.app.config.nginx_upload_path:
if '?' in urllib.unquote_plus( self.action ):
raise Exception( 'URL parameters in a non-default tool action can not be used in conjunction with nginx upload. Please convert them to hidden POST parameters' )
- self.action = self.app.config.nginx_upload_path + '?nginx_redir=' + urllib.unquote_plus( self.action )
+ self.action = (self.app.config.nginx_upload_path + '?nginx_redir=',
+ urllib.unquote_plus(self.action))
self.target = input_elem.get( "target", "galaxy_main" )
self.method = input_elem.get( "method", "post" )
# Parse the actual parameters
--- a/templates/tool_form.mako
+++ b/templates/tool_form.mako
@@ -200,14 +200,22 @@ function checkUncheckAll( name, check )
<br/>
%endif
- <div class="toolForm" id="${tool.id}">
+ ## handle calculating the redict url for the special case where we have nginx proxy
+ ## upload and need to do url_for on the redirect portion of the tool action
+ <%
+ try:
+ tool_url = h.url_for(tool.action)
+ except AttributeError:
+ assert len(tool.action) == 2
+ tool_url = tool.action[0] + h.url_for(tool.action[1])
+ %><div class="toolForm" id="${tool.id}">
%if tool.has_multiple_pages:
<div class="toolFormTitle">${tool.name} (step ${tool_state.page+1} of ${tool.npages})</div>
%else:
<div class="toolFormTitle">${tool.name}</div>
%endif
<div class="toolFormBody">
- <form id="tool_form" name="tool_form" action="${h.url_for( tool.action )}" enctype="${tool.enctype}" target="${tool.target}" method="${tool.method}">
+ <form id="tool_form" name="tool_form" action="${tool_url}" enctype="${tool.enctype}" target="${tool.target}" method="${tool.method}"><input type="hidden" name="tool_id" value="${tool.id}"><input type="hidden" name="tool_state" value="${util.object_to_string( tool_state.encode( tool, app ) )}"><input type="hidden" name="tool_id" value="${tool.id}"><input type="hidden" name="tool_state" value="${util.object_to_string( tool_state.encode( tool, app ) )}">
%if tool.display_by_page[tool_state.page]:
1
0

galaxy-dist commit 7e63649e96b5: trackster: remove mousewheel zoom (since scrolling window is more important), fix overview drag bug
by commits-noreply@bitbucket.org 23 Jul '10
by commits-noreply@bitbucket.org 23 Jul '10
23 Jul '10
# HG changeset patch -- Bitbucket.org
# Project galaxy-dist
# URL http://bitbucket.org/galaxy/galaxy-dist/overview
# User Kanwei Li <kanwei(a)gmail.com>
# Date 1279651656 14400
# Node ID 7e63649e96b5788bdd72e3d639fca1e8153c2775
# Parent 84671d8f46845b7a5bcfcc8028e68eaf241a5058
trackster: remove mousewheel zoom (since scrolling window is more important), fix overview drag bug
--- a/static/scripts/trackster.js
+++ b/static/scripts/trackster.js
@@ -91,9 +91,8 @@ var View = function( container, chrom, t
// Create DOM elements
var parent_element = this.container,
view = this;
-
+ this.top_labeltrack = $("<div/>").addClass("top-labeltrack").appendTo(parent_element);
this.content_div = $("<div/>").addClass("content").css("position", "relative").appendTo(parent_element);
- this.top_labeltrack = $("<div/>").addClass("top-labeltrack").appendTo(this.content_div);
this.viewport_container = $("<div/>").addClass("viewport-container").addClass("viewport-container").appendTo(this.content_div);
this.viewport = $("<div/>").addClass("viewport").appendTo(this.viewport_container);
@@ -136,7 +135,7 @@ var View = function( container, chrom, t
var found = $.grep(view.chrom_data, function(v, i) {
return v.chrom === view.chrom;
})[0];
- view.max_high = found.len;
+ view.max_high = (found.len !== undefined ? found.len : 0);
view.reset();
view.redraw(true);
@@ -154,6 +153,7 @@ var View = function( container, chrom, t
}
});
+ /*
this.content_div.bind("mousewheel", function( e, delta ) {
if (Math.abs(delta) < 0.5) {
return;
@@ -165,6 +165,7 @@ var View = function( container, chrom, t
}
e.preventDefault();
});
+ */
this.content_div.bind("dblclick", function( e ) {
view.zoom_in(e.pageX, this.viewport_container);
@@ -177,8 +178,8 @@ var View = function( container, chrom, t
var delta = e.offsetX - this.current_x;
this.current_x = e.offsetX;
- var delta_chrom = Math.round(delta / view.viewport_container.width() * (view.high - view.low) );
- view.move_delta(-2*delta_chrom);
+ var delta_chrom = Math.round(delta / view.viewport_container.width() * (view.max_high - view.max_low) );
+ view.move_delta(-delta_chrom);
});
this.viewport_container.bind( "dragstart", function( e ) {
--- a/static/scripts/packed/trackster.js
+++ b/static/scripts/packed/trackster.js
@@ -1,1 +1,1 @@
-var DENSITY=200,FEATURE_LEVELS=10,DATA_ERROR="There was an error in indexing this dataset. ",DATA_NOCONVERTER="A converter for this dataset is not installed. Please check your datatypes_conf.xml file.",DATA_NONE="No data for this chrom/contig.",DATA_PENDING="Currently indexing... please wait",DATA_LOADING="Loading data...",CACHED_TILES_FEATURE=10,CACHED_TILES_LINE=30,CACHED_DATA=5,CONTEXT=$("<canvas></canvas>").get(0).getContext("2d"),PX_PER_CHAR=CONTEXT.measureText("A").width,RIGHT_STRAND,LEFT_STRAND;var right_img=new Image();right_img.src=image_path+"/visualization/strand_right.png";right_img.onload=function(){RIGHT_STRAND=CONTEXT.createPattern(right_img,"repeat")};var left_img=new Image();left_img.src=image_path+"/visualization/strand_left.png";left_img.onload=function(){LEFT_STRAND=CONTEXT.createPattern(left_img,"repeat")};var right_img_inv=new Image();right_img_inv.src=image_path+"/visualization/strand_right_inv.png";right_img_inv.onload=function(){RIGHT_STRAND_INV=CONT
EXT.createPattern(right_img_inv,"repeat")};var left_img_inv=new Image();left_img_inv.src=image_path+"/visualization/strand_left_inv.png";left_img_inv.onload=function(){LEFT_STRAND_INV=CONTEXT.createPattern(left_img_inv,"repeat")};var Cache=function(a){this.num_elements=a;this.clear()};$.extend(Cache.prototype,{get:function(b){var a=this.key_ary.indexOf(b);if(a!=-1){this.key_ary.splice(a,1);this.key_ary.push(b)}return this.obj_cache[b]},set:function(b,c){if(!this.obj_cache[b]){if(this.key_ary.length>=this.num_elements){var a=this.key_ary.shift();delete this.obj_cache[a]}this.key_ary.push(b)}this.obj_cache[b]=c;return c},clear:function(){this.obj_cache={};this.key_ary=[]}});var View=function(a,c,e,d,b){this.container=a;this.vis_id=d;this.dbkey=b;this.title=e;this.chrom=c;this.tracks=[];this.label_tracks=[];this.max_low=0;this.max_high=0;this.track_id_counter=0;this.zoom_factor=3;this.min_separation=30;this.has_changes=false;this.init();this.reset()};$.extend(View.prototype,{in
it:function(){var b=this.container,a=this;this.content_div=$("<div/>").addClass("content").css("position","relative").appendTo(b);this.top_labeltrack=$("<div/>").addClass("top-labeltrack").appendTo(this.content_div);this.viewport_container=$("<div/>").addClass("viewport-container").addClass("viewport-container").appendTo(this.content_div);this.viewport=$("<div/>").addClass("viewport").appendTo(this.viewport_container);this.nav_container=$("<div/>").addClass("nav-container").appendTo(b);this.nav_labeltrack=$("<div/>").addClass("nav-labeltrack").appendTo(this.nav_container);this.nav=$("<div/>").addClass("nav").appendTo(this.nav_container);this.overview=$("<div/>").addClass("overview").appendTo(this.nav);this.overview_viewport=$("<div/>").addClass("overview-viewport").appendTo(this.overview);this.overview_box=$("<div/>").addClass("overview-box").appendTo(this.overview_viewport);this.nav_controls=$("<div/>").addClass("nav-controls").appendTo(this.nav);this.chrom_form=$("<form/>"
).attr("action",function(){void (0)}).appendTo(this.nav_controls);this.chrom_select=$("<select/>").attr({name:"chrom"}).css("width","15em").addClass("no-autocomplete").append("<option value=''>Loading</option>").appendTo(this.chrom_form);this.low_input=$("<input/>").addClass("low").css("width","10em").appendTo(this.chrom_form);$("<span/>").text(" - ").appendTo(this.chrom_form);this.high_input=$("<input/>").addClass("high").css("width","10em").appendTo(this.chrom_form);if(this.vis_id!==undefined){this.hidden_input=$("<input/>").attr("type","hidden").val(this.vis_id).appendTo(this.chrom_form)}this.zi_link=$("<a/>").click(function(){a.zoom_in();a.redraw()}).html('<img src="'+image_path+'/fugue/magnifier-zoom.png" />').appendTo(this.chrom_form);this.zo_link=$("<a/>").click(function(){a.zoom_out();a.redraw()}).html('<img src="'+image_path+'/fugue/magnifier-zoom-out.png" />').appendTo(this.chrom_form);$.ajax({url:chrom_url,data:(this.vis_id!==undefined?{vis_id:this.vis_id}:{dbkey:
this.dbkey}),dataType:"json",success:function(c){if(c.reference){a.add_label_track(new ReferenceTrack(a))}a.chrom_data=c.chrom_info;var e='<option value="">Select Chrom/Contig</option>';for(i in a.chrom_data){var d=a.chrom_data[i]["chrom"];e+='<option value="'+d+'">'+d+"</option>"}a.chrom_select.html(e);a.chrom_select.bind("change",function(){a.chrom=a.chrom_select.val();var g=$.grep(a.chrom_data,function(j,k){return j.chrom===a.chrom})[0];a.max_high=g.len;a.reset();a.redraw(true);for(var h in a.tracks){var f=a.tracks[h];if(f.init){f.init()}}a.redraw()})},error:function(){alert("Could not load chroms for this dbkey:",a.dbkey)}});this.content_div.bind("mousewheel",function(c,d){if(Math.abs(d)<0.5){return}if(d>0){a.zoom_in(c.pageX,this.viewport_container)}else{a.zoom_out()}c.preventDefault()});this.content_div.bind("dblclick",function(c){a.zoom_in(c.pageX,this.viewport_container)});this.overview_box.bind("dragstart",function(c){this.current_x=c.offsetX}).bind("drag",function(c
){var f=c.offsetX-this.current_x;this.current_x=c.offsetX;var d=Math.round(f/a.viewport_container.width()*(a.high-a.low));a.move_delta(-2*d)});this.viewport_container.bind("dragstart",function(c){this.original_low=a.low;this.current_height=c.clientY;this.current_x=c.offsetX}).bind("drag",function(f){var c=$(this);var h=f.offsetX-this.current_x;var d=c.scrollTop()-(f.clientY-this.current_height);if(d<c.get(0).scrollHeight-c.height()){c.scrollTop(d)}this.current_height=f.clientY;this.current_x=f.offsetX;var g=Math.round(h/a.viewport_container.width()*(a.high-a.low));a.move_delta(g)});this.top_labeltrack.bind("dragstart",function(c){this.drag_origin_x=c.clientX;this.drag_origin_pos=c.clientX/a.viewport_container.width()*(a.high-a.low)+a.low;this.drag_div=$("<div />").css({height:a.content_div.height(),top:"0px",position:"absolute","background-color":"#cfc",border:"1px solid #6a6",opacity:0.5}).appendTo($(this))}).bind("drag",function(h){var d=Math.min(h.clientX,this.drag_origin
_x),c=Math.max(h.clientX,this.drag_origin_x),g=(a.high-a.low),f=a.viewport_container.width();a.low_input.val(commatize(Math.round(d/f*g)+a.low));a.high_input.val(commatize(Math.round(c/f*g)+a.low));this.drag_div.css({left:d+"px",width:(c-d)+"px"})}).bind("dragend",function(j){var d=Math.min(j.clientX,this.drag_origin_x),c=Math.max(j.clientX,this.drag_origin_x),g=(a.high-a.low),f=a.viewport_container.width(),h=a.low;a.low=Math.round(d/f*g)+h;a.high=Math.round(c/f*g)+h;this.drag_div.remove();a.redraw()});this.add_label_track(new LabelTrack(this,this.top_labeltrack));this.add_label_track(new LabelTrack(this,this.nav_labeltrack))},move_delta:function(c){var a=this;var b=a.high-a.low;if(a.low-c<a.max_low){a.low=a.max_low;a.high=a.max_low+b}else{if(a.high-c>a.max_high){a.high=a.max_high;a.low=a.max_high-b}else{a.high-=c;a.low-=c}}a.redraw()},add_track:function(a){a.view=this;a.track_id=this.track_id_counter;this.tracks.push(a);if(a.init){a.init()}a.container_div.attr("id","track_"
+a.track_id);this.track_id_counter+=1},add_label_track:function(a){a.view=this;this.label_tracks.push(a)},remove_track:function(a){this.has_changes=true;a.container_div.fadeOut("slow",function(){$(this).remove()});delete this.tracks[this.tracks.indexOf(a)]},update_options:function(){this.has_changes=true;var b=$("ul#sortable-ul").sortable("toArray");for(var c in b){var e=b[c].split("_li")[0].split("track_")[1];this.viewport.append($("#track_"+e))}for(var d in view.tracks){var a=view.tracks[d];if(a&&a.update_options){a.update_options(d)}}},reset:function(){this.low=this.max_low;this.high=this.max_high;this.viewport_container.find(".yaxislabel").remove()},redraw:function(f){var d=this.high-this.low,b=this.low,e=this.high;if(b<this.max_low){b=this.max_low}if(e>this.max_high){e=this.max_high}if(this.high!==0&&d<this.min_separation){e=b+this.min_separation}this.low=Math.floor(b);this.high=Math.ceil(e);this.resolution=Math.pow(10,Math.ceil(Math.log((this.high-this.low)/200)/Math.L
N10));this.zoom_res=Math.pow(FEATURE_LEVELS,Math.max(0,Math.ceil(Math.log(this.resolution,FEATURE_LEVELS)/Math.log(FEATURE_LEVELS))));this.overview_box.css({left:(this.low/(this.max_high-this.max_low))*this.overview_viewport.width(),width:Math.max(12,(this.high-this.low)/(this.max_high-this.max_low)*this.overview_viewport.width())}).show();this.low_input.val(commatize(this.low));this.high_input.val(commatize(this.high));if(!f){for(var c=0,a=this.tracks.length;c<a;c++){if(this.tracks[c]&&this.tracks[c].enabled){this.tracks[c].draw()}}for(var c=0,a=this.label_tracks.length;c<a;c++){this.label_tracks[c].draw()}}},zoom_in:function(b,c){if(this.max_high===0||this.high-this.low<this.min_separation){return}var d=this.high-this.low,e=d/2+this.low,a=(d/this.zoom_factor)/2;if(b){e=b/this.viewport_container.width()*(this.high-this.low)+this.low}this.low=Math.round(e-a);this.high=Math.round(e+a);this.redraw()},zoom_out:function(){if(this.max_high===0){return}var b=this.high-this.low,c=b
/2+this.low,a=(b*this.zoom_factor)/2;this.low=Math.round(c-a);this.high=Math.round(c+a);this.redraw()}});var Track=function(b,a,c){this.name=b;this.parent_element=c;this.view=a;this.init_global()};$.extend(Track.prototype,{init_global:function(){this.header_div=$("<div class='track-header'>").text(this.name);this.content_div=$("<div class='track-content'>");this.container_div=$("<div />").addClass("track").append(this.header_div).append(this.content_div);this.parent_element.append(this.container_div)},init_each:function(c,b){var a=this;a.enabled=false;a.data_queue={};a.tile_cache.clear();a.data_cache.clear();if(!a.content_div.text()){a.content_div.text(DATA_LOADING)}a.container_div.removeClass("nodata error pending");if(a.view.chrom){$.getJSON(data_url,c,function(d){if(!d||d==="error"||d.kind==="error"){a.container_div.addClass("error");a.content_div.text(DATA_ERROR);if(d.message){var f=a.view.tracks.indexOf(a);var e=$("<a href='javascript:void(0);'></a>").attr("id",f+"_erro
r");e.text("Click to view error");$("#"+f+"_error").live("click",function(){show_modal("Trackster Error","<pre>"+d.message+"</pre>",{Close:hide_modal})});a.content_div.append(e)}}else{if(d==="no converter"){a.container_div.addClass("error");a.content_div.text(DATA_NOCONVERTER)}else{if(d.data!==undefined&&(d.data===null||d.data.length===0)){a.container_div.addClass("nodata");a.content_div.text(DATA_NONE)}else{if(d==="pending"){a.container_div.addClass("pending");a.content_div.text(DATA_PENDING);setTimeout(function(){a.init()},5000)}else{a.content_div.text("");a.content_div.css("height",a.height_px+"px");a.enabled=true;b(d);a.draw()}}}}})}else{a.container_div.addClass("nodata");a.content_div.text(DATA_NONE)}}});var TiledTrack=function(){this.left_offset=200};$.extend(TiledTrack.prototype,Track.prototype,{draw:function(){var j=this.view.low,e=this.view.high,f=e-j,d=this.view.resolution;var l=$("<div style='position: relative;'></div>"),m=this.content_div.width()/f,h;this.conten
t_div.children(":first").remove();this.content_div.append(l),this.max_height=0;var a=Math.floor(j/d/DENSITY);while((a*DENSITY*d)<e){var k=this.content_div.width()+"_"+m+"_"+a;var c=this.tile_cache.get(k);if(c){var g=a*DENSITY*d;var b=(g-j)*m;if(this.left_offset){b-=this.left_offset}c.css({left:b});l.append(c);this.max_height=Math.max(this.max_height,c.height());this.content_div.css("height",this.max_height+"px")}else{this.delayed_draw(this,k,j,e,a,d,l,m)}a+=1}},delayed_draw:function(c,e,a,f,b,d,g,h){setTimeout(function(){if(!(a>c.view.high||f<c.view.low)){tile_element=c.draw_tile(d,b,g,h);if(tile_element){c.tile_cache.set(e,tile_element);c.max_height=Math.max(c.max_height,tile_element.height());c.content_div.css("height",c.max_height+"px")}}},50)}});var LabelTrack=function(a,b){Track.call(this,null,a,b);this.track_type="LabelTrack";this.hidden=true;this.container_div.addClass("label-track")};$.extend(LabelTrack.prototype,Track.prototype,{draw:function(){var c=this.view,d=c.h
igh-c.low,g=Math.floor(Math.pow(10,Math.floor(Math.log(d)/Math.log(10)))),a=Math.floor(c.low/g)*g,e=this.content_div.width(),b=$("<div style='position: relative; height: 1.3em;'></div>");while(a<c.high){var f=(a-c.low)/d*e;b.append($("<div class='label'>"+commatize(a)+"</div>").css({position:"absolute",left:f-1}));a+=g}this.content_div.children(":first").remove();this.content_div.append(b)}});var ReferenceTrack=function(a){this.track_type="ReferenceTrack";Track.call(this,null,a,a.nav_labeltrack);TiledTrack.call(this);this.hidden=true;this.height_px=12;this.container_div.addClass("reference-track");this.dummy_canvas=$("<canvas></canvas>").get(0).getContext("2d");this.data_queue={};this.data_cache=new Cache(CACHED_DATA);this.tile_cache=new Cache(CACHED_TILES_LINE)};$.extend(ReferenceTrack.prototype,TiledTrack.prototype,{get_data:function(d,b){var c=this,a=b*DENSITY*d,f=(b+1)*DENSITY*d,e=d+"_"+b;if(!c.data_queue[e]){c.data_queue[e]=true;$.ajax({url:reference_url,dataType:"json"
,data:{chrom:this.view.chrom,low:a,high:f,dbkey:this.view.dbkey},success:function(g){c.data_cache.set(e,g);delete c.data_queue[e];c.draw()},error:function(h,g,j){console.log(h,g,j)}})}},draw_tile:function(f,b,k,o){var g=b*DENSITY*f,d=DENSITY*f,e=$("<canvas class='tile'></canvas>"),n=e.get(0).getContext("2d"),j=f+"_"+b;if(o>PX_PER_CHAR){if(this.data_cache.get(j)===undefined){this.get_data(f,b);return}var m=this.data_cache.get(j);if(m===null){return}e.get(0).width=Math.ceil(d*o+this.left_offset);e.get(0).height=this.height_px;e.css({position:"absolute",top:0,left:(g-this.view.low)*o+this.left_offset});for(var h=0,l=m.length;h<l;h++){var a=Math.round(h*o);n.fillText(m[h],a+this.left_offset,10)}k.append(e);return e}}});var LineTrack=function(d,b,a,c){this.track_type="LineTrack";Track.call(this,d,b,b.viewport_container);TiledTrack.call(this);this.height_px=100;this.dataset_id=a;this.data_cache=new Cache(CACHED_DATA);this.tile_cache=new Cache(CACHED_TILES_LINE);this.prefs={min_val
ue:undefined,max_value:undefined,mode:"Line"};if(c.min_value!==undefined){this.prefs.min_value=c.min_value}if(c.max_value!==undefined){this.prefs.max_value=c.max_value}if(c.mode!==undefined){this.prefs.mode=c.mode}};$.extend(LineTrack.prototype,TiledTrack.prototype,{init:function(){var a=this,b=a.view.tracks.indexOf(a);a.vertical_range=undefined;this.init_each({stats:true,chrom:a.view.chrom,low:null,high:null,dataset_id:a.dataset_id},function(c){a.container_div.addClass("line-track");data=c.data;if(isNaN(parseFloat(a.prefs.min_value))||isNaN(parseFloat(a.prefs.max_value))){a.prefs.min_value=data.min;a.prefs.max_value=data.max;$("#track_"+b+"_minval").val(a.prefs.min_value);$("#track_"+b+"_maxval").val(a.prefs.max_value)}a.vertical_range=a.prefs.max_value-a.prefs.min_value;a.total_frequency=data.total_frequency;$("#linetrack_"+b+"_minval").remove();$("#linetrack_"+b+"_maxval").remove();var e=$("<div />").addClass("yaxislabel").attr("id","linetrack_"+b+"_minval").text(a.prefs.
min_value);var d=$("<div />").addClass("yaxislabel").attr("id","linetrack_"+b+"_maxval").text(a.prefs.max_value);d.css({position:"relative",top:"25px",left:"10px"});d.prependTo(a.container_div);e.css({position:"relative",top:a.height_px+55+"px",left:"10px"});e.prependTo(a.container_div)})},get_data:function(d,b){var c=this,a=b*DENSITY*d,f=(b+1)*DENSITY*d,e=d+"_"+b;if(!c.data_queue[e]){c.data_queue[e]=true;$.ajax({url:data_url,dataType:"json",data:{chrom:this.view.chrom,low:a,high:f,dataset_id:this.dataset_id,resolution:this.view.resolution},success:function(g){data=g.data;c.data_cache.set(e,data);delete c.data_queue[e];c.draw()},error:function(h,g,j){console.log(h,g,j)}})}},draw_tile:function(p,r,c,e){if(this.vertical_range===undefined){return}var s=r*DENSITY*p,a=DENSITY*p,b=$("<canvas class='tile'></canvas>"),v=p+"_"+r;if(this.data_cache.get(v)===undefined){this.get_data(p,r);return}var j=this.data_cache.get(v);if(j===null){return}b.css({position:"absolute",top:0,left:(s-th
is.view.low)*e});b.get(0).width=Math.ceil(a*e+this.left_offset);b.get(0).height=this.height_px;var o=b.get(0).getContext("2d"),k=false,l=this.prefs.min_value,g=this.prefs.max_value,n=this.vertical_range,t=this.total_frequency,d=this.height_px,m=this.prefs.mode;o.beginPath();if(data.length>1){var f=Math.ceil((data[1][0]-data[0][0])*e)}else{var f=10}var u,h;for(var q=0;q<data.length;q++){u=(data[q][0]-s)*e;h=data[q][1];if(m=="Intensity"){if(h===null){continue}if(h<=l){h=l}else{if(h>=g){h=g}}h=255-Math.floor((h-l)/n*255);o.fillStyle="rgb("+h+","+h+","+h+")";o.fillRect(u,0,f,this.height_px)}else{if(h===null){if(k&&m==="Filled"){o.lineTo(u,d)}k=false;continue}else{if(h<=l){h=l}else{if(h>=g){h=g}}h=Math.round(d-(h-l)/n*d);if(k){o.lineTo(u,h)}else{k=true;if(m==="Filled"){o.moveTo(u,d);o.lineTo(u,h)}else{o.moveTo(u,h)}}}}}if(m==="Filled"){if(k){o.lineTo(u,d)}o.fill()}else{o.stroke()}c.append(b);return b},gen_options:function(o){var a=$("<div />").addClass("form-row");var h="track_"+
o+"_minval",m=$("<label></label>").attr("for",h).text("Min value:"),b=(this.prefs.min_value===undefined?"":this.prefs.min_value),n=$("<input></input>").attr("id",h).val(b),l="track_"+o+"_maxval",g=$("<label></label>").attr("for",l).text("Max value:"),k=(this.prefs.max_value===undefined?"":this.prefs.max_value),f=$("<input></input>").attr("id",l).val(k),e="track_"+o+"_mode",d=$("<label></label>").attr("for",e).text("Display mode:"),j=(this.prefs.mode===undefined?"Line":this.prefs.mode),c=$('<select id="'+e+'"><option value="Line" id="mode_Line">Line</option><option value="Filled" id="mode_Filled">Filled</option><option value="Intensity" id="mode_Intensity">Intensity</option></select>');c.children("#mode_"+j).attr("selected","selected");return a.append(m).append(n).append(g).append(f).append(d).append(c)},update_options:function(d){var a=$("#track_"+d+"_minval").val(),c=$("#track_"+d+"_maxval").val(),b=$("#track_"+d+"_mode option:selected").val();if(a!==this.prefs.min_value||c
!==this.prefs.max_value||b!==this.prefs.mode){this.prefs.min_value=parseFloat(a);this.prefs.max_value=parseFloat(c);this.prefs.mode=b;this.vertical_range=this.prefs.max_value-this.prefs.min_value;$("#linetrack_"+d+"_minval").text(this.prefs.min_value);$("#linetrack_"+d+"_maxval").text(this.prefs.max_value);this.tile_cache.clear();this.draw()}}});var FeatureTrack=function(d,b,a,c){this.track_type="FeatureTrack";Track.call(this,d,b,b.viewport_container);TiledTrack.call(this);this.height_px=0;this.container_div.addClass("feature-track");this.dataset_id=a;this.zo_slots={};this.show_labels_scale=0.001;this.showing_details=false;this.vertical_detail_px=10;this.vertical_nodetail_px=3;this.default_font="9px Monaco, Lucida Console, monospace";this.inc_slots={};this.data_queue={};this.s_e_by_tile={};this.tile_cache=new Cache(CACHED_TILES_FEATURE);this.data_cache=new Cache(20);this.prefs={block_color:"black",label_color:"black",show_counts:false};if(c.block_color!==undefined){this.pref
s.block_color=c.block_color}if(c.label_color!==undefined){this.prefs.label_color=c.label_color}if(c.show_counts!==undefined){this.prefs.show_counts=c.show_counts}};$.extend(FeatureTrack.prototype,TiledTrack.prototype,{init:function(){var a=this,b=a.view.max_low+"_"+a.view.max_high;a.mode="Auto";if(a.mode_div){a.mode_div.remove()}this.init_each({low:a.view.max_low,high:a.view.max_high,dataset_id:a.dataset_id,chrom:a.view.chrom,resolution:this.view.resolution},function(d){a.mode_div=$("<div class='right-float menubutton popup' />").text("Display Mode");a.header_div.append(a.mode_div);a.mode="Auto";var c=function(e){a.mode_div.text(e);a.mode=e;a.tile_cache.clear();a.draw()};make_popupmenu(a.mode_div,{Auto:function(){c("Auto")},Dense:function(){c("Dense")},Squish:function(){c("Squish")},Pack:function(){c("Pack")}});a.data_cache.set(b,d);a.draw()})},get_data:function(a,d){var b=this,c=a+"_"+d;if(!b.data_queue[c]){b.data_queue[c]=true;$.getJSON(data_url,{chrom:b.view.chrom,low:a,h
igh:d,dataset_id:b.dataset_id,resolution:this.view.resolution,mode:this.mode},function(e){b.data_cache.set(c,e);delete b.data_queue[c];b.draw()})}},incremental_slots:function(a,h,c,r){if(!this.inc_slots[a]){this.inc_slots[a]={};this.inc_slots[a].w_scale=1/a;this.inc_slots[a].mode=r;this.s_e_by_tile[a]={}}var n=this.inc_slots[a].w_scale,z=[],l=0,b=$("<canvas></canvas>").get(0).getContext("2d"),o=this.view.max_low;var B=[];if(this.inc_slots[a].mode!==r){delete this.inc_slots[a];this.inc_slots[a]={mode:r,w_scale:n};delete this.s_e_by_tile[a];this.s_e_by_tile[a]={}}for(var w=0,x=h.length;w<x;w++){var g=h[w],m=g[0];if(this.inc_slots[a][m]!==undefined){l=Math.max(l,this.inc_slots[a][m]);B.push(this.inc_slots[a][m])}else{z.push(w)}}for(var w=0,x=z.length;w<x;w++){var g=h[z[w]],m=g[0],s=g[1],d=g[2],q=g[3],e=Math.floor((s-o)*n),f=Math.ceil((d-o)*n);if(q!==undefined&&!c){var t=b.measureText(q).width;if(e-t<0){f+=t}else{e-=t}}var v=0;while(true){var p=true;if(this.s_e_by_tile[a][v]!==u
ndefined){for(var u=0,A=this.s_e_by_tile[a][v].length;u<A;u++){var y=this.s_e_by_tile[a][v][u];if(f>y[0]&&e<y[1]){p=false;break}}}if(p){if(this.s_e_by_tile[a][v]===undefined){this.s_e_by_tile[a][v]=[]}this.s_e_by_tile[a][v].push([e,f]);this.inc_slots[a][m]=v;l=Math.max(l,v);break}v++}}return l},rect_or_text:function(n,o,f,m,b,d,k,e,h){n.textAlign="center";var j=Math.round(o/2);if((this.mode==="Pack"||this.mode==="Auto")&&d!==undefined&&o>PX_PER_CHAR){n.fillStyle=this.prefs.block_color;n.fillRect(k,h+1,e,9);n.fillStyle="#eee";for(var g=0,l=d.length;g<l;g++){if(b+g>=f&&b+g<=m){var a=Math.floor(Math.max(0,(b+g-f)*o));n.fillText(d[g],a+this.left_offset+j,h+9)}}}else{n.fillStyle=this.prefs.block_color;n.fillRect(k,h+4,e,3)}},draw_tile:function(X,h,n,ak){var E=h*DENSITY*X,ad=(h+1)*DENSITY*X,D=DENSITY*X;var ae=E+"_"+ad;var z=this.data_cache.get(ae);if(z===undefined){this.data_queue[[E,ad]]=true;this.get_data(E,ad);return}var a=Math.ceil(D*ak),L=$("<canvas class='tile'></canvas>"),Z
=this.prefs.label_color,f=this.prefs.block_color,m=this.mode,V=(m==="Squish")||(m==="Dense")&&(m!=="Pack")||(m==="Auto"&&(z.extra_info==="no_detail")),P=this.left_offset,aj,s,al;if(z.dataset_type==="summary_tree"){s=30}else{if(m==="Dense"){s=15;al=10}else{al=(V?this.vertical_nodetail_px:this.vertical_detail_px);s=this.incremental_slots(this.view.zoom_res,z.data,V,m)*al+15;aj=this.inc_slots[this.view.zoom_res]}}L.css({position:"absolute",top:0,left:(E-this.view.low)*ak-P});L.get(0).width=a+P;L.get(0).height=s;n.parent().css("height",Math.max(this.height_px,s)+"px");var A=L.get(0).getContext("2d");A.fillStyle=f;A.font=this.default_font;A.textAlign="right";if(z.dataset_type=="summary_tree"){var K,H=55,ac=255-H,g=ac*2/3,R=z.data,C=z.max,l=z.avg;if(R.length>2){var b=Math.ceil((R[1][0]-R[0][0])*ak)}else{var b=50}for(var ag=0,w=R.length;ag<w;ag++){var T=Math.ceil((R[ag][0]-E)*ak);var S=R[ag][1];if(!S){continue}K=Math.floor(ac-(S/C)*ac);A.fillStyle="rgb("+K+","+K+","+K+")";A.fillRec
t(T+P,0,b,20);if(this.prefs.show_counts){if(K>g){A.fillStyle="black"}else{A.fillStyle="#ddd"}A.textAlign="center";A.fillText(R[ag][1],T+P+(b/2),12)}}n.append(L);return L}var ai=z.data;var af=0;for(var ag=0,w=ai.length;ag<w;ag++){var M=ai[ag],J=M[0],ah=M[1],U=M[2],F=M[3];if(ah<=ad&&U>=E){var W=Math.floor(Math.max(0,(ah-E)*ak)),B=Math.ceil(Math.min(a,Math.max(0,(U-E)*ak))),Q=(m==="Dense"?0:aj[J]*al);if(z.dataset_type==="bai"){A.fillStyle=f;if(M[4] instanceof Array){var t=Math.floor(Math.max(0,(M[4][0]-E)*ak)),I=Math.ceil(Math.min(a,Math.max(0,(M[4][1]-E)*ak))),r=Math.floor(Math.max(0,(M[5][0]-E)*ak)),p=Math.ceil(Math.min(a,Math.max(0,(M[5][1]-E)*ak)));if(M[4][1]>=E&&M[4][0]<=ad){this.rect_or_text(A,ak,E,ad,M[4][0],M[4][2],t+P,I-t,Q)}if(M[5][1]>=E&&M[5][0]<=ad){this.rect_or_text(A,ak,E,ad,M[5][0],M[5][2],r+P,p-r,Q)}if(r>I){A.fillStyle="#999";A.fillRect(I+P,Q+5,r-I,1)}}else{A.fillStyle=f;this.rect_or_text(A,ak,E,ad,ah,F,W+P,B-W,Q)}if(m!=="Dense"&&!V&&ah>E){A.fillStyle=this.prefs
.label_color;if(h===0&&W-A.measureText(F).width<0){A.textAlign="left";A.fillText(J,B+2+P,Q+8)}else{A.textAlign="right";A.fillText(J,W-2+P,Q+8)}A.fillStyle=f}}else{if(z.dataset_type==="interval_index"){if(V){A.fillRect(W+P,Q+5,B-W,1)}else{var v=M[4],O=M[5],Y=M[6],e=M[7];var u,aa,G=null,am=null;if(O&&Y){G=Math.floor(Math.max(0,(O-E)*ak));am=Math.ceil(Math.min(a,Math.max(0,(Y-E)*ak)))}if(m!=="Dense"&&F!==undefined&&ah>E){A.fillStyle=Z;if(h===0&&W-A.measureText(F).width<0){A.textAlign="left";A.fillText(F,B+2+P,Q+8)}else{A.textAlign="right";A.fillText(F,W-2+P,Q+8)}A.fillStyle=f}if(e){if(v){if(v=="+"){A.fillStyle=RIGHT_STRAND}else{if(v=="-"){A.fillStyle=LEFT_STRAND}}A.fillRect(W+P,Q,B-W,10);A.fillStyle=f}for(var ae=0,d=e.length;ae<d;ae++){var o=e[ae],c=Math.floor(Math.max(0,(o[0]-E)*ak)),N=Math.ceil(Math.min(a,Math.max((o[1]-E)*ak)));if(c>N){continue}u=5;aa=3;A.fillRect(c+P,Q+aa,N-c,u);if(G!==undefined&&!(c>am||N<G)){u=9;aa=1;var ab=Math.max(c,G),q=Math.min(N,am);A.fillRect(ab+P,Q
+aa,q-ab,u)}}}else{u=9;aa=1;A.fillRect(W+P,Q+aa,B-W,u);if(M.strand){if(M.strand=="+"){A.fillStyle=RIGHT_STRAND_INV}else{if(M.strand=="-"){A.fillStyle=LEFT_STRAND_INV}}A.fillRect(W+P,Q,B-W,10);A.fillStyle=prefs.block_color}}}}}af++}}n.append(L);return L},gen_options:function(j){var a=$("<div />").addClass("form-row");var e="track_"+j+"_block_color",l=$("<label />").attr("for",e).text("Block color:"),m=$("<input />").attr("id",e).attr("name",e).val(this.prefs.block_color),k="track_"+j+"_label_color",g=$("<label />").attr("for",k).text("Text color:"),h=$("<input />").attr("id",k).attr("name",k).val(this.prefs.label_color),f="track_"+j+"_show_count",c=$("<label />").attr("for",f).text("Show summary counts"),b=$('<input type="checkbox" style="float:left;"></input>').attr("id",f).attr("name",f).attr("checked",this.prefs.show_counts),d=$("<div />").append(b).append(c);return a.append(l).append(m).append(g).append(h).append(d)},update_options:function(e){var b=$("#track_"+e+"_block_
color").val(),d=$("#track_"+e+"_label_color").val(),c=$("#track_"+e+"_mode option:selected").val(),a=$("#track_"+e+"_show_count").attr("checked");if(b!==this.prefs.block_color||d!==this.prefs.label_color||a!==this.prefs.show_counts){this.prefs.block_color=b;this.prefs.label_color=d;this.prefs.show_counts=a;this.tile_cache.clear();this.draw()}}});var ReadTrack=function(d,b,a,c){FeatureTrack.call(this,d,b,a,c);this.track_type="ReadTrack";this.vertical_detail_px=10;this.vertical_nodetail_px=5};$.extend(ReadTrack.prototype,TiledTrack.prototype,FeatureTrack.prototype,{});
+var DENSITY=200,FEATURE_LEVELS=10,DATA_ERROR="There was an error in indexing this dataset. ",DATA_NOCONVERTER="A converter for this dataset is not installed. Please check your datatypes_conf.xml file.",DATA_NONE="No data for this chrom/contig.",DATA_PENDING="Currently indexing... please wait",DATA_LOADING="Loading data...",CACHED_TILES_FEATURE=10,CACHED_TILES_LINE=30,CACHED_DATA=5,CONTEXT=$("<canvas></canvas>").get(0).getContext("2d"),PX_PER_CHAR=CONTEXT.measureText("A").width,RIGHT_STRAND,LEFT_STRAND;var right_img=new Image();right_img.src=image_path+"/visualization/strand_right.png";right_img.onload=function(){RIGHT_STRAND=CONTEXT.createPattern(right_img,"repeat")};var left_img=new Image();left_img.src=image_path+"/visualization/strand_left.png";left_img.onload=function(){LEFT_STRAND=CONTEXT.createPattern(left_img,"repeat")};var right_img_inv=new Image();right_img_inv.src=image_path+"/visualization/strand_right_inv.png";right_img_inv.onload=function(){RIGHT_STRAND_INV=CONT
EXT.createPattern(right_img_inv,"repeat")};var left_img_inv=new Image();left_img_inv.src=image_path+"/visualization/strand_left_inv.png";left_img_inv.onload=function(){LEFT_STRAND_INV=CONTEXT.createPattern(left_img_inv,"repeat")};var Cache=function(a){this.num_elements=a;this.clear()};$.extend(Cache.prototype,{get:function(b){var a=this.key_ary.indexOf(b);if(a!=-1){this.key_ary.splice(a,1);this.key_ary.push(b)}return this.obj_cache[b]},set:function(b,c){if(!this.obj_cache[b]){if(this.key_ary.length>=this.num_elements){var a=this.key_ary.shift();delete this.obj_cache[a]}this.key_ary.push(b)}this.obj_cache[b]=c;return c},clear:function(){this.obj_cache={};this.key_ary=[]}});var View=function(a,c,e,d,b){this.container=a;this.vis_id=d;this.dbkey=b;this.title=e;this.chrom=c;this.tracks=[];this.label_tracks=[];this.max_low=0;this.max_high=0;this.track_id_counter=0;this.zoom_factor=3;this.min_separation=30;this.has_changes=false;this.init();this.reset()};$.extend(View.prototype,{in
it:function(){var b=this.container,a=this;this.top_labeltrack=$("<div/>").addClass("top-labeltrack").appendTo(b);this.content_div=$("<div/>").addClass("content").css("position","relative").appendTo(b);this.viewport_container=$("<div/>").addClass("viewport-container").addClass("viewport-container").appendTo(this.content_div);this.viewport=$("<div/>").addClass("viewport").appendTo(this.viewport_container);this.nav_container=$("<div/>").addClass("nav-container").appendTo(b);this.nav_labeltrack=$("<div/>").addClass("nav-labeltrack").appendTo(this.nav_container);this.nav=$("<div/>").addClass("nav").appendTo(this.nav_container);this.overview=$("<div/>").addClass("overview").appendTo(this.nav);this.overview_viewport=$("<div/>").addClass("overview-viewport").appendTo(this.overview);this.overview_box=$("<div/>").addClass("overview-box").appendTo(this.overview_viewport);this.nav_controls=$("<div/>").addClass("nav-controls").appendTo(this.nav);this.chrom_form=$("<form/>").attr("action"
,function(){void (0)}).appendTo(this.nav_controls);this.chrom_select=$("<select/>").attr({name:"chrom"}).css("width","15em").addClass("no-autocomplete").append("<option value=''>Loading</option>").appendTo(this.chrom_form);this.low_input=$("<input/>").addClass("low").css("width","10em").appendTo(this.chrom_form);$("<span/>").text(" - ").appendTo(this.chrom_form);this.high_input=$("<input/>").addClass("high").css("width","10em").appendTo(this.chrom_form);if(this.vis_id!==undefined){this.hidden_input=$("<input/>").attr("type","hidden").val(this.vis_id).appendTo(this.chrom_form)}this.zi_link=$("<a/>").click(function(){a.zoom_in();a.redraw()}).html('<img src="'+image_path+'/fugue/magnifier-zoom.png" />').appendTo(this.chrom_form);this.zo_link=$("<a/>").click(function(){a.zoom_out();a.redraw()}).html('<img src="'+image_path+'/fugue/magnifier-zoom-out.png" />').appendTo(this.chrom_form);$.ajax({url:chrom_url,data:(this.vis_id!==undefined?{vis_id:this.vis_id}:{dbkey:this.dbkey}),da
taType:"json",success:function(c){if(c.reference){a.add_label_track(new ReferenceTrack(a))}a.chrom_data=c.chrom_info;var e='<option value="">Select Chrom/Contig</option>';for(i in a.chrom_data){var d=a.chrom_data[i]["chrom"];e+='<option value="'+d+'">'+d+"</option>"}a.chrom_select.html(e);a.chrom_select.bind("change",function(){a.chrom=a.chrom_select.val();var g=$.grep(a.chrom_data,function(j,k){return j.chrom===a.chrom})[0];a.max_high=(g.len!==undefined?g.len:0);a.reset();a.redraw(true);for(var h in a.tracks){var f=a.tracks[h];if(f.init){f.init()}}a.redraw()})},error:function(){alert("Could not load chroms for this dbkey:",a.dbkey)}});this.content_div.bind("dblclick",function(c){a.zoom_in(c.pageX,this.viewport_container)});this.overview_box.bind("dragstart",function(c){this.current_x=c.offsetX}).bind("drag",function(c){var f=c.offsetX-this.current_x;this.current_x=c.offsetX;var d=Math.round(f/a.viewport_container.width()*(a.max_high-a.max_low));a.move_delta(-d)});this.viewp
ort_container.bind("dragstart",function(c){this.original_low=a.low;this.current_height=c.clientY;this.current_x=c.offsetX}).bind("drag",function(f){var c=$(this);var h=f.offsetX-this.current_x;var d=c.scrollTop()-(f.clientY-this.current_height);if(d<c.get(0).scrollHeight-c.height()){c.scrollTop(d)}this.current_height=f.clientY;this.current_x=f.offsetX;var g=Math.round(h/a.viewport_container.width()*(a.high-a.low));a.move_delta(g)});this.top_labeltrack.bind("dragstart",function(c){this.drag_origin_x=c.clientX;this.drag_origin_pos=c.clientX/a.viewport_container.width()*(a.high-a.low)+a.low;this.drag_div=$("<div />").css({height:a.content_div.height(),top:"0px",position:"absolute","background-color":"#cfc",border:"1px solid #6a6",opacity:0.5}).appendTo($(this))}).bind("drag",function(h){var d=Math.min(h.clientX,this.drag_origin_x),c=Math.max(h.clientX,this.drag_origin_x),g=(a.high-a.low),f=a.viewport_container.width();a.low_input.val(commatize(Math.round(d/f*g)+a.low));a.high_i
nput.val(commatize(Math.round(c/f*g)+a.low));this.drag_div.css({left:d+"px",width:(c-d)+"px"})}).bind("dragend",function(j){var d=Math.min(j.clientX,this.drag_origin_x),c=Math.max(j.clientX,this.drag_origin_x),g=(a.high-a.low),f=a.viewport_container.width(),h=a.low;a.low=Math.round(d/f*g)+h;a.high=Math.round(c/f*g)+h;this.drag_div.remove();a.redraw()});this.add_label_track(new LabelTrack(this,this.top_labeltrack));this.add_label_track(new LabelTrack(this,this.nav_labeltrack))},move_delta:function(c){var a=this;var b=a.high-a.low;if(a.low-c<a.max_low){a.low=a.max_low;a.high=a.max_low+b}else{if(a.high-c>a.max_high){a.high=a.max_high;a.low=a.max_high-b}else{a.high-=c;a.low-=c}}a.redraw()},add_track:function(a){a.view=this;a.track_id=this.track_id_counter;this.tracks.push(a);if(a.init){a.init()}a.container_div.attr("id","track_"+a.track_id);this.track_id_counter+=1},add_label_track:function(a){a.view=this;this.label_tracks.push(a)},remove_track:function(a){this.has_changes=true;
a.container_div.fadeOut("slow",function(){$(this).remove()});delete this.tracks[this.tracks.indexOf(a)]},update_options:function(){this.has_changes=true;var b=$("ul#sortable-ul").sortable("toArray");for(var c in b){var e=b[c].split("_li")[0].split("track_")[1];this.viewport.append($("#track_"+e))}for(var d in view.tracks){var a=view.tracks[d];if(a&&a.update_options){a.update_options(d)}}},reset:function(){this.low=this.max_low;this.high=this.max_high;this.viewport_container.find(".yaxislabel").remove()},redraw:function(f){var d=this.high-this.low,b=this.low,e=this.high;if(b<this.max_low){b=this.max_low}if(e>this.max_high){e=this.max_high}if(this.high!==0&&d<this.min_separation){e=b+this.min_separation}this.low=Math.floor(b);this.high=Math.ceil(e);this.resolution=Math.pow(10,Math.ceil(Math.log((this.high-this.low)/200)/Math.LN10));this.zoom_res=Math.pow(FEATURE_LEVELS,Math.max(0,Math.ceil(Math.log(this.resolution,FEATURE_LEVELS)/Math.log(FEATURE_LEVELS))));this.overview_box.c
ss({left:(this.low/(this.max_high-this.max_low))*this.overview_viewport.width(),width:Math.max(12,(this.high-this.low)/(this.max_high-this.max_low)*this.overview_viewport.width())}).show();this.low_input.val(commatize(this.low));this.high_input.val(commatize(this.high));if(!f){for(var c=0,a=this.tracks.length;c<a;c++){if(this.tracks[c]&&this.tracks[c].enabled){this.tracks[c].draw()}}for(var c=0,a=this.label_tracks.length;c<a;c++){this.label_tracks[c].draw()}}},zoom_in:function(b,c){if(this.max_high===0||this.high-this.low<this.min_separation){return}var d=this.high-this.low,e=d/2+this.low,a=(d/this.zoom_factor)/2;if(b){e=b/this.viewport_container.width()*(this.high-this.low)+this.low}this.low=Math.round(e-a);this.high=Math.round(e+a);this.redraw()},zoom_out:function(){if(this.max_high===0){return}var b=this.high-this.low,c=b/2+this.low,a=(b*this.zoom_factor)/2;this.low=Math.round(c-a);this.high=Math.round(c+a);this.redraw()}});var Track=function(b,a,c){this.name=b;this.paren
t_element=c;this.view=a;this.init_global()};$.extend(Track.prototype,{init_global:function(){this.header_div=$("<div class='track-header'>").text(this.name);this.content_div=$("<div class='track-content'>");this.container_div=$("<div />").addClass("track").append(this.header_div).append(this.content_div);this.parent_element.append(this.container_div)},init_each:function(c,b){var a=this;a.enabled=false;a.data_queue={};a.tile_cache.clear();a.data_cache.clear();if(!a.content_div.text()){a.content_div.text(DATA_LOADING)}a.container_div.removeClass("nodata error pending");if(a.view.chrom){$.getJSON(data_url,c,function(d){if(!d||d==="error"||d.kind==="error"){a.container_div.addClass("error");a.content_div.text(DATA_ERROR);if(d.message){var f=a.view.tracks.indexOf(a);var e=$("<a href='javascript:void(0);'></a>").attr("id",f+"_error");e.text("Click to view error");$("#"+f+"_error").live("click",function(){show_modal("Trackster Error","<pre>"+d.message+"</pre>",{Close:hide_modal})})
;a.content_div.append(e)}}else{if(d==="no converter"){a.container_div.addClass("error");a.content_div.text(DATA_NOCONVERTER)}else{if(d.data!==undefined&&(d.data===null||d.data.length===0)){a.container_div.addClass("nodata");a.content_div.text(DATA_NONE)}else{if(d==="pending"){a.container_div.addClass("pending");a.content_div.text(DATA_PENDING);setTimeout(function(){a.init()},5000)}else{a.content_div.text("");a.content_div.css("height",a.height_px+"px");a.enabled=true;b(d);a.draw()}}}}})}else{a.container_div.addClass("nodata");a.content_div.text(DATA_NONE)}}});var TiledTrack=function(){this.left_offset=200};$.extend(TiledTrack.prototype,Track.prototype,{draw:function(){var j=this.view.low,e=this.view.high,f=e-j,d=this.view.resolution;var l=$("<div style='position: relative;'></div>"),m=this.content_div.width()/f,h;this.content_div.children(":first").remove();this.content_div.append(l),this.max_height=0;var a=Math.floor(j/d/DENSITY);while((a*DENSITY*d)<e){var k=this.content_di
v.width()+"_"+m+"_"+a;var c=this.tile_cache.get(k);if(c){var g=a*DENSITY*d;var b=(g-j)*m;if(this.left_offset){b-=this.left_offset}c.css({left:b});l.append(c);this.max_height=Math.max(this.max_height,c.height());this.content_div.css("height",this.max_height+"px")}else{this.delayed_draw(this,k,j,e,a,d,l,m)}a+=1}},delayed_draw:function(c,e,a,f,b,d,g,h){setTimeout(function(){if(!(a>c.view.high||f<c.view.low)){tile_element=c.draw_tile(d,b,g,h);if(tile_element){c.tile_cache.set(e,tile_element);c.max_height=Math.max(c.max_height,tile_element.height());c.content_div.css("height",c.max_height+"px")}}},50)}});var LabelTrack=function(a,b){Track.call(this,null,a,b);this.track_type="LabelTrack";this.hidden=true;this.container_div.addClass("label-track")};$.extend(LabelTrack.prototype,Track.prototype,{draw:function(){var c=this.view,d=c.high-c.low,g=Math.floor(Math.pow(10,Math.floor(Math.log(d)/Math.log(10)))),a=Math.floor(c.low/g)*g,e=this.content_div.width(),b=$("<div style='position: r
elative; height: 1.3em;'></div>");while(a<c.high){var f=(a-c.low)/d*e;b.append($("<div class='label'>"+commatize(a)+"</div>").css({position:"absolute",left:f-1}));a+=g}this.content_div.children(":first").remove();this.content_div.append(b)}});var ReferenceTrack=function(a){this.track_type="ReferenceTrack";Track.call(this,null,a,a.nav_labeltrack);TiledTrack.call(this);this.hidden=true;this.height_px=12;this.container_div.addClass("reference-track");this.dummy_canvas=$("<canvas></canvas>").get(0).getContext("2d");this.data_queue={};this.data_cache=new Cache(CACHED_DATA);this.tile_cache=new Cache(CACHED_TILES_LINE)};$.extend(ReferenceTrack.prototype,TiledTrack.prototype,{get_data:function(d,b){var c=this,a=b*DENSITY*d,f=(b+1)*DENSITY*d,e=d+"_"+b;if(!c.data_queue[e]){c.data_queue[e]=true;$.ajax({url:reference_url,dataType:"json",data:{chrom:this.view.chrom,low:a,high:f,dbkey:this.view.dbkey},success:function(g){c.data_cache.set(e,g);delete c.data_queue[e];c.draw()},error:functio
n(h,g,j){console.log(h,g,j)}})}},draw_tile:function(f,b,k,o){var g=b*DENSITY*f,d=DENSITY*f,e=$("<canvas class='tile'></canvas>"),n=e.get(0).getContext("2d"),j=f+"_"+b;if(o>PX_PER_CHAR){if(this.data_cache.get(j)===undefined){this.get_data(f,b);return}var m=this.data_cache.get(j);if(m===null){return}e.get(0).width=Math.ceil(d*o+this.left_offset);e.get(0).height=this.height_px;e.css({position:"absolute",top:0,left:(g-this.view.low)*o+this.left_offset});for(var h=0,l=m.length;h<l;h++){var a=Math.round(h*o);n.fillText(m[h],a+this.left_offset,10)}k.append(e);return e}}});var LineTrack=function(d,b,a,c){this.track_type="LineTrack";Track.call(this,d,b,b.viewport_container);TiledTrack.call(this);this.height_px=100;this.dataset_id=a;this.data_cache=new Cache(CACHED_DATA);this.tile_cache=new Cache(CACHED_TILES_LINE);this.prefs={min_value:undefined,max_value:undefined,mode:"Line"};if(c.min_value!==undefined){this.prefs.min_value=c.min_value}if(c.max_value!==undefined){this.prefs.max_val
ue=c.max_value}if(c.mode!==undefined){this.prefs.mode=c.mode}};$.extend(LineTrack.prototype,TiledTrack.prototype,{init:function(){var a=this,b=a.view.tracks.indexOf(a);a.vertical_range=undefined;this.init_each({stats:true,chrom:a.view.chrom,low:null,high:null,dataset_id:a.dataset_id},function(c){a.container_div.addClass("line-track");data=c.data;if(isNaN(parseFloat(a.prefs.min_value))||isNaN(parseFloat(a.prefs.max_value))){a.prefs.min_value=data.min;a.prefs.max_value=data.max;$("#track_"+b+"_minval").val(a.prefs.min_value);$("#track_"+b+"_maxval").val(a.prefs.max_value)}a.vertical_range=a.prefs.max_value-a.prefs.min_value;a.total_frequency=data.total_frequency;$("#linetrack_"+b+"_minval").remove();$("#linetrack_"+b+"_maxval").remove();var e=$("<div />").addClass("yaxislabel").attr("id","linetrack_"+b+"_minval").text(a.prefs.min_value);var d=$("<div />").addClass("yaxislabel").attr("id","linetrack_"+b+"_maxval").text(a.prefs.max_value);d.css({position:"relative",top:"25px",le
ft:"10px"});d.prependTo(a.container_div);e.css({position:"relative",top:a.height_px+55+"px",left:"10px"});e.prependTo(a.container_div)})},get_data:function(d,b){var c=this,a=b*DENSITY*d,f=(b+1)*DENSITY*d,e=d+"_"+b;if(!c.data_queue[e]){c.data_queue[e]=true;$.ajax({url:data_url,dataType:"json",data:{chrom:this.view.chrom,low:a,high:f,dataset_id:this.dataset_id,resolution:this.view.resolution},success:function(g){data=g.data;c.data_cache.set(e,data);delete c.data_queue[e];c.draw()},error:function(h,g,j){console.log(h,g,j)}})}},draw_tile:function(p,r,c,e){if(this.vertical_range===undefined){return}var s=r*DENSITY*p,a=DENSITY*p,b=$("<canvas class='tile'></canvas>"),v=p+"_"+r;if(this.data_cache.get(v)===undefined){this.get_data(p,r);return}var j=this.data_cache.get(v);if(j===null){return}b.css({position:"absolute",top:0,left:(s-this.view.low)*e});b.get(0).width=Math.ceil(a*e+this.left_offset);b.get(0).height=this.height_px;var o=b.get(0).getContext("2d"),k=false,l=this.prefs.min_v
alue,g=this.prefs.max_value,n=this.vertical_range,t=this.total_frequency,d=this.height_px,m=this.prefs.mode;o.beginPath();if(data.length>1){var f=Math.ceil((data[1][0]-data[0][0])*e)}else{var f=10}var u,h;for(var q=0;q<data.length;q++){u=(data[q][0]-s)*e;h=data[q][1];if(m=="Intensity"){if(h===null){continue}if(h<=l){h=l}else{if(h>=g){h=g}}h=255-Math.floor((h-l)/n*255);o.fillStyle="rgb("+h+","+h+","+h+")";o.fillRect(u,0,f,this.height_px)}else{if(h===null){if(k&&m==="Filled"){o.lineTo(u,d)}k=false;continue}else{if(h<=l){h=l}else{if(h>=g){h=g}}h=Math.round(d-(h-l)/n*d);if(k){o.lineTo(u,h)}else{k=true;if(m==="Filled"){o.moveTo(u,d);o.lineTo(u,h)}else{o.moveTo(u,h)}}}}}if(m==="Filled"){if(k){o.lineTo(u,d)}o.fill()}else{o.stroke()}c.append(b);return b},gen_options:function(o){var a=$("<div />").addClass("form-row");var h="track_"+o+"_minval",m=$("<label></label>").attr("for",h).text("Min value:"),b=(this.prefs.min_value===undefined?"":this.prefs.min_value),n=$("<input></input>").a
ttr("id",h).val(b),l="track_"+o+"_maxval",g=$("<label></label>").attr("for",l).text("Max value:"),k=(this.prefs.max_value===undefined?"":this.prefs.max_value),f=$("<input></input>").attr("id",l).val(k),e="track_"+o+"_mode",d=$("<label></label>").attr("for",e).text("Display mode:"),j=(this.prefs.mode===undefined?"Line":this.prefs.mode),c=$('<select id="'+e+'"><option value="Line" id="mode_Line">Line</option><option value="Filled" id="mode_Filled">Filled</option><option value="Intensity" id="mode_Intensity">Intensity</option></select>');c.children("#mode_"+j).attr("selected","selected");return a.append(m).append(n).append(g).append(f).append(d).append(c)},update_options:function(d){var a=$("#track_"+d+"_minval").val(),c=$("#track_"+d+"_maxval").val(),b=$("#track_"+d+"_mode option:selected").val();if(a!==this.prefs.min_value||c!==this.prefs.max_value||b!==this.prefs.mode){this.prefs.min_value=parseFloat(a);this.prefs.max_value=parseFloat(c);this.prefs.mode=b;this.vertical_range
=this.prefs.max_value-this.prefs.min_value;$("#linetrack_"+d+"_minval").text(this.prefs.min_value);$("#linetrack_"+d+"_maxval").text(this.prefs.max_value);this.tile_cache.clear();this.draw()}}});var FeatureTrack=function(d,b,a,c){this.track_type="FeatureTrack";Track.call(this,d,b,b.viewport_container);TiledTrack.call(this);this.height_px=0;this.container_div.addClass("feature-track");this.dataset_id=a;this.zo_slots={};this.show_labels_scale=0.001;this.showing_details=false;this.vertical_detail_px=10;this.vertical_nodetail_px=3;this.default_font="9px Monaco, Lucida Console, monospace";this.inc_slots={};this.data_queue={};this.s_e_by_tile={};this.tile_cache=new Cache(CACHED_TILES_FEATURE);this.data_cache=new Cache(20);this.prefs={block_color:"black",label_color:"black",show_counts:false};if(c.block_color!==undefined){this.prefs.block_color=c.block_color}if(c.label_color!==undefined){this.prefs.label_color=c.label_color}if(c.show_counts!==undefined){this.prefs.show_counts=c.sho
w_counts}};$.extend(FeatureTrack.prototype,TiledTrack.prototype,{init:function(){var a=this,b=a.view.max_low+"_"+a.view.max_high;a.mode="Auto";if(a.mode_div){a.mode_div.remove()}this.init_each({low:a.view.max_low,high:a.view.max_high,dataset_id:a.dataset_id,chrom:a.view.chrom,resolution:this.view.resolution},function(d){a.mode_div=$("<div class='right-float menubutton popup' />").text("Display Mode");a.header_div.append(a.mode_div);a.mode="Auto";var c=function(e){a.mode_div.text(e);a.mode=e;a.tile_cache.clear();a.draw()};make_popupmenu(a.mode_div,{Auto:function(){c("Auto")},Dense:function(){c("Dense")},Squish:function(){c("Squish")},Pack:function(){c("Pack")}});a.data_cache.set(b,d);a.draw()})},get_data:function(a,d){var b=this,c=a+"_"+d;if(!b.data_queue[c]){b.data_queue[c]=true;$.getJSON(data_url,{chrom:b.view.chrom,low:a,high:d,dataset_id:b.dataset_id,resolution:this.view.resolution,mode:this.mode},function(e){b.data_cache.set(c,e);delete b.data_queue[c];b.draw()})}},incre
mental_slots:function(a,h,c,r){if(!this.inc_slots[a]){this.inc_slots[a]={};this.inc_slots[a].w_scale=1/a;this.inc_slots[a].mode=r;this.s_e_by_tile[a]={}}var n=this.inc_slots[a].w_scale,z=[],l=0,b=$("<canvas></canvas>").get(0).getContext("2d"),o=this.view.max_low;var B=[];if(this.inc_slots[a].mode!==r){delete this.inc_slots[a];this.inc_slots[a]={mode:r,w_scale:n};delete this.s_e_by_tile[a];this.s_e_by_tile[a]={}}for(var w=0,x=h.length;w<x;w++){var g=h[w],m=g[0];if(this.inc_slots[a][m]!==undefined){l=Math.max(l,this.inc_slots[a][m]);B.push(this.inc_slots[a][m])}else{z.push(w)}}for(var w=0,x=z.length;w<x;w++){var g=h[z[w]],m=g[0],s=g[1],d=g[2],q=g[3],e=Math.floor((s-o)*n),f=Math.ceil((d-o)*n);if(q!==undefined&&!c){var t=b.measureText(q).width;if(e-t<0){f+=t}else{e-=t}}var v=0;while(true){var p=true;if(this.s_e_by_tile[a][v]!==undefined){for(var u=0,A=this.s_e_by_tile[a][v].length;u<A;u++){var y=this.s_e_by_tile[a][v][u];if(f>y[0]&&e<y[1]){p=false;break}}}if(p){if(this.s_e_by_ti
le[a][v]===undefined){this.s_e_by_tile[a][v]=[]}this.s_e_by_tile[a][v].push([e,f]);this.inc_slots[a][m]=v;l=Math.max(l,v);break}v++}}return l},rect_or_text:function(n,o,f,m,b,d,k,e,h){n.textAlign="center";var j=Math.round(o/2);if((this.mode==="Pack"||this.mode==="Auto")&&d!==undefined&&o>PX_PER_CHAR){n.fillStyle=this.prefs.block_color;n.fillRect(k,h+1,e,9);n.fillStyle="#eee";for(var g=0,l=d.length;g<l;g++){if(b+g>=f&&b+g<=m){var a=Math.floor(Math.max(0,(b+g-f)*o));n.fillText(d[g],a+this.left_offset+j,h+9)}}}else{n.fillStyle=this.prefs.block_color;n.fillRect(k,h+4,e,3)}},draw_tile:function(X,h,n,ak){var E=h*DENSITY*X,ad=(h+1)*DENSITY*X,D=DENSITY*X;var ae=E+"_"+ad;var z=this.data_cache.get(ae);if(z===undefined){this.data_queue[[E,ad]]=true;this.get_data(E,ad);return}var a=Math.ceil(D*ak),L=$("<canvas class='tile'></canvas>"),Z=this.prefs.label_color,f=this.prefs.block_color,m=this.mode,V=(m==="Squish")||(m==="Dense")&&(m!=="Pack")||(m==="Auto"&&(z.extra_info==="no_detail")),P=
this.left_offset,aj,s,al;if(z.dataset_type==="summary_tree"){s=30}else{if(m==="Dense"){s=15;al=10}else{al=(V?this.vertical_nodetail_px:this.vertical_detail_px);s=this.incremental_slots(this.view.zoom_res,z.data,V,m)*al+15;aj=this.inc_slots[this.view.zoom_res]}}L.css({position:"absolute",top:0,left:(E-this.view.low)*ak-P});L.get(0).width=a+P;L.get(0).height=s;n.parent().css("height",Math.max(this.height_px,s)+"px");var A=L.get(0).getContext("2d");A.fillStyle=f;A.font=this.default_font;A.textAlign="right";if(z.dataset_type=="summary_tree"){var K,H=55,ac=255-H,g=ac*2/3,R=z.data,C=z.max,l=z.avg;if(R.length>2){var b=Math.ceil((R[1][0]-R[0][0])*ak)}else{var b=50}for(var ag=0,w=R.length;ag<w;ag++){var T=Math.ceil((R[ag][0]-E)*ak);var S=R[ag][1];if(!S){continue}K=Math.floor(ac-(S/C)*ac);A.fillStyle="rgb("+K+","+K+","+K+")";A.fillRect(T+P,0,b,20);if(this.prefs.show_counts){if(K>g){A.fillStyle="black"}else{A.fillStyle="#ddd"}A.textAlign="center";A.fillText(R[ag][1],T+P+(b/2),12)}}n.ap
pend(L);return L}var ai=z.data;var af=0;for(var ag=0,w=ai.length;ag<w;ag++){var M=ai[ag],J=M[0],ah=M[1],U=M[2],F=M[3];if(ah<=ad&&U>=E){var W=Math.floor(Math.max(0,(ah-E)*ak)),B=Math.ceil(Math.min(a,Math.max(0,(U-E)*ak))),Q=(m==="Dense"?0:aj[J]*al);if(z.dataset_type==="bai"){A.fillStyle=f;if(M[4] instanceof Array){var t=Math.floor(Math.max(0,(M[4][0]-E)*ak)),I=Math.ceil(Math.min(a,Math.max(0,(M[4][1]-E)*ak))),r=Math.floor(Math.max(0,(M[5][0]-E)*ak)),p=Math.ceil(Math.min(a,Math.max(0,(M[5][1]-E)*ak)));if(M[4][1]>=E&&M[4][0]<=ad){this.rect_or_text(A,ak,E,ad,M[4][0],M[4][2],t+P,I-t,Q)}if(M[5][1]>=E&&M[5][0]<=ad){this.rect_or_text(A,ak,E,ad,M[5][0],M[5][2],r+P,p-r,Q)}if(r>I){A.fillStyle="#999";A.fillRect(I+P,Q+5,r-I,1)}}else{A.fillStyle=f;this.rect_or_text(A,ak,E,ad,ah,F,W+P,B-W,Q)}if(m!=="Dense"&&!V&&ah>E){A.fillStyle=this.prefs.label_color;if(h===0&&W-A.measureText(F).width<0){A.textAlign="left";A.fillText(J,B+2+P,Q+8)}else{A.textAlign="right";A.fillText(J,W-2+P,Q+8)}A.fillStyl
e=f}}else{if(z.dataset_type==="interval_index"){if(V){A.fillRect(W+P,Q+5,B-W,1)}else{var v=M[4],O=M[5],Y=M[6],e=M[7];var u,aa,G=null,am=null;if(O&&Y){G=Math.floor(Math.max(0,(O-E)*ak));am=Math.ceil(Math.min(a,Math.max(0,(Y-E)*ak)))}if(m!=="Dense"&&F!==undefined&&ah>E){A.fillStyle=Z;if(h===0&&W-A.measureText(F).width<0){A.textAlign="left";A.fillText(F,B+2+P,Q+8)}else{A.textAlign="right";A.fillText(F,W-2+P,Q+8)}A.fillStyle=f}if(e){if(v){if(v=="+"){A.fillStyle=RIGHT_STRAND}else{if(v=="-"){A.fillStyle=LEFT_STRAND}}A.fillRect(W+P,Q,B-W,10);A.fillStyle=f}for(var ae=0,d=e.length;ae<d;ae++){var o=e[ae],c=Math.floor(Math.max(0,(o[0]-E)*ak)),N=Math.ceil(Math.min(a,Math.max((o[1]-E)*ak)));if(c>N){continue}u=5;aa=3;A.fillRect(c+P,Q+aa,N-c,u);if(G!==undefined&&!(c>am||N<G)){u=9;aa=1;var ab=Math.max(c,G),q=Math.min(N,am);A.fillRect(ab+P,Q+aa,q-ab,u)}}}else{u=9;aa=1;A.fillRect(W+P,Q+aa,B-W,u);if(M.strand){if(M.strand=="+"){A.fillStyle=RIGHT_STRAND_INV}else{if(M.strand=="-"){A.fillStyle=LEF
T_STRAND_INV}}A.fillRect(W+P,Q,B-W,10);A.fillStyle=prefs.block_color}}}}}af++}}n.append(L);return L},gen_options:function(j){var a=$("<div />").addClass("form-row");var e="track_"+j+"_block_color",l=$("<label />").attr("for",e).text("Block color:"),m=$("<input />").attr("id",e).attr("name",e).val(this.prefs.block_color),k="track_"+j+"_label_color",g=$("<label />").attr("for",k).text("Text color:"),h=$("<input />").attr("id",k).attr("name",k).val(this.prefs.label_color),f="track_"+j+"_show_count",c=$("<label />").attr("for",f).text("Show summary counts"),b=$('<input type="checkbox" style="float:left;"></input>').attr("id",f).attr("name",f).attr("checked",this.prefs.show_counts),d=$("<div />").append(b).append(c);return a.append(l).append(m).append(g).append(h).append(d)},update_options:function(e){var b=$("#track_"+e+"_block_color").val(),d=$("#track_"+e+"_label_color").val(),c=$("#track_"+e+"_mode option:selected").val(),a=$("#track_"+e+"_show_count").attr("checked");if(b!==
this.prefs.block_color||d!==this.prefs.label_color||a!==this.prefs.show_counts){this.prefs.block_color=b;this.prefs.label_color=d;this.prefs.show_counts=a;this.tile_cache.clear();this.draw()}}});var ReadTrack=function(d,b,a,c){FeatureTrack.call(this,d,b,a,c);this.track_type="ReadTrack";this.vertical_detail_px=10;this.vertical_nodetail_px=5};$.extend(ReadTrack.prototype,TiledTrack.prototype,FeatureTrack.prototype,{});
1
0

galaxy-dist commit a37b8a979f7d: Add job.stdout to Job Info page in reports webapp ( patch from Assaf Gordon ), and change the previously displayed job.update_time to now be "Time To Finish", which is the total execution time of the job displayed in hh:mm:ss.
by commits-noreply@bitbucket.org 23 Jul '10
by commits-noreply@bitbucket.org 23 Jul '10
23 Jul '10
# HG changeset patch -- Bitbucket.org
# Project galaxy-dist
# URL http://bitbucket.org/galaxy/galaxy-dist/overview
# User Greg Von Kuster <greg(a)bx.psu.edu>
# Date 1279734781 14400
# Node ID a37b8a979f7d0d040527413695c5828d22ca5e54
# Parent 8ffcaf3d9a0c16d080801f3f81104e829403da41
Add job.stdout to Job Info page in reports webapp ( patch from Assaf Gordon ), and change the previously displayed job.update_time to now be "Time To Finish", which is the total execution time of the job displayed in hh:mm:ss.
--- a/templates/webapps/reports/job_info.mako
+++ b/templates/webapps/reports/job_info.mako
@@ -1,6 +1,8 @@
<%inherit file="/base.mako"/><%namespace file="/message.mako" import="render_msg" />
+<% import datetime %>
+
%if message:
${render_msg( message, 'done' )}
%endif
@@ -13,14 +15,17 @@
<td>State</td><td>Job Id</td><td>Create Time</td>
- <td>Update Time</td>
+ <td>Time To Finish</td><td>Session Id</td></tr><tr><td><div class="count-box state-color-${job.state}">${job.state}</div></td><td>${job.id}</td><td>${job.create_time}</td>
- <td>${job.update_time}</td>
+ <td>
+ <% execute_time = job.update_time - job.create_time %>
+ ${datetime.timedelta( seconds=execute_time.seconds )}
+ </td><td>${job.session_id}</td></tr><tr class="header">
@@ -56,6 +61,12 @@
<td colspan="5">${job.command_line}</td></tr><tr class="header">
+ <td colspan="5">Stdout</td>
+ </tr>
+ <tr>
+ <td colspan="5"><pre>${job.stdout}</pre></td>
+ </tr>
+ <tr class="header"><td colspan="5">Stderr</td></tr><tr>
1
0

galaxy-dist commit 84671d8f4684: Fix for sqlalchemy-migrate scripts so they will function across webapps - galaxy is the default, so no command line changes necessary when migrating the db.
by commits-noreply@bitbucket.org 23 Jul '10
by commits-noreply@bitbucket.org 23 Jul '10
23 Jul '10
# HG changeset patch -- Bitbucket.org
# Project galaxy-dist
# URL http://bitbucket.org/galaxy/galaxy-dist/overview
# User Greg Von Kuster <greg(a)bx.psu.edu>
# Date 1279632434 14400
# Node ID 84671d8f46845b7a5bcfcc8028e68eaf241a5058
# Parent 28e629ad59490af90a28bc45073a7cfc10ed646c
Fix for sqlalchemy-migrate scripts so they will function across webapps - galaxy is the default, so no command line changes necessary when migrating the db.
--- a/manage_db.sh
+++ b/manage_db.sh
@@ -2,7 +2,7 @@
#######
# NOTE: To downgrade to a specific version, use something like:
-# sh manage_db.sh downgrade --version=3
+# sh manage_db.sh downgrade --version=3 <community if using that webapp - galaxy is the default>
#######
cd `dirname $0`
--- a/scripts/manage_db.py
+++ b/scripts/manage_db.py
@@ -12,11 +12,20 @@ pkg_resources.require( "sqlalchemy-migra
from migrate.versioning.shell import main
from ConfigParser import SafeConfigParser
-
log = logging.getLogger( __name__ )
+if sys.argv[-1] in [ 'community' ]:
+ # Need to pop the last arg so the command line args will be correct
+ # for sqlalchemy-migrate
+ webapp = sys.argv.pop()
+ config_file = 'community_wsgi.ini'
+ repo = 'lib/galaxy/webapps/community/model/migrate'
+else:
+ config_file = 'universe_wsgi.ini'
+ repo = 'lib/galaxy/model/migrate'
+
cp = SafeConfigParser()
-cp.read( "universe_wsgi.ini" )
+cp.read( config_file )
if cp.has_option( "app:main", "database_connection" ):
db_url = cp.get( "app:main", "database_connection" )
@@ -43,4 +52,4 @@ except KeyError:
# Let this go, it could possibly work with db's we don't support
log.error( "database_connection contains an unknown SQLAlchemy database dialect: %s" % dialect )
-main( repository='lib/galaxy/model/migrate', url=db_url )
+main( repository=repo, url=db_url )
1
0

galaxy-dist commit a27244147802: Modify tools contributed by Chungoo Park (cxp440@psu.edu) for Linear Discriminant Analysis, and drawing Receiver Operating Characteristic plots; add a new tool to 'Generate A Matrix for using PC and LDA'; remove redundant 'Principal Component Analysis' tool.
by commits-noreply@bitbucket.org 23 Jul '10
by commits-noreply@bitbucket.org 23 Jul '10
23 Jul '10
# HG changeset patch -- Bitbucket.org
# Project galaxy-dist
# URL http://bitbucket.org/galaxy/galaxy-dist/overview
# User Dan Blankenberg <dan(a)bx.psu.edu>
# Date 1279306372 14400
# Node ID a27244147802bd74be35ae24665cc3fc57580f23
# Parent 11fb3bb5b25058b55d927d4dfb39dab1112f290b
Modify tools contributed by Chungoo Park (cxp440(a)psu.edu) for Linear Discriminant Analysis, and drawing Receiver Operating Characteristic plots; add a new tool to 'Generate A Matrix for using PC and LDA'; remove redundant 'Principal Component Analysis' tool.
--- a/test-data/pca_for_lda_output.txt.re_match
+++ /dev/null
@@ -1,87 +0,0 @@
-\"21\.91439361\d*\"
-\"28\.33335569\d*\"
-\"33\.54383183\d*\"
-\"38\.39279966\d*\"
-\"42\.95792886\d*\"
-\"47\.09815550\d*\"
-\"50\.94487376\d*\"
-\"54\.58512629\d*\"
-\"58\.11752456\d*\"
-\"61\.36666878\d*\"
-\"64\.43815007\d*\"
-\"67\.37442210\d*\"
-\"70\.19430653\d*\"
-\"72\.98844264\d*\"
-\"75\.67923231\d*\"
-\"78\.07658354\d*\"
-\"80\.38195983\d*\"
-\"82\.59937656\d*\"
-\"84\.57494344\d*\"
-\"86\.46924307\d*\"
-\"88\.07774382\d*\"
-\"89\.63410862\d*\"
-\"91\.04016474\d*\"
-\"92\.37409738\d*\"
-\"93\.48214466\d*\"
-\"94\.55735875\d*\"
-\"95\.53454224\d*\"
-\"96\.40615879\d*\"
-\"97\.19612900\d*\"
-\"97\.88859479\d*\"
-\"98\.51598802\d*\"
-\"99\.11847048\d*\"
-\"99\.57772251\d*\"
-\"100\"
-\"100\"
-\"100\"
-\"100\"
-\"100\"
-\"100\"
-\"100\"
-\"100\"
-\"100\"
-\"100\"
-\"100\"
-\"100\"
-\"100\"
-\"100\"
-\"100\"
-\"100\"
-\"100\"
-\"100\"
-\"100\"
-\"100\"
-\"100\"
-\"100\"
-\"100\"
-\"100\"
-\"100\"
-\"100\"
-\"100\"
-\"100\"
-\"100\"
-\"100\"
-\"100\"
-\"100\"
-\"100\"
-\"100\"
-\"100\"
-\"100\"
-\"100\"
-\"100\"
-\"100\"
-\"100\"
-\"100\"
-\"100\"
-\"100\"
-\"100\"
-\"100\"
-\"100\"
-\"100\"
-\"100\"
-\"100\"
-\"100\"
-\"100\"
-\"100\"
-\"100\"
-\"100\"
--- a/test-data/pca_for_lda_output.txt
+++ /dev/null
@@ -1,87 +0,0 @@
-"21.9143936160079"
-"28.3333556968471"
-"33.5438318357343"
-"38.3927996693607"
-"42.9579288624902"
-"47.0981555066747"
-"50.9448737656701"
-"54.5851262912127"
-"58.117524563425"
-"61.3666687874078"
-"64.4381500783847"
-"67.3744221025279"
-"70.1943065338356"
-"72.9884426407974"
-"75.6792323125723"
-"78.0765835478277"
-"80.381959836786"
-"82.5993765654159"
-"84.5749434452634"
-"86.4692430753353"
-"88.0777438285547"
-"89.6341086298525"
-"91.0401647492736"
-"92.3740973813576"
-"93.4821446651001"
-"94.5573587555456"
-"95.534542246934"
-"96.4061587978985"
-"97.1961290046054"
-"97.888594796593"
-"98.5159880218074"
-"99.11847048736"
-"99.5777225170877"
-"100"
-"100"
-"100"
-"100"
-"100"
-"100"
-"100"
-"100"
-"100"
-"100"
-"100"
-"100"
-"100"
-"100"
-"100"
-"100"
-"100"
-"100"
-"100"
-"100"
-"100"
-"100"
-"100"
-"100"
-"100"
-"100"
-"100"
-"100"
-"100"
-"100"
-"100"
-"100"
-"100"
-"100"
-"100"
-"100"
-"100"
-"100"
-"100"
-"100"
-"100"
-"100"
-"100"
-"100"
-"100"
-"100"
-"100"
-"100"
-"100"
-"100"
-"100"
-"100"
-"100"
-"100"
--- a/tools/stats/plot_from_lda.xml
+++ b/tools/stats/plot_from_lda.xml
@@ -1,24 +1,24 @@
-<tool id="plot_for_lda_output1" name="Draw ROC">
+<tool id="plot_for_lda_output1" name="Draw ROC" version="1.0.1"><description>Receiver Operating Characteristic plot</description><command interpreter="sh">r_wrapper.sh $script_file</command><inputs>
- <param format="text" name="input" type="data" label="Source file"/>
- <param name="my_title" size="30" type="text" value="ROC" label="Title of your plot" help="See syntax below">
- </param>
-
+ <param format="text" name="input" type="data" label="Source file"></param>
+ <param name="my_title" size="30" type="text" value="My Figure" label="Title of your plot" help="See syntax below"></param>
+ <param name="X_axis" size="30" type="text" value="Text for X axis" label="Legend of X axis in your plot" help="See syntax below"></param>
+ <param name="Y_axis" size="30" type="text" value="Text for Y axis" label="Legend of Y axis in your plot" help="See syntax below"></param></inputs><outputs><data format="pdf" name="pdf_output" />
- <data format="txt" name="desc_output" /></outputs><tests><test><param name="input" value="lda_analy_output.txt"/>
- <param name="my_title" value="Test Plot"/>
+ <param name="my_title" value="Test Plot1"/>
+ <param name="X_axis" value="Test Plot2"/>
+ <param name="Y_axis" value="Test Plot3"/><output name="pdf_output" file="plot_for_lda_output.pdf"/>
- <output name="desc_output" file="empty_file.dat"/></test></tests>
@@ -203,7 +203,7 @@
for (i in 1:nfiles) {
r<-rez_ext[[i]]
#tr
- rate<-rbind(rate, c(files_alias[i]," "," "," ") )
+ # rate<-rbind(rate, c(files_alias[i]," "," "," ") )
mm<-which((r[3,])==max(r[3,]))
m_tr[i]<-mm[1]
@@ -213,9 +213,9 @@
pdf(file= paste("${pdf_output}"))
- plot(rez_ext[[i]][2,]~rez_ext[[i]][3,], xlim=c(0,100), ylim=c(0,100), xlab="X", ylab="Y", type="l", lty=1, col="blue", xaxt='n', yaxt='n')
+ plot(rez_ext[[i]][2,]~rez_ext[[i]][3,], xlim=c(0,100), ylim=c(0,100), xlab="${X_axis} [1-FP(False Positive)]", ylab="${Y_axis} [1-FP(False Positive)]", type="l", lty=1, col="blue", xaxt='n', yaxt='n')
for (i in 1:nfiles) {
- lines(rez_ext[[i]][2,]~rez_ext[[i]][3,], xlab="X", ylab="Y", type="l", lty=1, col=i)
+ lines(rez_ext[[i]][2,]~rez_ext[[i]][3,], xlab="${X_axis} [1-FP(False Positive)]", ylab="${Y_axis} [1-FP(False Positive)]", type="l", lty=1, col=i)
# pt=c(r,)
points(x=rez_ext[[i]][3,m_tr[i]],y=rez_ext[[i]][2,m_tr[i]], pch=16, col=i)
}
@@ -236,27 +236,6 @@
<help>
-.. class:: infomark
-
-**What it does**
-
-This tool consists of the module to perform the Linear Discriminant Analysis as described in Carrel et al., 2006 (PMID: 17009873)
-
-*Carrel L, Park C, Tyekucheva S, Dunn J, Chiaromonte F, et al. (2006) Genomic Environment Predicts Expression Patterns on the Human Inactive X Chromosome. PLoS Genet 2(9): e151. doi:10.1371/journal.pgen.0020151*
-
------
-
-**Example**
-
-- Input file
-
- A output file from "LDA" tool is used to perform it.
-
-- Output file
-
- There are two files produced:
- (1) A summary file for LDA classification success rates with optimal tau
- (2) An image file for plot
</help>
Binary file static/images/tools/lda/second_matrix_generator_example_file.png has changed
--- a/test-data/lda_analy_output.txt
+++ b/test-data/lda_analy_output.txt
@@ -1,119 +1,134 @@
-structure(c(56.1728395061728, 59.5890410958904, 25, 56.1728395061728,
-59.5890410958904, 25, 56.1728395061728, 59.5890410958904, 25,
-56.1728395061728, 59.5890410958904, 25, 56.1728395061728, 59.5890410958904,
-25, 56.1728395061728, 59.5890410958904, 25, 56.1728395061728,
-59.5890410958904, 25, 56.1728395061728, 59.5890410958904, 25,
-56.1728395061728, 59.5890410958904, 25, 56.1728395061728, 59.5890410958904,
-25, 56.1728395061728, 59.5890410958904, 25, 56.1728395061728,
-59.5890410958904, 25, 56.1728395061728, 59.5890410958904, 25,
-56.1728395061728, 59.5890410958904, 25, 56.1728395061728, 59.5890410958904,
-25, 56.1728395061728, 59.5890410958904, 25, 56.1728395061728,
-59.5890410958904, 25, 56.1728395061728, 59.5890410958904, 25,
-55.5555555555556, 58.9041095890411, 25, 55.5555555555556, 58.9041095890411,
-25, 55.5555555555556, 58.9041095890411, 25, 55.5555555555556,
-58.9041095890411, 25, 55.5555555555556, 58.9041095890411, 25,
-55.5555555555556, 58.9041095890411, 25, 55.5555555555556, 58.9041095890411,
-25, 55.5555555555556, 58.9041095890411, 25, 55.5555555555556,
-58.9041095890411, 25, 55.5555555555556, 58.9041095890411, 25,
-55.5555555555556, 58.9041095890411, 25, 54.9382716049383, 58.2191780821918,
-25, 54.9382716049383, 58.2191780821918, 25, 54.9382716049383,
-58.2191780821918, 25, 54.9382716049383, 58.2191780821918, 25,
-54.9382716049383, 58.2191780821918, 25, 54.9382716049383, 58.2191780821918,
-25, 54.9382716049383, 58.2191780821918, 25, 54.9382716049383,
-58.2191780821918, 25, 54.9382716049383, 58.2191780821918, 25,
-54.9382716049383, 58.2191780821918, 25, 54.320987654321, 57.5342465753425,
-25, 53.7037037037037, 56.8493150684932, 25, 53.7037037037037,
-56.8493150684932, 25, 53.7037037037037, 56.8493150684932, 25,
-53.7037037037037, 56.8493150684932, 25, 53.7037037037037, 56.8493150684932,
-25, 53.7037037037037, 56.8493150684932, 25, 53.7037037037037,
-56.8493150684932, 25, 53.7037037037037, 56.8493150684932, 25,
-53.7037037037037, 56.8493150684932, 25, 53.7037037037037, 56.8493150684932,
-25, 53.7037037037037, 56.8493150684932, 25, 53.7037037037037,
-56.8493150684932, 25, 53.7037037037037, 56.8493150684932, 25,
-53.7037037037037, 56.8493150684932, 25, 53.7037037037037, 56.8493150684932,
-25, 53.0864197530864, 56.1643835616438, 25, 53.0864197530864,
-56.1643835616438, 25, 52.4691358024691, 55.4794520547945, 25,
-52.4691358024691, 55.4794520547945, 25, 52.4691358024691, 55.4794520547945,
-25, 52.4691358024691, 55.4794520547945, 25, 52.4691358024691,
-55.4794520547945, 25, 52.4691358024691, 55.4794520547945, 25,
-52.4691358024691, 55.4794520547945, 25, 52.4691358024691, 55.4794520547945,
-25, 51.8518518518519, 54.7945205479452, 25, 51.8518518518519,
-54.7945205479452, 25, 51.8518518518519, 54.7945205479452, 25,
-51.8518518518519, 54.7945205479452, 25, 51.2345679012346, 54.1095890410959,
-25, 51.2345679012346, 54.1095890410959, 25, 51.2345679012346,
-54.1095890410959, 25, 51.2345679012346, 54.1095890410959, 25,
-51.2345679012346, 54.1095890410959, 25, 51.2345679012346, 54.1095890410959,
-25, 51.2345679012346, 54.1095890410959, 25, 51.2345679012346,
-54.1095890410959, 25, 51.2345679012346, 54.1095890410959, 25,
-51.2345679012346, 54.1095890410959, 25, 51.2345679012346, 54.1095890410959,
-25, 51.2345679012346, 54.1095890410959, 25, 51.2345679012346,
-54.1095890410959, 25, 51.2345679012346, 54.1095890410959, 25,
-51.2345679012346, 54.1095890410959, 25, 51.2345679012346, 54.1095890410959,
-25, 51.2345679012346, 54.1095890410959, 25, 51.2345679012346,
-54.1095890410959, 25, 51.2345679012346, 54.1095890410959, 25,
-51.2345679012346, 54.1095890410959, 25, 51.2345679012346, 54.1095890410959,
-25, 51.2345679012346, 54.1095890410959, 25, 51.2345679012346,
-54.1095890410959, 25, 51.2345679012346, 54.1095890410959, 25,
-51.2345679012346, 54.1095890410959, 25, 51.2345679012346, 54.1095890410959,
-25, 51.2345679012346, 54.1095890410959, 25, 51.2345679012346,
-54.1095890410959, 25, 51.2345679012346, 54.1095890410959, 25,
-51.2345679012346, 54.1095890410959, 25, 50.6172839506173, 53.4246575342466,
-25, 50.6172839506173, 53.4246575342466, 25, 50.6172839506173,
-53.4246575342466, 25, 50.6172839506173, 53.4246575342466, 25,
-50.6172839506173, 53.4246575342466, 25, 50.6172839506173, 53.4246575342466,
-25, 50.6172839506173, 53.4246575342466, 25, 50.6172839506173,
-53.4246575342466, 25, 50.6172839506173, 53.4246575342466, 25,
-50.6172839506173, 53.4246575342466, 25, 51.2345679012346, 53.4246575342466,
-31.25, 50.6172839506173, 52.7397260273973, 31.25, 50.6172839506173,
-52.7397260273973, 31.25, 50.6172839506173, 52.7397260273973,
-31.25, 50.6172839506173, 52.7397260273973, 31.25, 50.6172839506173,
-52.7397260273973, 31.25, 50.6172839506173, 52.7397260273973,
-31.25, 50.6172839506173, 52.7397260273973, 31.25, 50.6172839506173,
-52.7397260273973, 31.25, 50.6172839506173, 52.7397260273973,
-31.25, 50.6172839506173, 52.7397260273973, 31.25, 50.6172839506173,
-52.7397260273973, 31.25, 50.6172839506173, 52.7397260273973,
-31.25, 50.6172839506173, 52.7397260273973, 31.25, 50.6172839506173,
-52.7397260273973, 31.25, 50.6172839506173, 52.7397260273973,
-31.25, 50.6172839506173, 52.7397260273973, 31.25, 50.6172839506173,
-52.7397260273973, 31.25, 50.6172839506173, 52.7397260273973,
-31.25, 49.3827160493827, 51.3698630136986, 31.25, 49.3827160493827,
-51.3698630136986, 31.25, 49.3827160493827, 51.3698630136986,
-31.25, 49.3827160493827, 51.3698630136986, 31.25, 49.3827160493827,
-51.3698630136986, 31.25, 49.3827160493827, 51.3698630136986,
-31.25, 49.3827160493827, 51.3698630136986, 31.25, 48.1481481481482,
-50, 31.25, 48.1481481481482, 50, 31.25, 48.1481481481482, 50,
-31.25, 48.1481481481482, 50, 31.25, 48.1481481481482, 50, 31.25,
-48.1481481481482, 50, 31.25, 48.1481481481482, 50, 31.25, 48.1481481481482,
-50, 31.25, 48.1481481481482, 50, 31.25, 48.1481481481482, 50,
-31.25, 48.1481481481482, 50, 31.25, 48.1481481481482, 50, 31.25,
-48.1481481481482, 50, 31.25, 48.1481481481482, 50, 31.25, 48.1481481481482,
-50, 31.25, 48.1481481481482, 50, 31.25, 48.1481481481482, 50,
-31.25, 48.1481481481482, 50, 31.25, 48.1481481481482, 50, 31.25,
-48.1481481481482, 50, 31.25, 48.1481481481482, 50, 31.25, 48.1481481481482,
-50, 31.25, 48.1481481481482, 50, 31.25, 48.1481481481482, 50,
-31.25, 48.1481481481482, 50, 31.25, 48.1481481481482, 50, 31.25,
-48.1481481481482, 50, 31.25, 48.1481481481482, 50, 31.25, 48.1481481481482,
-50, 31.25, 47.5308641975309, 49.3150684931507, 31.25, 46.9135802469136,
-48.6301369863014, 31.25, 46.9135802469136, 48.6301369863014,
-31.25, 46.9135802469136, 48.6301369863014, 31.25, 46.9135802469136,
-48.6301369863014, 31.25, 46.9135802469136, 48.6301369863014,
-31.25, 46.9135802469136, 48.6301369863014, 31.25, 46.9135802469136,
-48.6301369863014, 31.25, 46.9135802469136, 48.6301369863014,
-31.25, 46.9135802469136, 48.6301369863014, 31.25, 46.9135802469136,
-48.6301369863014, 31.25, 46.9135802469136, 48.6301369863014,
-31.25, 46.2962962962963, 47.945205479452, 31.25, 46.2962962962963,
-47.945205479452, 31.25, 46.9135802469136, 47.945205479452, 37.5,
-46.9135802469136, 47.945205479452, 37.5, 46.9135802469136, 47.945205479452,
-37.5, 46.9135802469136, 47.945205479452, 37.5, 46.9135802469136,
-47.945205479452, 37.5, 46.9135802469136, 47.945205479452, 37.5,
-46.9135802469136, 47.945205479452, 37.5, 46.9135802469136, 47.945205479452,
-37.5, 46.2962962962963, 47.2602739726027, 37.5, 46.2962962962963,
-47.2602739726027, 37.5, 46.2962962962963, 47.2602739726027, 37.5,
-46.2962962962963, 47.2602739726027, 37.5, 46.2962962962963, 47.2602739726027,
-37.5, 46.2962962962963, 47.2602739726027, 37.5, 46.2962962962963,
-47.2602739726027, 37.5, 46.2962962962963, 47.2602739726027, 37.5,
-45.679012345679, 46.5753424657534, 37.5, 45.679012345679, 46.5753424657534,
-37.5, 45.679012345679, 46.5753424657534, 37.5, 45.679012345679,
-46.5753424657534, 37.5, 45.679012345679, 46.5753424657534, 37.5,
-45.679012345679, 46.5753424657534, 37.5, 53.7037037037037, 53.4246575342466,
-56.25), .Dim = c(3L, 201L))
+structure(c(37.9310344827586, 23.6363636363636, 62.5, 37.9310344827586,
+23.6363636363636, 62.5, 37.9310344827586, 23.6363636363636, 62.5,
+37.9310344827586, 23.6363636363636, 62.5, 37.9310344827586, 23.6363636363636,
+62.5, 37.9310344827586, 23.6363636363636, 62.5, 37.9310344827586,
+23.6363636363636, 62.5, 37.9310344827586, 23.6363636363636, 62.5,
+37.9310344827586, 23.6363636363636, 62.5, 37.9310344827586, 23.6363636363636,
+62.5, 37.9310344827586, 23.6363636363636, 62.5, 37.9310344827586,
+23.6363636363636, 62.5, 37.9310344827586, 23.6363636363636, 62.5,
+37.9310344827586, 23.6363636363636, 62.5, 37.9310344827586, 23.6363636363636,
+62.5, 37.9310344827586, 23.6363636363636, 62.5, 37.9310344827586,
+23.6363636363636, 62.5, 37.9310344827586, 23.6363636363636, 62.5,
+37.9310344827586, 23.6363636363636, 62.5, 37.9310344827586, 23.6363636363636,
+62.5, 37.9310344827586, 23.6363636363636, 62.5, 39.0804597701149,
+23.6363636363636, 65.625, 39.0804597701149, 23.6363636363636,
+65.625, 39.0804597701149, 23.6363636363636, 65.625, 39.0804597701149,
+23.6363636363636, 65.625, 39.0804597701149, 23.6363636363636,
+65.625, 39.0804597701149, 23.6363636363636, 65.625, 39.0804597701149,
+23.6363636363636, 65.625, 39.0804597701149, 23.6363636363636,
+65.625, 39.0804597701149, 23.6363636363636, 65.625, 39.0804597701149,
+23.6363636363636, 65.625, 39.0804597701149, 23.6363636363636,
+65.625, 39.0804597701149, 23.6363636363636, 65.625, 39.0804597701149,
+23.6363636363636, 65.625, 39.0804597701149, 23.6363636363636,
+65.625, 39.0804597701149, 23.6363636363636, 65.625, 39.0804597701149,
+23.6363636363636, 65.625, 39.0804597701149, 23.6363636363636,
+65.625, 39.0804597701149, 23.6363636363636, 65.625, 39.0804597701149,
+23.6363636363636, 65.625, 39.0804597701149, 23.6363636363636,
+65.625, 39.0804597701149, 23.6363636363636, 65.625, 39.0804597701149,
+23.6363636363636, 65.625, 40.2298850574713, 23.6363636363636,
+68.75, 40.2298850574713, 23.6363636363636, 68.75, 40.2298850574713,
+23.6363636363636, 68.75, 40.2298850574713, 23.6363636363636,
+68.75, 40.2298850574713, 23.6363636363636, 68.75, 40.2298850574713,
+23.6363636363636, 68.75, 40.2298850574713, 23.6363636363636,
+68.75, 40.2298850574713, 23.6363636363636, 68.75, 40.2298850574713,
+23.6363636363636, 68.75, 40.2298850574713, 23.6363636363636,
+68.75, 40.2298850574713, 23.6363636363636, 68.75, 40.2298850574713,
+23.6363636363636, 68.75, 40.2298850574713, 23.6363636363636,
+68.75, 40.2298850574713, 23.6363636363636, 68.75, 40.2298850574713,
+23.6363636363636, 68.75, 40.2298850574713, 23.6363636363636,
+68.75, 40.2298850574713, 23.6363636363636, 68.75, 40.2298850574713,
+23.6363636363636, 68.75, 40.2298850574713, 23.6363636363636,
+68.75, 40.2298850574713, 23.6363636363636, 68.75, 40.2298850574713,
+23.6363636363636, 68.75, 40.2298850574713, 23.6363636363636,
+68.75, 40.2298850574713, 23.6363636363636, 68.75, 40.2298850574713,
+23.6363636363636, 68.75, 40.2298850574713, 23.6363636363636,
+68.75, 40.2298850574713, 23.6363636363636, 68.75, 40.2298850574713,
+23.6363636363636, 68.75, 40.2298850574713, 23.6363636363636,
+68.75, 40.2298850574713, 23.6363636363636, 68.75, 40.2298850574713,
+23.6363636363636, 68.75, 40.2298850574713, 23.6363636363636,
+68.75, 40.2298850574713, 23.6363636363636, 68.75, 40.2298850574713,
+23.6363636363636, 68.75, 40.2298850574713, 23.6363636363636,
+68.75, 40.2298850574713, 23.6363636363636, 68.75, 40.2298850574713,
+23.6363636363636, 68.75, 40.2298850574713, 23.6363636363636,
+68.75, 40.2298850574713, 23.6363636363636, 68.75, 40.2298850574713,
+23.6363636363636, 68.75, 40.2298850574713, 23.6363636363636,
+68.75, 40.2298850574713, 23.6363636363636, 68.75, 40.2298850574713,
+23.6363636363636, 68.75, 40.2298850574713, 23.6363636363636,
+68.75, 40.2298850574713, 23.6363636363636, 68.75, 40.2298850574713,
+23.6363636363636, 68.75, 40.2298850574713, 23.6363636363636,
+68.75, 40.2298850574713, 23.6363636363636, 68.75, 40.2298850574713,
+23.6363636363636, 68.75, 40.2298850574713, 23.6363636363636,
+68.75, 40.2298850574713, 23.6363636363636, 68.75, 40.2298850574713,
+23.6363636363636, 68.75, 39.0804597701149, 21.8181818181818,
+68.75, 39.0804597701149, 21.8181818181818, 68.75, 39.0804597701149,
+21.8181818181818, 68.75, 39.0804597701149, 21.8181818181818,
+68.75, 39.0804597701149, 21.8181818181818, 68.75, 39.0804597701149,
+21.8181818181818, 68.75, 39.0804597701149, 21.8181818181818,
+68.75, 39.0804597701149, 21.8181818181818, 68.75, 39.0804597701149,
+21.8181818181818, 68.75, 40.2298850574713, 21.8181818181818,
+71.875, 40.2298850574713, 21.8181818181818, 71.875, 40.2298850574713,
+21.8181818181818, 71.875, 40.2298850574713, 21.8181818181818,
+71.875, 40.2298850574713, 21.8181818181818, 71.875, 40.2298850574713,
+21.8181818181818, 71.875, 40.2298850574713, 21.8181818181818,
+71.875, 41.3793103448276, 21.8181818181818, 75, 42.5287356321839,
+21.8181818181818, 78.125, 42.5287356321839, 21.8181818181818,
+78.125, 42.5287356321839, 21.8181818181818, 78.125, 42.5287356321839,
+21.8181818181818, 78.125, 42.5287356321839, 21.8181818181818,
+78.125, 42.5287356321839, 21.8181818181818, 78.125, 42.5287356321839,
+21.8181818181818, 78.125, 43.6781609195402, 21.8181818181818,
+81.25, 43.6781609195402, 21.8181818181818, 81.25, 43.6781609195402,
+21.8181818181818, 81.25, 43.6781609195402, 21.8181818181818,
+81.25, 43.6781609195402, 21.8181818181818, 81.25, 43.6781609195402,
+21.8181818181818, 81.25, 43.6781609195402, 21.8181818181818,
+81.25, 43.6781609195402, 21.8181818181818, 81.25, 43.6781609195402,
+21.8181818181818, 81.25, 43.6781609195402, 21.8181818181818,
+81.25, 43.6781609195402, 21.8181818181818, 81.25, 43.6781609195402,
+21.8181818181818, 81.25, 43.6781609195402, 21.8181818181818,
+81.25, 43.6781609195402, 21.8181818181818, 81.25, 43.6781609195402,
+21.8181818181818, 81.25, 43.6781609195402, 21.8181818181818,
+81.25, 43.6781609195402, 21.8181818181818, 81.25, 43.6781609195402,
+21.8181818181818, 81.25, 43.6781609195402, 21.8181818181818,
+81.25, 43.6781609195402, 21.8181818181818, 81.25, 43.6781609195402,
+21.8181818181818, 81.25, 43.6781609195402, 21.8181818181818,
+81.25, 43.6781609195402, 21.8181818181818, 81.25, 43.6781609195402,
+21.8181818181818, 81.25, 43.6781609195402, 21.8181818181818,
+81.25, 43.6781609195402, 21.8181818181818, 81.25, 43.6781609195402,
+21.8181818181818, 81.25, 43.6781609195402, 21.8181818181818,
+81.25, 43.6781609195402, 21.8181818181818, 81.25, 43.6781609195402,
+21.8181818181818, 81.25, 43.6781609195402, 21.8181818181818,
+81.25, 43.6781609195402, 21.8181818181818, 81.25, 43.6781609195402,
+21.8181818181818, 81.25, 43.6781609195402, 21.8181818181818,
+81.25, 43.6781609195402, 21.8181818181818, 81.25, 43.6781609195402,
+21.8181818181818, 81.25, 43.6781609195402, 21.8181818181818,
+81.25, 43.6781609195402, 21.8181818181818, 81.25, 43.6781609195402,
+21.8181818181818, 81.25, 43.6781609195402, 21.8181818181818,
+81.25, 43.6781609195402, 21.8181818181818, 81.25, 43.6781609195402,
+21.8181818181818, 81.25, 43.6781609195402, 21.8181818181818,
+81.25, 43.6781609195402, 21.8181818181818, 81.25, 43.6781609195402,
+21.8181818181818, 81.25, 43.6781609195402, 21.8181818181818,
+81.25, 43.6781609195402, 21.8181818181818, 81.25, 43.6781609195402,
+21.8181818181818, 81.25, 43.6781609195402, 21.8181818181818,
+81.25, 43.6781609195402, 21.8181818181818, 81.25, 43.6781609195402,
+21.8181818181818, 81.25, 43.6781609195402, 21.8181818181818,
+81.25, 43.6781609195402, 21.8181818181818, 81.25, 43.6781609195402,
+21.8181818181818, 81.25, 43.6781609195402, 21.8181818181818,
+81.25, 43.6781609195402, 21.8181818181818, 81.25, 43.6781609195402,
+21.8181818181818, 81.25, 43.6781609195402, 21.8181818181818,
+81.25, 43.6781609195402, 21.8181818181818, 81.25, 43.6781609195402,
+21.8181818181818, 81.25, 43.6781609195402, 21.8181818181818,
+81.25, 43.6781609195402, 21.8181818181818, 81.25, 43.6781609195402,
+21.8181818181818, 81.25, 43.6781609195402, 21.8181818181818,
+81.25, 43.6781609195402, 21.8181818181818, 81.25, 43.6781609195402,
+21.8181818181818, 81.25, 43.6781609195402, 21.8181818181818,
+81.25, 43.6781609195402, 21.8181818181818, 81.25, 43.6781609195402,
+21.8181818181818, 81.25, 43.6781609195402, 21.8181818181818,
+81.25, 43.6781609195402, 21.8181818181818, 81.25, 43.6781609195402,
+21.8181818181818, 81.25, 43.6781609195402, 21.8181818181818,
+81.25, 43.6781609195402, 21.8181818181818, 81.25, 43.6781609195402,
+21.8181818181818, 81.25, 43.6781609195402, 21.8181818181818,
+81.25, 43.6781609195402, 21.8181818181818, 81.25, 43.6781609195402,
+21.8181818181818, 81.25, 43.6781609195402, 21.8181818181818,
+81.25, 43.6781609195402, 21.8181818181818, 81.25, 43.6781609195402,
+21.8181818181818, 81.25, 43.6781609195402, 21.8181818181818,
+81.25, 56.3218390804598, 78.1818181818182, 18.75), .Dim = c(3L,
+201L))
Binary file static/images/tools/lda/first_matrix_generator_example_file.png has changed
Binary file static/images/tools/lda/LDA_Input.png has changed
--- /dev/null
+++ b/tools/stats/generate_matrix_for_pca_lda.xml
@@ -0,0 +1,48 @@
+<tool id="generate_matrix_for_pca_and_lda1" name="Generate A Matrix">
+ <description>for using PC and LDA</description>
+ <command interpreter="perl">generate_matrix_for_pca_lda.pl $input_1 $input_2 $output</command>
+
+ <inputs>
+ <param format="tabular" name="input_1" type="data" label="Source file First: a matrix (samples/observations in rows and variables/features in columns)"></param>
+ <param format="tabular" name="input_2" type="data" label="Source file Second: a table (samples/observations with response/class label)"></param>
+ </inputs>
+
+ <outputs>
+ <data format="tabular" name="output" />
+ </outputs>
+
+ <tests>
+ <test>
+ <param name="input_1" value="matrix_generator_for_pc_and_lda_input_1.tabular"/>
+ <param name="input_2" value="matrix_generator_for_pc_and_lda_input_2.tabular"/>
+ <output name="output" file="matrix_generator_for_pc_and_lda_output.tabular"/>
+ </test>
+ </tests>
+
+ <help>
+
+.. class:: infomark
+
+**What it does**
+
+This tool consists of a module to generate a matrix to be used for running the Linear Discriminant Analysis as described in Carrel et al., 2006 (PMID: 17009873)
+
+*Carrel L, Park C, Tyekucheva S, Dunn J, Chiaromonte F, et al. (2006) Genomic Environment Predicts Expression Patterns on the Human Inactive X Chromosome. PLoS Genet 2(9): e151. doi:10.1371/journal.pgen.0020151*
+
+-----
+
+**Example**
+
+- Input file (Source file First)
+
+.. image:: ../static/images/tools/lda/first_matrix_generator_example_file.png
+
+
+- Input file (Source file Second)
+
+.. image:: ../static/images/tools/lda/second_matrix_generator_example_file.png
+
+
+</help>
+
+</tool>
--- /dev/null
+++ b/tools/stats/generate_matrix_for_pca_lda.pl
@@ -0,0 +1,147 @@
+#!/usr/bin/perl -w
+
+use strict;
+use warnings;
+
+my $Input_Matrix = $ARGV[0];
+my $Input_Label = $ARGV[1];
+
+my %Hash_X = ();
+my %Hash_Y = ();
+my $My_Num_X = 0;
+my $My_Num_Y = 0;
+
+open (OUT, "> $ARGV[2]");
+
+open (LABEL, "< $Input_Label") ||
+ die "Sorry, I couldn't open the escape.txt for clone: $!\n";
+
+my $Label_Index = 0;
+my $X_Label;
+my $input_Label;
+while (defined($input_Label = <LABEL>)){
+ chomp($input_Label);
+ my @cArray_Label = $input_Label =~ /(\S+)\s*/g;
+ if ($input_Label =~ /\w/){
+ if ($Label_Index == 0){
+ $Hash_X{$cArray_Label[0]} = $cArray_Label[1];
+ $X_Label = $cArray_Label[1];
+ $Label_Index = 1;
+ }else{
+ if ($cArray_Label[1] eq $X_Label){
+ $Hash_X{$cArray_Label[0]} = $cArray_Label[1];
+ }else{
+ $Hash_Y{$cArray_Label[0]} = $cArray_Label[1];
+ }
+ }
+ }
+}
+close(LABEL);
+
+open (MATRIX, "< $Input_Matrix") ||
+ die "Sorry, I couldn't open the escape.txt for clone: $!\n";
+
+my %Hash_Matrix = ();
+my %Hash_Features = ();
+my @cArray_Features = ();
+
+my %Hash_Sum = ();
+my $Matrix_Index = 0;
+my $input_Matrix;
+while (defined($input_Matrix = <MATRIX>)){
+ chomp($input_Matrix);
+ my @cArray_Matrix = $input_Matrix =~ /(\S+)\s*/g;
+ if ($input_Matrix =~ /\w/){
+ if ($Matrix_Index == 0){
+ @cArray_Features = @cArray_Matrix;
+ my $Temp_Num_Array = scalar(@cArray_Matrix);
+ my $Temp_Index = 0;
+ for(;$Temp_Index < $Temp_Num_Array; $Temp_Index++){
+ $Hash_Features{$cArray_Matrix[$Temp_Index]} = "BOL";
+ $Hash_Sum{$cArray_Matrix[$Temp_Index]} = 0;
+ }
+ $Matrix_Index = 1;
+ }else{
+ $Hash_Matrix{$cArray_Matrix[0]} = $input_Matrix;
+ }
+ }
+}
+close(MATRIX);
+
+my $Trace_Key;
+
+foreach $Trace_Key (sort {$a cmp $b} keys %Hash_X){
+ my @cArray_Trace_X = $Hash_Matrix{$Trace_Key} =~ /(\S+)\s*/g;
+ my $Num_Array_Feature_X = scalar(@cArray_Features);
+ my $Index_Feature_X = 0;
+ for(;$Index_Feature_X < $Num_Array_Feature_X; $Index_Feature_X++){
+ if ($Hash_Features{$cArray_Features[$Index_Feature_X]} eq "BOL"){
+ $Hash_Features{$cArray_Features[$Index_Feature_X]} = $cArray_Trace_X[$Index_Feature_X + 1];
+ }else{
+ $Hash_Features{$cArray_Features[$Index_Feature_X]} = $Hash_Features{$cArray_Features[$Index_Feature_X]} . "\t" . $cArray_Trace_X[$Index_Feature_X + 1];
+ }
+
+ $Hash_Sum{$cArray_Features[$Index_Feature_X]} += $cArray_Trace_X[$Index_Feature_X + 1];
+ }
+ $My_Num_X ++;
+}
+
+my $Append_Key;
+foreach $Append_Key (keys %Hash_Features){
+ $Hash_Features{$Append_Key} = $Hash_Features{$Append_Key} . "\t" . $Hash_Sum{$Append_Key};
+ $Hash_Sum{$Append_Key} = 0;
+}
+
+foreach $Trace_Key (sort {$a cmp $b} keys %Hash_Y){
+ my @cArray_Trace_Y = $Hash_Matrix{$Trace_Key} =~ /(\S+)\s*/g;
+ my $Num_Array_Feature_Y = scalar(@cArray_Features);
+ my $Index_Feature_Y = 0;
+ for(;$Index_Feature_Y < $Num_Array_Feature_Y; $Index_Feature_Y++){
+ if ($Hash_Features{$cArray_Features[$Index_Feature_Y]} eq "BOL"){
+ $Hash_Features{$cArray_Features[$Index_Feature_Y]} = $cArray_Trace_Y[$Index_Feature_Y + 1];
+ }else{
+ $Hash_Features{$cArray_Features[$Index_Feature_Y]} = $Hash_Features{$cArray_Features[$Index_Feature_Y]} . "\t" . $cArray_Trace_Y[$Index_Feature_Y + 1];
+ }
+
+ $Hash_Sum{$cArray_Features[$Index_Feature_Y]} += $cArray_Trace_Y[$Index_Feature_Y + 1];
+ }
+ $My_Num_Y ++;
+}
+
+foreach $Append_Key (keys %Hash_Features){
+ $Hash_Features{$Append_Key} = $Hash_Features{$Append_Key} . "\t" . $Hash_Sum{$Append_Key} . "\t" . "EOL";
+}
+
+my $Prt_Key;
+print OUT " \t";
+foreach $Prt_Key (sort {$a cmp $b} keys %Hash_X){
+ print OUT "$Prt_Key \t";
+}
+print OUT "X(SUM) \t";
+
+foreach $Prt_Key (sort {$a cmp $b} keys %Hash_Y){
+ print OUT "$Prt_Key \t";
+}
+print OUT "Y(SUM) \t";
+print OUT "\n";
+
+my $Prt_Index = 0;
+my $Prt_Array_Num = scalar (@cArray_Features);
+for(;$Prt_Index < $Prt_Array_Num; $Prt_Index++){
+ print OUT "$cArray_Features[$Prt_Index] \t$Hash_Features{$cArray_Features[$Prt_Index]}\n";
+}
+
+print OUT " \t";
+my $My_Label_Index = 0;
+for(;$My_Label_Index < $My_Num_X; $My_Label_Index++){
+ print OUT "X \t";
+}
+print OUT " \t";
+
+$My_Label_Index = 0;
+for(;$My_Label_Index < $My_Num_Y; $My_Label_Index++){
+ print OUT "Y \t";
+}
+print OUT " \t\n";
+
+close(OUT);
--- a/tools/stats/pca_for_lda.xml
+++ /dev/null
@@ -1,245 +0,0 @@
-<tool id="pca_for_lda1" name="Calculate PC">
- <description>Principal Component Analysis</description>
- <command interpreter="sh">r_wrapper.sh $script_file</command>
-
- <inputs>
- <param format="tabular" name="input" type="data" label="Source file">
- </param>
- </inputs>
-
- <outputs>
- <data format="txt" name="output" />
- </outputs>
-
- <tests>
- <test>
- <param name="input" value="pca_and_lda_analy_for_lda_input.tabular"/>
- <output name="output" file="pca_for_lda_output.txt.re_match" compare="re_match"/>
- </test>
- </tests>
-
- <configfiles>
- <configfile name="script_file">
-
- rm(list = objects() )
-
- ############# FORMAT X DATA #########################
- format<-function(data) {
- ind=NULL
- for(i in 1 : ncol(data)){
- if (is.na(data[nrow(data),i])) {
- ind<-c(ind,i)
- }
- }
- #print(is.null(ind))
- if (!is.null(ind)) {
- data<-data[,-c(ind)]
- }
-
- data
- }
-
- ########GET RESPONSES ###############################
- get_resp<- function(data) {
- resp1<-as.vector(data[,ncol(data)])
- resp=numeric(length(resp1))
- for (i in 1:length(resp1)) {
- if (resp1[i]=="Control ") {
- resp[i] = 0
- }
- if (resp1[i]=="XLMR ") {
- resp[i] = 1
- }
- }
- return(resp)
- }
-
- ######## CHARS TO NUMBERS ###########################
- f_to_numbers<- function(F) {
- ind<-NULL
- G<-matrix(0,nrow(F), ncol(F))
- for (i in 1:nrow(F)) {
- for (j in 1:ncol(F)) {
- G[i,j]<-as.integer(F[i,j])
- }
- }
- return(G)
- }
-
- ###################NORMALIZING#########################
- norm <- function(M, a=NULL, b=NULL) {
- C<-NULL
- ind<-NULL
-
- for (i in 1: ncol(M)) {
- if (sd(M[,i])!=0) {
- M[,i]<-(M[,i]-mean(M[,i]))/sd(M[,i])
- }
- # else {print(mean(M[,i]))}
- }
- return(M)
- }
-
- ##### LDA DIRECTIONS #################################
- lda_dec <- function(data, k){
- priors=numeric(k)
- grandmean<-numeric(ncol(data)-1)
- means=matrix(0,k,ncol(data)-1)
- B = matrix(0, ncol(data)-1, ncol(data)-1)
- N=nrow(data)
- for (i in 1:k){
- priors[i]=sum(data[,1]==i)/N
- grp=subset(data,data\$group==i)
- means[i,]=mean(grp[,2:ncol(data)])
- #print(means[i,])
- #print(priors[i])
- #print(priors[i]*means[i,])
- grandmean = priors[i]*means[i,] + grandmean
- }
-
- for (i in 1:k) {
- B= B + priors[i]*((means[i,]-grandmean)%*%t(means[i,]-grandmean))
- }
-
- W = var(data[,2:ncol(data)])
- svdW = svd(W)
- inv_sqrtW =solve(svdW\$v %*% diag(sqrt(svdW\$d)) %*% t(svdW\$v))
- B_star= t(inv_sqrtW)%*%B%*%inv_sqrtW
- B_star_decomp = svd(B_star)
- directions = inv_sqrtW%*%B_star_decomp\$v
- return( list(directions, B_star_decomp\$d) )
- }
-
- ################ NAIVE BAYES FOR 1D SIR OR LDA ##############
- naive_bayes_classifier <- function(resp, tr_data, test_data, k=2, tau) {
- tr_data=data.frame(resp=resp, dir=tr_data)
- means=numeric(k)
- #print(k)
- cl=numeric(k)
- predclass=numeric(length(test_data))
- for (i in 1:k) {
- grp = subset(tr_data, resp==i)
- means[i] = mean(grp\$dir)
- #print(i, means[i])
- }
- cutoff = tau*means[1]+(1-tau)*means[2]
- #print(tau)
- #print(means)
- #print(cutoff)
- if (cutoff>means[1]) {
- cl[1]=1
- cl[2]=2
- }
- else {
- cl[1]=2
- cl[2]=1
- }
-
- for (i in 1:length(test_data)) {
-
- if (test_data[i] <= cutoff) {
- predclass[i] = cl[1]
- }
- else {
- predclass[i] = cl[2]
- }
- }
- #print(means)
- #print(mean(means))
- #X11()
- #plot(test_data,pch=predclass, col=resp)
- predclass
- }
-
- ################# EXTENDED ERROR RATES #################
- ext_error_rate <- function(predclass, actualclass,msg=c("you forgot the message"), pr=1) {
- er=sum(predclass != actualclass)/length(predclass)
-
- matr<-data.frame(predclass=predclass,actualclass=actualclass)
- escapes = subset(matr, actualclass==1)
- subjects = subset(matr, actualclass==2)
- er_esc=sum(escapes\$predclass != escapes\$actualclass)/length(escapes\$predclass)
- er_subj=sum(subjects\$predclass != subjects\$actualclass)/length(subjects\$predclass)
-
- if (pr==1) {
- # print(paste(c(msg, 'overall : ', (1-er)*100, "%."),collapse=" "))
- # print(paste(c(msg, 'within escapes : ', (1-er_esc)*100, "%."),collapse=" "))
- # print(paste(c(msg, 'within subjects: ', (1-er_subj)*100, "%."),collapse=" "))
- }
- return(c((1-er)*100, (1-er_esc)*100, (1-er_subj)*100))
- }
-
- ## Main Function ##
-
- files<-matrix("${input}", 1,1, byrow=T)
-
- tau<-seq(0,1, by=0.005)
- #tau<-seq(0,1, by=0.1)
- for_curve=matrix(-10, 3,length(tau))
-
- ##############################################################
-
- test_data_whole_X <-read.delim(files[1,1], row.names=1)
-
- #### FORMAT TRAINING DATA ####################################
- # get only necessary columns
-
- test_data_whole_X<-format(test_data_whole_X)
- oligo_labels<-test_data_whole_X[1:(nrow(test_data_whole_X)-1),ncol(test_data_whole_X)]
- test_data_whole_X<-test_data_whole_X[,1:(ncol(test_data_whole_X)-1)]
-
- X_names<-colnames(test_data_whole_X)[1:ncol(test_data_whole_X)]
- test_data_whole_X<-t(test_data_whole_X)
- resp<-get_resp(test_data_whole_X)
- ldaqda_resp = resp + 1
- a<-sum(resp) # Number of Subject
- b<-length(resp) - a # Number of Escape
- ## FREQUENCIES #################################################
- F<-test_data_whole_X[,1:(ncol(test_data_whole_X)-1)]
- F<-f_to_numbers(F)
- FN<-norm(F, a, b)
- ss<-svd(FN)
- eigvar<-NULL
- eig<-ss\$d^2
-
- print_out <- c(rep('NA', length(ss\$d)))
- for ( i in 1:length(ss\$d)) {
- eigvar[i]<-sum(eig[1:i])/sum(eig)
- # print(paste(c("Variance explained : ", eigvar[i]*100, " %"), collapse=""))
- print_out[i] <- c(eigvar[i]*100)
- }
-
- #My_Names <- c("order of principal components", "accumulated variance explained", "")
- #names(print_out)<-My_Names
-
- write.table(print_out, file = "${output}", col.names = FALSE, row.names = FALSE)
-
- </configfile>
- </configfiles>
-
- <help>
-
-.. class:: infomark
-
-**What it does**
-
-This tool consists of the first module to perform the Principal Component Analysis as described in Carrel et al., 2006 (PMID: 17009873)
-
-*Carrel L, Park C, Tyekucheva S, Dunn J, Chiaromonte F, et al. (2006) Genomic Environment Predicts Expression Patterns on the Human Inactive X Chromosome. PLoS Genet 2(9): e151. doi:10.1371/journal.pgen.0020151*
-
------
-
-**Example**
-
-- Input file
-
-.. image:: ../static/images/tools/lda/LDA_Input.png
-
-- Output file
-
- The values indicate "accumulated variance explained (%)" and were sorted by the order of principal components (i.e., 1st, 2nd, 3rd, 4th...).
-
-
-</help>
-
-</tool>
--- a/tool_conf.xml.sample
+++ b/tool_conf.xml.sample
@@ -129,7 +129,7 @@
<tool file="stats/gsummary.xml" /><tool file="filters/uniq.xml" /><tool file="stats/cor.xml" />
- <tool file="stats/pca_for_lda.xml" />
+ <tool file="stats/generate_matrix_for_pca_lda.xml" /><tool file="stats/lda_analy.xml" /><tool file="stats/plot_from_lda.xml" /><tool file="regVariation/t_test_two_samples.xml" />
--- /dev/null
+++ b/test-data/matrix_generator_for_pc_and_lda_input_1.tabular
@@ -0,0 +1,88 @@
+ CTCAGAAAAAAA CCATCCATCCATCCATCC AGAGGGAGAGGG ATCTGTTGATGG AGGGGTGACAGA ATCCCATTTACA AAGGGTATCAGT ATAATATATACA TATTATATGTATA CATCATCATCATCA CCCCATGATCCA TGATTCCTTAAAGAA AACACTTGGACA TATTAATATAATTTATAAA ATGTTTATTTTA TATCCAGGAGAA CAATTCTCCTGCC ACCATAAAAATGAGAAC CTCAGCCATAAAAA ATGAGTGAGAATAT ACTGTGAGTCAA TAAACTAAAGAGCTTCTGCACAGCA TCCTTTGGGTATAT ATGCTGCTATAAAGACACATGCACAC TGCTGGAGAGGATGTGGAGAAATAGGAACACTTTTACACTG TCCACAATGGTTGAA TTGGCTGCATAAAT CAATGGAACAGAACAGAGCCCTCAGAAATAA GAACTAGAAATACCATTTGACCCAGC TCAAAGATCAGAT GACCCATCTCACACCAGTTAGAATG CAAAGAGAATAAAATACCTAGGTATTTTATTCTTTTT AAAATGGCCATACTGCCCAAG AAATTTTTCCAATTCTGTGAAGAAA TTCACAATAGCAAAGAC TAGGAAGAATCAATA CTGGGTATATACCCAGTAATGG TTGGAAGTTCTGGCCAGGGCAA TGAAGGACCTCTTCAAGGAGAACTACAAACCACTGCTCAA CTCTCACCACTCCTATTCAACATA ACACACACATAT CCATGAGCATGGAATGTTCT AACCCAAATGTCC TTTACAAGAAAAAAACAAACAACCCCA AGTTCTAGATCC CTGGAAGCATTCCCTTT GATCCCATTTGTC GATATGAACAGACA TGGGTTTGTCATA AGTTTCTTTTGC A
ATTACCCAGTCT TCATGTCATCTGCAAACA AAAACTCTCAAT CAACTTCAGCAA ATTGGCTGTGGGTTT AATTAGATCCCA GACCTAAAACCA AGAATCTACAAT AAACCAAACACC GGAGTTCCAGACCAGCCT CCTTGCCCATGCC ATCATACTGAAT AGGAAGTCAAATT AGCAAACCACCA AGCATGATTTATA GAGAGCCAAATCATGAGTG AAAGAGCCAAAT AGCAATTGTGAATGG CACTATTCACAATTGC TCAGGATACAAAATCAATG CAATGAACTCAAACAAATT TCCAACAAAGGACATGAACTCATC AATTGAACAATGAGAACATGTGGTAT AACCACAATGAGAACA GTGTATATATATACAT ACATATATATAT GTCAGATGGATA TCATCTGACAAAGGGCTAATATCCAG TTTGTCAGGTTTGTCAAAG TTCTTAATCCAGTCTATCATT TTTAATCCATCTTGA AAACTACCATCAGAGTGAACAGGCA GCCATCAGAGAAAT ACAGGCAACCTACA GCAACCTACTCA TAGAAAACCCCAT
+ARHGEF9 0 0 0 0 0 0 0 0 1 0 0 0 2 0 1 0 0 3 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0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
--- a/tools/stats/lda_analy.xml
+++ b/tools/stats/lda_analy.xml
@@ -1,9 +1,9 @@
-<tool id="lda_analy1" name="Perform LDA">
+<tool id="lda_analy1" name="Perform LDA" version="1.0.1"><description>Linear Discriminant Analysis</description><command interpreter="sh">r_wrapper.sh $script_file</command><inputs><param format="tabular" name="input" type="data" label="Source file"/>
- <param name="cond" size="30" type="integer" value="3" label="Number of principal components" help="See syntax below">
+ <param name="cond" size="30" type="integer" value="3" label="Number of principal components" help="See TIP below"><validator type="empty_field" message="Enter a valid number of principal components, see syntax below for examples"/></param>
@@ -14,7 +14,7 @@
<tests><test>
- <param name="input" value="pca_and_lda_analy_for_lda_input.tabular"/>
+ <param name="input" value="matrix_generator_for_pc_and_lda_output.tabular"/><output name="output" file="lda_analy_output.txt"/><param name="cond" value="2"/>
@@ -47,10 +47,10 @@
resp1<-as.vector(data[,ncol(data)])
resp=numeric(length(resp1))
for (i in 1:length(resp1)) {
- if (resp1[i]=="Control ") {
+ if (resp1[i]=="Y ") {
resp[i] = 0
}
- if (resp1[i]=="XLMR ") {
+ if (resp1[i]=="X ") {
resp[i] = 1
}
}
@@ -256,6 +256,12 @@
<help>
+.. class:: infomark
+
+**TIP:** If you want to perform Principal Component Analysis (PCA) on the give numeric input data (which corresponds to the "Source file First in "Generate A Matrix" tool), please use *Multivariate Analysis/Principal Component Analysis*
+
+-----
+
.. class:: infomark
**What it does**
@@ -266,16 +272,13 @@ This tool consists of the module to perf
-----
-**Example**
+.. class:: warningmark
-- Input file
+**Note**
-.. image:: ../static/images/tools/lda/LDA_Input.png
+- Output from "Generate A Matrix" tool is used as input file for this tool
+- Output of this tool contains LDA classification success rates for different values of the turning parameter tau (from 0 to 1 with 0.005 interval). This output file will be used to establish the ROC plot, and you can obtain more detail information from this plot.
-- Output file
-
- LDA classification success rates for different values of the turning parameter tau (from 0 to 1 with 0.005 interval).
- This output file will be used to establish the ROC plot.
</help>
--- /dev/null
+++ b/test-data/matrix_generator_for_pc_and_lda_output.tabular
@@ -0,0 +1,88 @@
+ AGTR2 ARHGEF9 BRWD3 CLCN5 FMR1 GPC3 GPR173 GRIA3 GSPT2 HUWE1 KIAA2022 KLF8 MAGEH1 MTM1 NUDT10 NUDT11 PAGE1 PAGE4 PAK3 PCSK1N PGK1 PHF6 RRAGB SHROOM4 SOX3 TMEM29 TRO TSR2 USP51 UXT ZDHHC15 ZDHHC9 X(SUM) APOOL AR BEX4 BEX5 CHIC1 CHM CPXCR1 CSTF2 CXCR3 CXorf26 CYSLTR1 DACH2 DIAPH2 DRP2 EDA ESX1 FGF16 FXYD8 GPR23 HDX HEPH IL1RAPL2 ITM2A KIAA1166 KLHL4 LAS1L MAGEE1 MAGEE2 MSN MTMR8 NAP1L2 NRK NSBP1 NXF3 P2RY10 PABPC5 POF1B RNF12 RPS6KA6 SLC7A3 SPIN2A SPIN3 SPIN4 STARD8 SYTL4 TAF9B TBX22 TCEAL2 TCEAL4 TMEM28 UBQLN2 UPRT ZCCHC5 ZNF711 ZXDA Y(SUM)
+CTCAGAAAAAAA 0 0 0 0 0 0 0 0 0 0 1 0 0 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 EOL
+CCATCCATCCATCCATCC 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 3 0 0 0 0 0 0 0 0 0 4 3 0 0 0 1 0 3 3 0 0 0 3 2 0 0 0 0 3 0 0 0 0 0 0 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0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 2 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0 0 0 7 EOL
+TAGAAAACCCCAT 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 3 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 2 0 0 8 EOL
+ X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y
--- a/test-data/plot_for_lda_output.pdf
+++ b/test-data/plot_for_lda_output.pdf
@@ -2,8 +2,8 @@
%���ρ�r
1 0 obj
<<
-/CreationDate (D:20100525153422)
-/ModDate (D:20100525153422)
+/CreationDate (D:20100716143839)
+/ModDate (D:20100716143839)
/Title (R Graphics Output)
/Producer (R 2.10.1)
/Creator (R)
@@ -36,205 +36,205 @@ 0.75 w
1 J
1 j
10.00 M
-170.40 292.19 m
-170.40 292.19 l
-170.40 292.19 l
-170.40 292.19 l
-170.40 292.19 l
-170.40 292.19 l
-170.40 292.19 l
-170.40 292.19 l
-170.40 292.19 l
-170.40 292.19 l
-170.40 292.19 l
-170.40 292.19 l
-170.40 292.19 l
-170.40 292.19 l
-170.40 292.19 l
-170.40 292.19 l
-170.40 292.19 l
-170.40 292.19 l
-170.40 289.83 l
-170.40 289.83 l
-170.40 289.83 l
-170.40 289.83 l
-170.40 289.83 l
-170.40 289.83 l
-170.40 289.83 l
-170.40 289.83 l
-170.40 289.83 l
-170.40 289.83 l
-170.40 289.83 l
-170.40 287.47 l
-170.40 287.47 l
-170.40 287.47 l
-170.40 287.47 l
-170.40 287.47 l
-170.40 287.47 l
-170.40 287.47 l
-170.40 287.47 l
-170.40 287.47 l
-170.40 287.47 l
-170.40 285.12 l
-170.40 282.76 l
-170.40 282.76 l
-170.40 282.76 l
-170.40 282.76 l
-170.40 282.76 l
-170.40 282.76 l
-170.40 282.76 l
-170.40 282.76 l
-170.40 282.76 l
-170.40 282.76 l
-170.40 282.76 l
-170.40 282.76 l
-170.40 282.76 l
-170.40 282.76 l
-170.40 282.76 l
-170.40 280.41 l
-170.40 280.41 l
-170.40 278.05 l
-170.40 278.05 l
-170.40 278.05 l
-170.40 278.05 l
-170.40 278.05 l
-170.40 278.05 l
-170.40 278.05 l
-170.40 278.05 l
-170.40 275.69 l
-170.40 275.69 l
-170.40 275.69 l
-170.40 275.69 l
-170.40 273.34 l
-170.40 273.34 l
-170.40 273.34 l
-170.40 273.34 l
-170.40 273.34 l
-170.40 273.34 l
-170.40 273.34 l
-170.40 273.34 l
-170.40 273.34 l
-170.40 273.34 l
-170.40 273.34 l
-170.40 273.34 l
-170.40 273.34 l
-170.40 273.34 l
-170.40 273.34 l
-170.40 273.34 l
-170.40 273.34 l
-170.40 273.34 l
-170.40 273.34 l
-170.40 273.34 l
-170.40 273.34 l
-170.40 273.34 l
-170.40 273.34 l
-170.40 273.34 l
-170.40 273.34 l
-170.40 273.34 l
-170.40 273.34 l
-170.40 273.34 l
-170.40 273.34 l
-170.40 273.34 l
-170.40 270.98 l
-170.40 270.98 l
-170.40 270.98 l
-170.40 270.98 l
-170.40 270.98 l
-170.40 270.98 l
-170.40 270.98 l
-170.40 270.98 l
-170.40 270.98 l
-170.40 270.98 l
-194.40 270.98 l
-194.40 268.62 l
-194.40 268.62 l
-194.40 268.62 l
-194.40 268.62 l
-194.40 268.62 l
-194.40 268.62 l
-194.40 268.62 l
-194.40 268.62 l
-194.40 268.62 l
-194.40 268.62 l
-194.40 268.62 l
-194.40 268.62 l
-194.40 268.62 l
-194.40 268.62 l
-194.40 268.62 l
-194.40 268.62 l
-194.40 268.62 l
-194.40 268.62 l
-194.40 263.91 l
-194.40 263.91 l
-194.40 263.91 l
-194.40 263.91 l
-194.40 263.91 l
-194.40 263.91 l
-194.40 263.91 l
-194.40 259.20 l
-194.40 259.20 l
-194.40 259.20 l
-194.40 259.20 l
-194.40 259.20 l
-194.40 259.20 l
-194.40 259.20 l
-194.40 259.20 l
-194.40 259.20 l
-194.40 259.20 l
-194.40 259.20 l
-194.40 259.20 l
-194.40 259.20 l
-194.40 259.20 l
-194.40 259.20 l
-194.40 259.20 l
-194.40 259.20 l
-194.40 259.20 l
-194.40 259.20 l
-194.40 259.20 l
-194.40 259.20 l
-194.40 259.20 l
-194.40 259.20 l
-194.40 259.20 l
-194.40 259.20 l
-194.40 259.20 l
-194.40 259.20 l
-194.40 259.20 l
-194.40 259.20 l
-194.40 256.84 l
-194.40 254.49 l
-194.40 254.49 l
-194.40 254.49 l
-194.40 254.49 l
-194.40 254.49 l
-194.40 254.49 l
-194.40 254.49 l
-194.40 254.49 l
-194.40 254.49 l
-194.40 254.49 l
-194.40 254.49 l
-194.40 252.13 l
-194.40 252.13 l
-218.40 252.13 l
-218.40 252.13 l
-218.40 252.13 l
-218.40 252.13 l
-218.40 252.13 l
-218.40 252.13 l
-218.40 252.13 l
-218.40 252.13 l
-218.40 249.78 l
-218.40 249.78 l
-218.40 249.78 l
-218.40 249.78 l
-218.40 249.78 l
-218.40 249.78 l
-218.40 249.78 l
-218.40 249.78 l
-218.40 247.42 l
-218.40 247.42 l
-218.40 247.42 l
-218.40 247.42 l
-218.40 247.42 l
+314.40 168.51 m
+314.40 168.51 l
+314.40 168.51 l
+314.40 168.51 l
+314.40 168.51 l
+314.40 168.51 l
+314.40 168.51 l
+314.40 168.51 l
+314.40 168.51 l
+314.40 168.51 l
+314.40 168.51 l
+314.40 168.51 l
+314.40 168.51 l
+314.40 168.51 l
+314.40 168.51 l
+314.40 168.51 l
+314.40 168.51 l
+314.40 168.51 l
+314.40 168.51 l
+314.40 168.51 l
+314.40 168.51 l
+326.40 168.51 l
+326.40 168.51 l
+326.40 168.51 l
+326.40 168.51 l
+326.40 168.51 l
+326.40 168.51 l
+326.40 168.51 l
+326.40 168.51 l
+326.40 168.51 l
+326.40 168.51 l
+326.40 168.51 l
+326.40 168.51 l
+326.40 168.51 l
+326.40 168.51 l
+326.40 168.51 l
+326.40 168.51 l
+326.40 168.51 l
+326.40 168.51 l
+326.40 168.51 l
+326.40 168.51 l
+326.40 168.51 l
+326.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 162.25 l
+338.40 162.25 l
+338.40 162.25 l
+338.40 162.25 l
+338.40 162.25 l
+338.40 162.25 l
+338.40 162.25 l
+338.40 162.25 l
+338.40 162.25 l
+350.40 162.25 l
+350.40 162.25 l
+350.40 162.25 l
+350.40 162.25 l
+350.40 162.25 l
+350.40 162.25 l
+350.40 162.25 l
+362.40 162.25 l
+374.40 162.25 l
+374.40 162.25 l
+374.40 162.25 l
+374.40 162.25 l
+374.40 162.25 l
+374.40 162.25 l
+374.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
S
Q q
0.000 0.000 0.000 RG
@@ -252,10 +252,10 @@ S
Q q
BT
0.000 0.000 0.000 rg
-/F2 1 Tf 12.00 0.00 -0.00 12.00 262.40 18.72 Tm (X) Tj
+/F2 1 Tf 12.00 0.00 -0.00 12.00 176.67 18.72 Tm [(T) 120 (est Plot2 [1-FP\(F) 50 (alse P) 50 (ositiv) 25 (e\)])] TJ
ET
BT
-/F2 1 Tf 0.00 12.00 -12.00 0.00 12.96 255.20 Tm (Y) Tj
+/F2 1 Tf 0.00 12.00 -12.00 0.00 12.96 169.47 Tm [(T) 120 (est Plot3 [1-FP\(F) 50 (alse P) 50 (ositiv) 25 (e\)])] TJ
ET
Q q 59.04 73.44 414.72 371.52 re W n
0.000 0.000 0.000 RG
@@ -264,214 +264,214 @@ 0.75 w
1 J
1 j
10.00 M
-170.40 292.19 m
-170.40 292.19 l
-170.40 292.19 l
-170.40 292.19 l
-170.40 292.19 l
-170.40 292.19 l
-170.40 292.19 l
-170.40 292.19 l
-170.40 292.19 l
-170.40 292.19 l
-170.40 292.19 l
-170.40 292.19 l
-170.40 292.19 l
-170.40 292.19 l
-170.40 292.19 l
-170.40 292.19 l
-170.40 292.19 l
-170.40 292.19 l
-170.40 289.83 l
-170.40 289.83 l
-170.40 289.83 l
-170.40 289.83 l
-170.40 289.83 l
-170.40 289.83 l
-170.40 289.83 l
-170.40 289.83 l
-170.40 289.83 l
-170.40 289.83 l
-170.40 289.83 l
-170.40 287.47 l
-170.40 287.47 l
-170.40 287.47 l
-170.40 287.47 l
-170.40 287.47 l
-170.40 287.47 l
-170.40 287.47 l
-170.40 287.47 l
-170.40 287.47 l
-170.40 287.47 l
-170.40 285.12 l
-170.40 282.76 l
-170.40 282.76 l
-170.40 282.76 l
-170.40 282.76 l
-170.40 282.76 l
-170.40 282.76 l
-170.40 282.76 l
-170.40 282.76 l
-170.40 282.76 l
-170.40 282.76 l
-170.40 282.76 l
-170.40 282.76 l
-170.40 282.76 l
-170.40 282.76 l
-170.40 282.76 l
-170.40 280.41 l
-170.40 280.41 l
-170.40 278.05 l
-170.40 278.05 l
-170.40 278.05 l
-170.40 278.05 l
-170.40 278.05 l
-170.40 278.05 l
-170.40 278.05 l
-170.40 278.05 l
-170.40 275.69 l
-170.40 275.69 l
-170.40 275.69 l
-170.40 275.69 l
-170.40 273.34 l
-170.40 273.34 l
-170.40 273.34 l
-170.40 273.34 l
-170.40 273.34 l
-170.40 273.34 l
-170.40 273.34 l
-170.40 273.34 l
-170.40 273.34 l
-170.40 273.34 l
-170.40 273.34 l
-170.40 273.34 l
-170.40 273.34 l
-170.40 273.34 l
-170.40 273.34 l
-170.40 273.34 l
-170.40 273.34 l
-170.40 273.34 l
-170.40 273.34 l
-170.40 273.34 l
-170.40 273.34 l
-170.40 273.34 l
-170.40 273.34 l
-170.40 273.34 l
-170.40 273.34 l
-170.40 273.34 l
-170.40 273.34 l
-170.40 273.34 l
-170.40 273.34 l
-170.40 273.34 l
-170.40 270.98 l
-170.40 270.98 l
-170.40 270.98 l
-170.40 270.98 l
-170.40 270.98 l
-170.40 270.98 l
-170.40 270.98 l
-170.40 270.98 l
-170.40 270.98 l
-170.40 270.98 l
-194.40 270.98 l
-194.40 268.62 l
-194.40 268.62 l
-194.40 268.62 l
-194.40 268.62 l
-194.40 268.62 l
-194.40 268.62 l
-194.40 268.62 l
-194.40 268.62 l
-194.40 268.62 l
-194.40 268.62 l
-194.40 268.62 l
-194.40 268.62 l
-194.40 268.62 l
-194.40 268.62 l
-194.40 268.62 l
-194.40 268.62 l
-194.40 268.62 l
-194.40 268.62 l
-194.40 263.91 l
-194.40 263.91 l
-194.40 263.91 l
-194.40 263.91 l
-194.40 263.91 l
-194.40 263.91 l
-194.40 263.91 l
-194.40 259.20 l
-194.40 259.20 l
-194.40 259.20 l
-194.40 259.20 l
-194.40 259.20 l
-194.40 259.20 l
-194.40 259.20 l
-194.40 259.20 l
-194.40 259.20 l
-194.40 259.20 l
-194.40 259.20 l
-194.40 259.20 l
-194.40 259.20 l
-194.40 259.20 l
-194.40 259.20 l
-194.40 259.20 l
-194.40 259.20 l
-194.40 259.20 l
-194.40 259.20 l
-194.40 259.20 l
-194.40 259.20 l
-194.40 259.20 l
-194.40 259.20 l
-194.40 259.20 l
-194.40 259.20 l
-194.40 259.20 l
-194.40 259.20 l
-194.40 259.20 l
-194.40 259.20 l
-194.40 256.84 l
-194.40 254.49 l
-194.40 254.49 l
-194.40 254.49 l
-194.40 254.49 l
-194.40 254.49 l
-194.40 254.49 l
-194.40 254.49 l
-194.40 254.49 l
-194.40 254.49 l
-194.40 254.49 l
-194.40 254.49 l
-194.40 252.13 l
-194.40 252.13 l
-218.40 252.13 l
-218.40 252.13 l
-218.40 252.13 l
-218.40 252.13 l
-218.40 252.13 l
-218.40 252.13 l
-218.40 252.13 l
-218.40 252.13 l
-218.40 249.78 l
-218.40 249.78 l
-218.40 249.78 l
-218.40 249.78 l
-218.40 249.78 l
-218.40 249.78 l
-218.40 249.78 l
-218.40 249.78 l
-218.40 247.42 l
-218.40 247.42 l
-218.40 247.42 l
-218.40 247.42 l
-218.40 247.42 l
+314.40 168.51 m
+314.40 168.51 l
+314.40 168.51 l
+314.40 168.51 l
+314.40 168.51 l
+314.40 168.51 l
+314.40 168.51 l
+314.40 168.51 l
+314.40 168.51 l
+314.40 168.51 l
+314.40 168.51 l
+314.40 168.51 l
+314.40 168.51 l
+314.40 168.51 l
+314.40 168.51 l
+314.40 168.51 l
+314.40 168.51 l
+314.40 168.51 l
+314.40 168.51 l
+314.40 168.51 l
+314.40 168.51 l
+326.40 168.51 l
+326.40 168.51 l
+326.40 168.51 l
+326.40 168.51 l
+326.40 168.51 l
+326.40 168.51 l
+326.40 168.51 l
+326.40 168.51 l
+326.40 168.51 l
+326.40 168.51 l
+326.40 168.51 l
+326.40 168.51 l
+326.40 168.51 l
+326.40 168.51 l
+326.40 168.51 l
+326.40 168.51 l
+326.40 168.51 l
+326.40 168.51 l
+326.40 168.51 l
+326.40 168.51 l
+326.40 168.51 l
+326.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 168.51 l
+338.40 162.25 l
+338.40 162.25 l
+338.40 162.25 l
+338.40 162.25 l
+338.40 162.25 l
+338.40 162.25 l
+338.40 162.25 l
+338.40 162.25 l
+338.40 162.25 l
+350.40 162.25 l
+350.40 162.25 l
+350.40 162.25 l
+350.40 162.25 l
+350.40 162.25 l
+350.40 162.25 l
+350.40 162.25 l
+362.40 162.25 l
+374.40 162.25 l
+374.40 162.25 l
+374.40 162.25 l
+374.40 162.25 l
+374.40 162.25 l
+374.40 162.25 l
+374.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
+386.40 162.25 l
S
0.000 0.000 0.000 rg
BT
-/F1 1 Tf 0 Tr 7.48 0 0 7.48 215.44 249.54 Tm (l) Tj 0 Tr
+/F1 1 Tf 0 Tr 7.48 0 0 7.48 383.44 159.66 Tm (l) Tj 0 Tr
ET
Q q
BT
0.000 0.000 0.000 rg
-/F3 1 Tf 13.00 0.00 -0.00 13.00 59.04 469.81 Tm [(T) 60 (est Plot)] TJ
+/F3 1 Tf 13.00 0.00 -0.00 13.00 59.04 469.81 Tm [(T) 60 (est Plot1)] TJ
ET
Q q
0.000 0.000 0.000 RG
@@ -535,7 +535,7 @@ Q
endstream
endobj
7 0 obj
-8278
+8405
endobj
3 0 obj
<<
@@ -590,15 +590,15 @@ 0 12
0000000000 65535 f
0000000021 00000 n
0000000164 00000 n
-0000008644 00000 n
-0000008727 00000 n
+0000008771 00000 n
+0000008854 00000 n
0000000213 00000 n
0000000293 00000 n
-0000008624 00000 n
-0000008831 00000 n
-0000009088 00000 n
-0000009171 00000 n
-0000009268 00000 n
+0000008751 00000 n
+0000008958 00000 n
+0000009215 00000 n
+0000009298 00000 n
+0000009395 00000 n
trailer
<<
/Size 12
@@ -606,5 +606,5 @@ trailer
/Root 2 0 R
>>
startxref
-9370
+9497
%%EOF
--- /dev/null
+++ b/test-data/matrix_generator_for_pc_and_lda_input_2.tabular
@@ -0,0 +1,87 @@
+ARHGEF9 XLMR
+KIAA2022 XLMR
+ZDHHC15 XLMR
+PGK1 XLMR
+BRWD3 XLMR
+PAK3 XLMR
+AGTR2 XLMR
+GRIA3 XLMR
+ZDHHC9 XLMR
+GPC3 XLMR
+PHF6 XLMR
+SOX3 XLMR
+FMR1 XLMR
+MTM1 XLMR
+SHROOM4 XLMR
+KLF8 XLMR
+UXT XLMR
+PCSK1N XLMR
+PAGE1 XLMR
+PAGE4 XLMR
+CLCN5 XLMR
+NUDT10 XLMR
+NUDT11 XLMR
+GSPT2 XLMR
+TMEM29 XLMR
+GPR173 XLMR
+HUWE1 XLMR
+TSR2 XLMR
+TRO XLMR
+MAGEH1 XLMR
+USP51 XLMR
+RRAGB XLMR
+UBQLN2 CONTROL
+SPIN3 CONTROL
+SPIN2A CONTROL
+ZXDA CONTROL
+SPIN4 CONTROL
+MTMR8 CONTROL
+KIAA1166 CONTROL
+LAS1L CONTROL
+MSN CONTROL
+HEPH CONTROL
+AR CONTROL
+STARD8 CONTROL
+TMEM28 CONTROL
+EDA CONTROL
+SLC7A3 CONTROL
+CXCR3 CONTROL
+NAP1L2 CONTROL
+CHIC1 CONTROL
+FXYD8 CONTROL
+RNF12 CONTROL
+UPRT CONTROL
+MAGEE2 CONTROL
+CXorf26 CONTROL
+MAGEE1 CONTROL
+FGF16 CONTROL
+TAF9B CONTROL
+CYSLTR1 CONTROL
+ZCCHC5 CONTROL
+GPR23 CONTROL
+P2RY10 CONTROL
+ITM2A CONTROL
+TBX22 CONTROL
+NSBP1 CONTROL
+RPS6KA6 CONTROL
+HDX CONTROL
+APOOL CONTROL
+ZNF711 CONTROL
+POF1B CONTROL
+CHM CONTROL
+DACH2 CONTROL
+KLHL4 CONTROL
+CPXCR1 CONTROL
+PABPC5 CONTROL
+DIAPH2 CONTROL
+SYTL4 CONTROL
+CSTF2 CONTROL
+DRP2 CONTROL
+TCEAL2 CONTROL
+BEX5 CONTROL
+NXF3 CONTROL
+BEX4 CONTROL
+TCEAL4 CONTROL
+ESX1 CONTROL
+IL1RAPL2 CONTROL
+NRK CONTROL
--- a/test-data/pca_and_lda_analy_for_lda_input.tabular
+++ /dev/null
@@ -1,89 +0,0 @@
- ARHGEF9 KIAA2022 ZDHHC15 PGK1 BRWD3 PAK3 AGTR2 GRIA3 ZDHHC9 GPC3 PHF6 SOX3 FMR1 MTM1 SHROOM4 KLF8 Sum(XLMR) UXT PCSK1N PAGE1 PAGE4 CLCN5 NUDT10 NUDT11 GSPT2 TMEM29 GPR173 HUWE1 TSR2 TRO MAGEH1 USP51 RRAGB UBQLN2 SPIN3 SPIN2A ZXDA SPIN4 MTMR8 KIAA1166 LAS1L MSN HEPH AR STARD8 TMEM28 EDA SLC7A3 CXCR3 NAP1L2 CHIC1 FXYD8 RNF12 UPRT MAGEE2 CXorf26 MAGEE1 FGF16 TAF9B CYSLTR1 ZCCHC5 GPR23 P2RY10 ITM2A TBX22 NSBP1 RPS6KA6 HDX APOOL ZNF711 POF1B CHM DACH2 KLHL4 CPXCR1 PABPC5 DIAPH2 SYTL4 CSTF2 DRP2 TCEAL2 BEX5 NXF3 BEX4 TCEAL4 ESX1 IL1RAPL2 NRK SERPINA7 MUM1L1 CXorf57 MORC4 VSIG1 NXT2 TMEM164 CHRDL1 PAK3 ZCCHC16 LRCH2 LUZP4 PLS3 AGTR2 CXorf61 KLHL13 W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0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Control
-GCAACCTACTCA 0 3 2 1 0 0 0 0 0 0 1 0 0 0 0 0 7 1 0 0 2 3 2 3 0 0 0 0 0 2 0 0 1 1 1 0 0 0 0 0 0 0 1 0 0 1 0 1 0 0 1 0 1 1 1 0 0 0 0 0 1 1 0 0 1 0 0 0 0 0 1 1 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 2 2 0 0 0 1 0 2 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 1 0 0 1 0 0 2 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 48 Control
-TAGAAAACCCCAT 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Control
- XLMR XLMR XLMR XLMR XLMR XLMR XLMR XLMR XLMR XLMR XLMR XLMR XLMR XLMR XLMR XLMR Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control
Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control Control
1
0

galaxy-dist commit 28e629ad5949: Upgrade pbs_python to 4.1.0 and use PBS exit_status (if keep_completed is set) so we can detect PBS failures. This is a reapplication of 3786:48432330228e, which was backed out in a subsequent revision due to crashes experienced in pbs_python 2.9.8.
by commits-noreply@bitbucket.org 23 Jul '10
by commits-noreply@bitbucket.org 23 Jul '10
23 Jul '10
# HG changeset patch -- Bitbucket.org
# Project galaxy-dist
# URL http://bitbucket.org/galaxy/galaxy-dist/overview
# User Nate Coraor <nate(a)bx.psu.edu>
# Date 1279556993 14400
# Node ID 28e629ad59490af90a28bc45073a7cfc10ed646c
# Parent 0f5eb93a7d61478565d63563bddcbffc6b6a59d9
Upgrade pbs_python to 4.1.0 and use PBS exit_status (if keep_completed is set) so we can detect PBS failures. This is a reapplication of 3786:48432330228e, which was backed out in a subsequent revision due to crashes experienced in pbs_python 2.9.8.
--- a/eggs.ini
+++ b/eggs.ini
@@ -17,7 +17,7 @@ Cheetah = 2.2.2
DRMAA_python = 0.2
MySQL_python = 1.2.3c1
numpy = 1.3.0
-pbs_python = 2.9.4
+pbs_python = 4.1.0
psycopg2 = 2.0.13
pycrypto = 2.0.1
pysam = 0.1.1
--- a/lib/galaxy/jobs/runners/pbs.py
+++ b/lib/galaxy/jobs/runners/pbs.py
@@ -50,6 +50,19 @@ cd %s
%s
"""
+# From pbs' job.h
+JOB_EXIT_STATUS = {
+ 0: "job exec successful",
+ -1: "job exec failed, before files, no retry",
+ -2: "job exec failed, after files, no retry",
+ -3: "job execution failed, do retry",
+ -4: "job aborted on MOM initialization",
+ -5: "job aborted on MOM init, chkpt, no migrate",
+ -6: "job aborted on MOM init, chkpt, ok migrate",
+ -7: "job restart failed",
+ -8: "exec() of user command failed",
+}
+
class PBSJobState( object ):
def __init__( self ):
"""
@@ -65,6 +78,7 @@ class PBSJobState( object ):
self.efile = None
self.runner_url = None
self.check_count = 0
+ self.stop_job = False
class PBSJobRunner( object ):
"""
@@ -193,8 +207,9 @@ class PBSJobRunner( object ):
pbs_options = self.determine_pbs_options( runner_url )
c = pbs.pbs_connect( pbs_server_name )
if c <= 0:
+ errno, text = pbs.error()
job_wrapper.fail( "Unable to queue job for execution. Resubmitting the job may succeed." )
- log.error( "Connection to PBS server for submit failed" )
+ log.error( "Connection to PBS server for submit failed: %s: %s" % ( errno, text ) )
return
# define job attributes
@@ -336,58 +351,78 @@ class PBSJobRunner( object ):
log.debug( "(%s/%s) Skipping state check because PBS server connection failed" % ( galaxy_job_id, job_id ) )
new_watched.append( pbs_job_state )
continue
- if statuses.has_key( job_id ):
+ try:
status = statuses[job_id]
- if status.job_state != old_state:
- log.debug("(%s/%s) job state changed from %s to %s" % ( galaxy_job_id, job_id, old_state, status.job_state ) )
- if status.job_state == "R" and not pbs_job_state.running:
- pbs_job_state.running = True
- pbs_job_state.job_wrapper.change_state( model.Job.states.RUNNING )
- if status.job_state == "R" and ( pbs_job_state.check_count % 20 ) == 0:
- # Every 20th time the job status is checked, do limit checks (if configured)
- if self.app.config.output_size_limit > 0:
- # Check the size of the job outputs
- fail = False
- for outfile, size in pbs_job_state.job_wrapper.check_output_sizes():
- if size > self.app.config.output_size_limit:
- pbs_job_state.fail_message = 'Job output grew too large (greater than %s), please try different job parameters or' \
- % nice_size( self.app.config.output_size_limit )
- log.warning( '(%s/%s) Dequeueing job due to output %s growing larger than %s limit' \
- % ( galaxy_job_id, job_id, os.path.basename( outfile ), nice_size( self.app.config.output_size_limit ) ) )
- self.work_queue.put( ( 'fail', pbs_job_state ) )
- fail = True
- break
- if fail:
- continue
- if self.job_walltime is not None:
- # Check the job's execution time
- if status.get( 'resources_used', False ):
- # resources_used may not be in the status for new jobs
- h, m, s = [ int( i ) for i in status.resources_used.walltime.split( ':' ) ]
- time_executing = timedelta( 0, s, 0, 0, m, h )
- if time_executing > self.job_walltime:
- pbs_job_state.fail_message = 'Job ran longer than maximum allowed execution time (%s), please try different job parameters or' \
- % self.app.config.job_walltime
- log.warning( '(%s/%s) Dequeueing job since walltime has been reached' \
- % ( galaxy_job_id, job_id ) )
- self.work_queue.put( ( 'fail', pbs_job_state ) )
- continue
- pbs_job_state.old_state = status.job_state
- new_watched.append( pbs_job_state )
- else:
+ except KeyError:
try:
- # recheck to make sure it wasn't a communication problem
+ # Recheck to make sure it wasn't a communication problem
self.check_single_job( pbs_server_name, job_id )
- log.warning( "(%s/%s) job was not in state check list, but was found with individual state check" % ( galaxy_job_id, job_id ) )
+ log.warning( "(%s/%s) PBS job was not in state check list, but was found with individual state check" % ( galaxy_job_id, job_id ) )
new_watched.append( pbs_job_state )
except:
errno, text = pbs.error()
- if errno != 15001:
- log.info("(%s/%s) state check resulted in error (%d): %s" % (galaxy_job_id, job_id, errno, text) )
+ if errno == 15001:
+ # 15001 == job not in queue
+ log.debug("(%s/%s) PBS job has left queue" % (galaxy_job_id, job_id) )
+ self.work_queue.put( ( 'finish', pbs_job_state ) )
+ else:
+ # Unhandled error, continue to monitor
+ log.info("(%s/%s) PBS state check resulted in error (%d): %s" % (galaxy_job_id, job_id, errno, text) )
new_watched.append( pbs_job_state )
- else:
- log.debug("(%s/%s) job has left queue" % (galaxy_job_id, job_id) )
- self.work_queue.put( ( 'finish', pbs_job_state ) )
+ continue
+ if status.job_state != old_state:
+ log.debug("(%s/%s) PBS job state changed from %s to %s" % ( galaxy_job_id, job_id, old_state, status.job_state ) )
+ if status.job_state == "R" and not pbs_job_state.running:
+ pbs_job_state.running = True
+ pbs_job_state.job_wrapper.change_state( model.Job.states.RUNNING )
+ if status.job_state == "R" and ( pbs_job_state.check_count % 20 ) == 0:
+ # Every 20th time the job status is checked, do limit checks (if configured)
+ if self.app.config.output_size_limit > 0:
+ # Check the size of the job outputs
+ fail = False
+ for outfile, size in pbs_job_state.job_wrapper.check_output_sizes():
+ if size > self.app.config.output_size_limit:
+ pbs_job_state.fail_message = 'Job output grew too large (greater than %s), please try different job parameters or' \
+ % nice_size( self.app.config.output_size_limit )
+ log.warning( '(%s/%s) Dequeueing job due to output %s growing larger than %s limit' \
+ % ( galaxy_job_id, job_id, os.path.basename( outfile ), nice_size( self.app.config.output_size_limit ) ) )
+ pbs_job_state.stop_job = True
+ self.work_queue.put( ( 'fail', pbs_job_state ) )
+ fail = True
+ break
+ if fail:
+ continue
+ if self.job_walltime is not None:
+ # Check the job's execution time
+ if status.get( 'resources_used', False ):
+ # resources_used may not be in the status for new jobs
+ h, m, s = [ int( i ) for i in status.resources_used.walltime.split( ':' ) ]
+ time_executing = timedelta( 0, s, 0, 0, m, h )
+ if time_executing > self.job_walltime:
+ pbs_job_state.fail_message = 'Job ran longer than maximum allowed execution time (%s), please try different job parameters or' \
+ % self.app.config.job_walltime
+ log.warning( '(%s/%s) Dequeueing job since walltime has been reached' \
+ % ( galaxy_job_id, job_id ) )
+ pbs_job_state.stop_job = True
+ self.work_queue.put( ( 'fail', pbs_job_state ) )
+ continue
+ elif status.job_state == "C":
+ # "keep_completed" is enabled in PBS, so try to check exit status
+ try:
+ assert int( status.exit_status ) == 0
+ log.debug("(%s/%s) PBS job has completed successfully" % ( galaxy_job_id, job_id ) )
+ except AssertionError:
+ pbs_job_state.fail_message = 'Job cannot be completed due to a cluster error. Please retry or'
+ log.error( '(%s/%s) PBS job failed: %s' % ( galaxy_job_id, job_id, JOB_EXIT_STATUS.get( int( status.exit_status ), 'Unknown error: %s' % status.exit_status ) ) )
+ self.work_queue.put( ( 'fail', pbs_job_state ) )
+ continue
+ except AttributeError:
+ # No exit_status, can't verify proper completion so we just have to assume success.
+ log.debug("(%s/%s) PBS job has completed" % ( galaxy_job_id, job_id ) )
+ self.work_queue.put( ( 'finish', pbs_job_state ) )
+ continue
+ pbs_job_state.old_state = status.job_state
+ new_watched.append( pbs_job_state )
# Replace the watch list with the updated version
self.watched = new_watched
@@ -411,9 +446,10 @@ class PBSJobRunner( object ):
log.debug("connection to PBS server %s for state check failed" % pbs_server_name )
failures.append( pbs_server_name )
continue
- stat_attrl = pbs.new_attrl(2)
+ stat_attrl = pbs.new_attrl(3)
stat_attrl[0].name = pbs.ATTR_state
stat_attrl[1].name = pbs.ATTR_used
+ stat_attrl[2].name = pbs.ATTR_exitstat
jobs = pbs.pbs_statjob( c, None, stat_attrl, None )
pbs.pbs_disconnect( c )
statuses.update( self.convert_statjob_to_bunches( jobs ) )
@@ -480,7 +516,8 @@ class PBSJobRunner( object ):
"""
Seperated out so we can use the worker threads for it.
"""
- self.stop_job( self.sa_session.query( self.app.model.Job ).get( pbs_job_state.job_wrapper.job_id ) )
+ if pbs_job_state.stop_job:
+ self.stop_job( self.sa_session.query( self.app.model.Job ).get( pbs_job_state.job_wrapper.job_id ) )
pbs_job_state.job_wrapper.fail( pbs_job_state.fail_message )
self.cleanup( ( pbs_job_state.ofile, pbs_job_state.efile, pbs_job_state.job_file ) )
--- a/scripts/scramble/scripts/pbs_python.py
+++ b/scripts/scramble/scripts/pbs_python.py
@@ -29,8 +29,8 @@ if not os.path.exists( 'setup.py.orig' )
i = open( 'setup.py.orig', 'r' )
o = open( 'setup.py', 'w' )
for line in i.readlines():
- if line == " version = '2.9.0',\n":
- line = " version = '2.9.4',\n"
+ if line == " version = '4.0.0',\n":
+ line = " version = '4.1.0',\n"
print >>o, line,
i.close()
o.close()
1
0

galaxy-dist commit 0f5eb93a7d61: lims: look and feel improvements.
by commits-noreply@bitbucket.org 23 Jul '10
by commits-noreply@bitbucket.org 23 Jul '10
23 Jul '10
# HG changeset patch -- Bitbucket.org
# Project galaxy-dist
# URL http://bitbucket.org/galaxy/galaxy-dist/overview
# User rc
# Date 1279307355 14400
# Node ID 0f5eb93a7d61478565d63563bddcbffc6b6a59d9
# Parent a27244147802bd74be35ae24665cc3fc57580f23
lims: look and feel improvements.
Removed borders from the request page and added +/- icons for expand/collapse
--- a/templates/requests/common/get_data.mako
+++ b/templates/requests/common/get_data.mako
@@ -128,82 +128,77 @@
</li></ul>
-<div class="toolForm">
- %if len(dataset_files):
+
+%if len(dataset_files):
+ <h3>Sample Dataset(s)</h3>
+ %if sample.untransferred_dataset_files() and cntrller == 'requests_admin':
<div class="form-row">
- <h4>Sample Dataset(s)</h4>
- %if sample.untransferred_dataset_files() and cntrller == 'requests_admin':
+ <ul class="manage-table-actions">
+ <li>
+ <a class="action-button" href="${h.url_for( controller='requests_admin', action='get_data', start_transfer_button=True, sample_id=sample.id )}">
+ <span>Start transfer</span></a>
+ </li>
+ </ul>
+ </div>
+ %endif
+ <div class="form-row">
+ <table class="grid">
+ <thead>
+ <tr>
+ <th>Dataset File</th>
+ <th>Transfer Status</th>
+ <th></th>
+ </tr>
+ <thead>
+ <tbody>
+ %for dataset_index, dataset_file in enumerate(dataset_files):
+ ${sample_dataset_files( dataset_index, dataset_file['name'], dataset_file['status'] )}
+ %endfor
+ </tbody>
+ </table>
+ </div>
+%else:
+ <div class="form-row">
+ There are no dataset files associated with this sample.
+ </div>
+%endif
+
+<br/>
+<br/>
+
+%if cntrller == 'requests_admin' and trans.user_is_admin():
+ <form name="get_data" id="get_data" action="${h.url_for( controller='requests_admin', cntrller=cntrller, action='get_data', sample_id=sample.id)}" method="post" >
+ <div class="toolFormTitle">Select files for transfer</div>
+ ##<h4>Select files for transfer</h4>
+ <div class="toolForm"><div class="form-row">
- <ul class="manage-table-actions">
- <li>
- <a class="action-button" href="${h.url_for( controller='requests_admin', action='get_data', start_transfer_button=True, sample_id=sample.id )}">
- <span>Start transfer</span></a>
- </li>
- </ul>
- </div>
- %endif
- <div class="form-row">
- <table class="grid">
- <thead>
- <tr>
- <th>Dataset File</th>
- <th>Transfer Status</th>
- <th></th>
- </tr>
- <thead>
- <tbody>
- %for dataset_index, dataset_file in enumerate(dataset_files):
- ${sample_dataset_files( dataset_index, dataset_file['name'], dataset_file['status'] )}
+ <label>Folder path on the sequencer:</label>
+ <input type="text" name="folder_path" value="${folder_path}" size="100"/>
+ <input type="submit" name="browse_button" value="List contents"/>
+ ##<input type="submit" name="open_folder" value="Open folder"/>
+ <input type="submit" name="folder_up" value="Up"/>
+ </div>
+ <div class="form-row">
+ <select name="files_list" id="files_list" style="max-width: 60%; width: 98%; height: 150px; font-size: 100%;" ondblclick="open_folder1(${sample.id}, '${folder_path}')" onChange="display_file_details(${sample.id}, '${folder_path}')" multiple>
+ %for index, f in enumerate(files):
+ <option value="${f}">${f}</option>
%endfor
- </tbody>
- </table>
- </div>
- </div>
- %else:
- <div class="form-row">
- There are no dataset files associated with this sample.
- </div>
- %endif
-
- <br/>
- <br/>
-
- %if cntrller == 'requests_admin' and trans.user_is_admin():
- <form name="get_data" id="get_data" action="${h.url_for( controller='requests_admin', cntrller=cntrller, action='get_data', sample_id=sample.id)}" method="post" >
- <div class="form-row">
- ##<div class="toolFormTitle">Select files for transfer</div>
- <h4>Select files for transfer</h4>
- <div style="width: 60%;">
- <div class="form-row">
- <label>Folder path on the sequencer:</label>
- <input type="text" name="folder_path" value="${folder_path}" size="100"/>
- <input type="submit" name="browse_button" value="List contents"/>
- ##<input type="submit" name="open_folder" value="Open folder"/>
- <input type="submit" name="folder_up" value="Up"/>
- </div>
- <div class="form-row">
- <select name="files_list" id="files_list" style="max-width: 98%; width: 98%; height: 150px; font-size: 100%;" ondblclick="open_folder1(${sample.id}, '${folder_path}')" onChange="display_file_details(${sample.id}, '${folder_path}')" multiple>
- %for index, f in enumerate(files):
- <option value="${f}">${f}</option>
- %endfor
- </select>
- <br/>
- <div id="file_details" class="toolParamHelp" style="clear: both;">
-
- </div>
- </div>
- <div class="form-row">
- <div class="toolParamHelp" style="clear: both;">
- After selecting dataset(s), be sure to click on the <b>Start transfer</b> button.
- Once the transfer is complete the dataset(s) will show up on this page.
- </div>
- <input type="submit" name="select_files_button" value="Select"/>
+ </select>
+ <br/>
+ <div id="file_details" class="toolParamHelp" style="clear: both;">
+
</div></div>
+ <div class="form-row">
+ <div class="toolParamHelp" style="clear: both;">
+ After selecting dataset(s), be sure to click on the <b>Start transfer</b> button.
+ Once the transfer is complete the dataset(s) will show up on this page.
+ </div>
+ <input type="submit" name="select_files_button" value="Select"/>
+ </div></div>
- </form>
- %endif
-</div>
+ </form>
+%endif
--- a/templates/requests/common/edit_request.mako
+++ b/templates/requests/common/edit_request.mako
@@ -34,8 +34,8 @@
<br/><ul class="manage-table-actions"><li>
- <a class="action-button" href="${h.url_for( controller=cntrller, cntrller=cntrller, action='list')}">
- <span>Browse requests</span></a>
+ <a class="action-button" href="${h.url_for( controller=cntrller, action='list', operation='show', id=trans.security.encode_id(request.id))}">
+ <span>Browse this request</span></a></li></ul>
--- a/templates/requests/common/show_request.mako
+++ b/templates/requests/common/show_request.mako
@@ -30,6 +30,31 @@
});
</script>
+<script type="text/javascript">
+function showContent(vThis)
+{
+ // http://www.javascriptjunkie.com
+ // alert(vSibling.className + " " + vDef_Key);
+ vParent = vThis.parentNode;
+ vSibling = vParent.nextSibling;
+ while (vSibling.nodeType==3) {
+ // Fix for Mozilla/FireFox Empty Space becomes a TextNode or Something
+ vSibling = vSibling.nextSibling;
+ };
+ if(vSibling.style.display == "none")
+ {
+ vThis.src="/static/images/fugue/toggle.png";
+ vThis.alt = "Hide";
+ vSibling.style.display = "block";
+ } else {
+ vSibling.style.display = "none";
+ vThis.src="/static/images/fugue/toggle-expand.png";
+ vThis.alt = "Show";
+ }
+ return;
+}
+</script>
+
<script type="text/javascript">
$(document).ready(function(){
@@ -37,7 +62,7 @@
$(".msg_body").hide();
//toggle the componenet with class msg_body
$(".msg_head").click(function(){
- $(this).next(".msg_body").slideToggle(450);
+ $(this).next(".msg_body").slideToggle(0);
});
});
</script>
@@ -153,47 +178,43 @@
${render_msg( message, status )}
%endif
-
-
-
-<div class="toolForm">
+<div>
+<h3><img src="/static/images/fugue/toggle-expand.png" alt="Show" onclick="showContent(this);" style="cursor:pointer;"/> Request Information</h3>
+<div style="display:none;" >
+ %for index, rd in enumerate(request_details):
+ <div class="form-row">
+ <label>${rd['label']}</label>
+ %if not rd['value']:
+ <i>None</i>
+ %else:
+ %if rd['label'] == 'State':
+ <a href="${h.url_for( controller=cntrller, action='list', operation='events', id=trans.security.encode_id(request.id) )}">${rd['value']}</a>
+ %else:
+ ${rd['value']}
+ %endif
+ %endif
+ </div>
+ <div style="clear: both"></div>
+ %endfor
<div class="form-row">
- <div class="msg_list">
- <h4 class="msg_head"><u>Request Information</u></h4>
- <div class="msg_body">
- %for index, rd in enumerate(request_details):
- <div class="form-row">
- <label>${rd['label']}</label>
- %if not rd['value']:
- <i>None</i>
- %else:
- %if rd['label'] == 'State':
- <a href="${h.url_for( controller=cntrller, action='list', operation='events', id=trans.security.encode_id(request.id) )}">${rd['value']}</a>
- %else:
- ${rd['value']}
- %endif
- %endif
- </div>
- <div style="clear: both"></div>
- %endfor
- <div class="form-row">
- <ul class="manage-table-actions">
- <li>
- <a class="action-button" href="${h.url_for( controller='requests_admin', action='list', operation='Edit', id=trans.security.encode_id(request.id))}">
- <span>Edit request details</span></a>
- </li>
- </ul>
- </div>
- </div>
- </div>
+ <ul class="manage-table-actions">
+ <li>
+ <a class="action-button" href="${h.url_for( controller=cntrller, action='list', operation='Edit', id=trans.security.encode_id(request.id))}">
+ <span>Edit request details</span></a>
+ </li>
+ </ul></div></div>
+</div>
+
+
+
<br/>
-<div class="toolForm">
+##<div class="toolForm"><form id="show_request" name="show_request" action="${h.url_for( controller='requests_common', cntrller=cntrller, action='request_page', edit_mode=edit_mode )}" method="post" >
- <div class="form-row">
+ ##<div class="form-row">
%if current_samples:
## first render the basic info grid
${render_basic_info_grid()}
@@ -201,12 +222,11 @@
<% trans.sa_session.refresh( request.type.sample_form ) %>
%for grid_index, grid_name in enumerate(request.type.sample_form.layout):
${render_grid( grid_index, grid_name, request.type.sample_form.fields_of_grid( grid_index ) )}
- <br/>
%endfor
%else:
<label>There are no samples.</label>
%endif
- </div>
+ ##</div>
%if request.samples and request.submitted():
<script type="text/javascript">
// Updater
@@ -253,97 +273,94 @@
<input type="submit" name="save_samples_button" value="Save"/><input type="submit" name="cancel_changes_button" value="Cancel"/></div>
- %elif request.unsubmitted():
+ %elif edit_mode == 'True' or len(current_samples) > len(request.samples):
<div class="form-row"><input type="submit" name="save_samples_button" value="Save"/>
+ <input type="submit" name="cancel_changes_button" value="Cancel"/></div>
%endif
%endif
<input type="hidden" name="id" value="${trans.security.encode_id(request.id)}" /></form>
-</div>
+##</div><br/>
%if request.unsubmitted():
-<div class="toolForm"><form id="import" name="import" action="${h.url_for( controller='requests_common', action='request_page', edit_mode=edit_mode, request_id=trans.security.encode_id(request.id) )}" enctype="multipart/form-data" method="post" >
- <div class="form-row">
- <div class="msg_list">
- <h4 class="msg_head"><u>Import samples from csv file</u></h4>
- <div class="msg_body">
- <input type="file" name="file_data" />
- <input type="submit" name="import_samples_button" value="Import samples"/>
- <br/>
- <div class="toolParamHelp" style="clear: both;">
- The csv file must be in the following format:<br/>
- SampleName,DataLibrary,DataLibraryFolder,FieldValue1,FieldValue2...
- </div>
- </div>
+ <h4><img src="/static/images/fugue/toggle-expand.png" alt="Show" onclick="showContent(this);" style="cursor:pointer;"/> Import samples</h4>
+ <div style="display:none;">
+ <input type="file" name="file_data" />
+ <input type="submit" name="import_samples_button" value="Import samples"/>
+ <br/>
+ <div class="toolParamHelp" style="clear: both;">
+ The csv file must be in the following format:<br/>
+ SampleName,DataLibrary,DataLibraryFolder,FieldValue1,FieldValue2...
</div></div>
-## <input type="hidden" name="request_id" value="${request.id}" /></form>
-</div>
+##</div>
%endif
+
+
<%def name="render_grid( grid_index, grid_name, fields_dict )"><br/>
- <div class="msg_list">
- %if grid_name:
- <h4 class="msg_head"><u>${grid_name}</u></h4>
- %else:
- <h4>Grid ${grid_index}</h4>
- %endif
- %if edit_mode == 'False' or len(current_samples) <= len(request.samples):
- <div class="msg_body">
- %else:
- <div class="msg_body2">
- %endif
- <table class="grid">
- <thead>
- <tr>
- <th>Name</th>
- %for index, field in fields_dict.items():
- <th>
- ${field['label']}
- <div class="toolParamHelp" style="clear: both;">
- <i>${field['helptext']}</i>
- </div>
- </th>
- %endfor
- <th></th>
- </tr>
- <thead>
- <tbody>
- <%
- trans.sa_session.refresh( request )
- %>
- %for sample_index, sample in enumerate(current_samples):
- %if edit_mode == 'True':
+ <% if not grid_name:
+ grid_name = "Grid "+ grid_index
+ %>
+ <div>
+ %if edit_mode == 'True' or len(current_samples) > len(request.samples):
+ <h4><img src="/static/images/fugue/toggle.png" alt="Show" onclick="showContent(this);" style="cursor:pointer;"/> ${grid_name}</h4>
+ <div>
+ %else:
+ <h4><img src="/static/images/fugue/toggle-expand.png" alt="Hide" onclick="showContent(this);" style="cursor:pointer;"/> ${grid_name}</h4>
+ <div style="display:none;">
+ %endif
+ <table class="grid">
+ <thead><tr>
- ${render_sample_form( sample_index, sample['name'], sample['field_values'], fields_dict)}
- </tr>
- %else:
- <tr>
- %if sample_index in range(len(request.samples)):
- ${render_sample( sample_index, sample['name'], sample['field_values'], fields_dict )}
- %else:
- ${render_sample_form( sample_index, sample['name'], sample['field_values'], fields_dict)}
+ <th>Name</th>
+ %for index, field in fields_dict.items():
+ <th>
+ ${field['label']}
+ <div class="toolParamHelp" style="clear: both;">
+ <i>${field['helptext']}</i>
+ </div>
+ </th>
+ %endfor
+ <th></th>
+ </tr>
+ <thead>
+ <tbody>
+ <%
+ trans.sa_session.refresh( request )
+ %>
+ %for sample_index, sample in enumerate(current_samples):
+ %if edit_mode == 'True':
+ <tr>
+ ${render_sample_form( sample_index, sample['name'], sample['field_values'], fields_dict)}
+ </tr>
+ %else:
+ <tr>
+ %if sample_index in range(len(request.samples)):
+ ${render_sample( sample_index, sample['name'], sample['field_values'], fields_dict )}
+ %else:
+ ${render_sample_form( sample_index, sample['name'], sample['field_values'], fields_dict)}
+ %endif
+ </tr>
%endif
- </tr>
- %endif
- %endfor
- </tbody>
- </table>
- </div>
+ %endfor
+ </tbody>
+ </table>
+ </div></div></%def>
## This function displays the "Basic Information" grid
<%def name="render_basic_info_grid()">
- <h4>Sample Information</h4>
+ <h3>Sample Information</h3><table class="grid"><thead><tr>
@@ -408,7 +425,7 @@
%if sample:
%if sample.request.unsubmitted():
<a class="action-button" href="${h.url_for( controller='requests_common', cntrller=cntrller, action='delete_sample', request_id=request.id, sample_id=sample_index )}">
- <img src="${h.url_for('/static/images/delete_icon.png')}" />
+ <img src="${h.url_for('/static/images/delete_icon.png')}" style="cursor:pointer;"/><span></span></a>
%endif
%endif
1
0

galaxy-dist commit e56cc2ed6642: Add checks to get_estimated_display_viewport() methods for tabular data types to ensure datasets are valid before generating display links ( this fix should eliminate some memory problems ) and standardize the returned values from the methods. Also fix several calls to dataset.has_data where the call assumed a property rather than a method.
by commits-noreply@bitbucket.org 16 Jul '10
by commits-noreply@bitbucket.org 16 Jul '10
16 Jul '10
# HG changeset patch -- Bitbucket.org
# Project galaxy-dist
# URL http://bitbucket.org/galaxy/galaxy-dist/overview
# User Greg Von Kuster <greg(a)bx.psu.edu>
# Date 1279226539 14400
# Node ID e56cc2ed66423b51249eb0bf3f5f9f7ccd774bce
# Parent 0bb17e66a56098391e5bbdd34ca227b595ddf082
Add checks to get_estimated_display_viewport() methods for tabular data types to ensure datasets are valid before generating display links ( this fix should eliminate some memory problems ) and standardize the returned values from the methods. Also fix several calls to dataset.has_data where the call assumed a property rather than a method.
--- a/lib/galaxy/datatypes/tabular.py
+++ b/lib/galaxy/datatypes/tabular.py
@@ -210,6 +210,14 @@ class Tabular( data.Text ):
def display_peek( self, dataset ):
"""Returns formatted html of peek"""
return self.make_html_table( dataset )
+ def displayable( self, dataset ):
+ try:
+ return dataset.has_data() \
+ and dataset.state == dataset.states.OK \
+ and dataset.metadata.columns > 0 \
+ and dataset.metadata.data_lines > 0
+ except:
+ return False
def as_gbrowse_display_file( self, dataset, **kwd ):
return open( dataset.file_name )
def as_ucsc_display_file( self, dataset, **kwd ):
--- a/templates/library/common/browse_library.mako
+++ b/templates/library/common/browse_library.mako
@@ -232,7 +232,7 @@
%if not branch_deleted( folder ) and not ldda.library_dataset.deleted and can_modify:
<a class="action-button" href="${h.url_for( controller='library_common', action='upload_library_dataset', cntrller=cntrller, library_id=trans.security.encode_id( library.id ), folder_id=trans.security.encode_id( folder.id ), replace_id=trans.security.encode_id( library_dataset.id ), show_deleted=show_deleted )}">Upload a new version of this dataset</a>
%endif
- %if not branch_deleted( folder ) and not ldda.library_dataset.deleted and ldda.has_data:
+ %if not branch_deleted( folder ) and not ldda.library_dataset.deleted and ldda.has_data():
<a class="action-button" href="${h.url_for( controller='library_common', action='act_on_multiple_datasets', cntrller=cntrller, library_id=trans.security.encode_id( library.id ), ldda_ids=trans.security.encode_id( ldda.id ), do_action='import_to_history', use_panels=use_panels, show_deleted=show_deleted )}">Import this dataset into your current history</a><a class="action-button" href="${h.url_for( controller='library_common', action='download_dataset_from_folder', cntrller=cntrller, id=trans.security.encode_id( ldda.id ), library_id=trans.security.encode_id( library.id ), use_panels=use_panels )}">Download this dataset</a>
%endif
--- a/lib/galaxy/datatypes/genetics.py
+++ b/lib/galaxy/datatypes/genetics.py
@@ -80,7 +80,7 @@ class GenomeGraphs( Tabular ):
ggtail = 'hgGenome_doSubmitUpload=submit'
if not dataset.dbkey:
dataset.dbkey = 'hg18' # punt!
- if dataset.has_data:
+ if dataset.has_data():
for site_name, site_url in util.get_ucsc_by_build(dataset.dbkey):
if site_name in app.config.ucsc_display_sites:
site_url = site_url.replace('/hgTracks?','/hgGenome?') # for genome graphs
--- a/lib/galaxy/datatypes/tracks.py
+++ b/lib/galaxy/datatypes/tracks.py
@@ -20,7 +20,7 @@ class GeneTrack( binary.Binary ):
return binary.Binary.get_display_links( self, dataset, type, app, base_url, target_frame=target_frame, **kwd )
def genetrack_link( self, hda, type, app, base_url ):
ret_val = []
- if hda.has_data:
+ if hda.dataset.has_data():
# Get the disk file name and data id
file_name = hda.dataset.get_file_name()
data_id = quote_plus( str( hda.id ) )
--- a/templates/root/history_common.mako
+++ b/templates/root/history_common.mako
@@ -114,7 +114,7 @@
<div class="info">${_('Info: ')}${data.display_info()}</div><div><% dataset_id=trans.security.encode_id( data.id ) %>
- %if data.has_data:
+ %if data.has_data():
<a href="${h.url_for( controller='dataset', action='display', dataset_id=dataset_id, to_ext=data.ext )}" title="Save" class="icon-button disk tooltip"></a>
%if for_editing:
<a href="${h.url_for( controller='tool_runner', action='rerun', id=data.id )}" target="galaxy_main" title="Run this job again" class="icon-button arrow-circle tooltip"></a>
--- a/lib/galaxy/datatypes/interval.py
+++ b/lib/galaxy/datatypes/interval.py
@@ -54,10 +54,8 @@ class Interval( Tabular ):
"""Initialize interval datatype, by adding UCSC display apps"""
Tabular.__init__(self, **kwd)
self.add_display_app ( 'ucsc', 'display at UCSC', 'as_ucsc_display_file', 'ucsc_links' )
-
def init_meta( self, dataset, copy_from=None ):
Tabular.init_meta( self, dataset, copy_from=copy_from )
-
def set_peek( self, dataset, line_count=None, is_multi_byte=False ):
"""Set the peek and blurb text"""
if not dataset.dataset.purged:
@@ -76,9 +74,8 @@ class Interval( Tabular ):
dataset.peek = 'file does not exist'
dataset.blurb = 'file purged from disk'
def set_meta( self, dataset, overwrite = True, first_line_is_header = False, **kwd ):
+ """Tries to guess from the line the location number of the column for the chromosome, region start-end and strand"""
Tabular.set_meta( self, dataset, overwrite = overwrite, skip = 0 )
-
- """Tries to guess from the line the location number of the column for the chromosome, region start-end and strand"""
if dataset.has_data():
empty_line_count = 0
num_check_lines = 100 # only check up to this many non empty lines
@@ -138,11 +135,20 @@ class Interval( Tabular ):
break # Our metadata is set or we examined 100 non-empty lines, so break out of the outer loop
else:
empty_line_count += 1
-
-
+ def displayable( self, dataset ):
+ try:
+ return dataset.has_data() \
+ and dataset.state == dataset.states.OK \
+ and dataset.metadata.columns > 0 \
+ and dataset.metadata.data_lines > 0 \
+ and dataset.metadata.chromCol \
+ and dataset.metadata.startCol \
+ and dataset.metadata.endCol
+ except:
+ return False
def get_estimated_display_viewport( self, dataset ):
"""Return a chrom, start, stop tuple for viewing a file."""
- if dataset.has_data() and dataset.state == dataset.states.OK:
+ if self.displayable( dataset ):
try:
c, s, e = dataset.metadata.chromCol, dataset.metadata.startCol, dataset.metadata.endCol
c, s, e = int(c)-1, int(s)-1, int(e)-1
@@ -156,20 +162,17 @@ class Interval( Tabular ):
peek.append( line.rstrip( '\n\r' ).split() )
if idx > 100 and idx > skipme: # viewport should have at least 100 features
break
-
chr, start, stop = peek[skipme][c], int( peek[skipme][s] ), int( peek[skipme][e] )
-
for p in peek[(skipme+1):]:
if p[0] == chr:
start = min( start, int( p[s] ) )
stop = max( stop, int( p[e] ) )
except Exception, exc:
- log.error( 'Viewport generation error -> %s ' % str(exc) )
- (chr, start, stop) = 'chr1', 1, 1000
+ log.exception( str(exc) )
+ return ( None, None, None )
return (chr, str( start ), str( stop ))
else:
- return ('', '', '')
-
+ return ( None, None, None )
def as_ucsc_display_file( self, dataset, **kwd ):
"""Returns file contents with only the bed data"""
fd, temp_name = tempfile.mkstemp()
@@ -195,7 +198,6 @@ class Interval( Tabular ):
os.write(fd, '%s\n' % '\t'.join(tmp) )
os.close(fd)
return open(temp_name)
-
def make_html_table( self, dataset, skipchars=[] ):
"""Create HTML table, used for displaying peek"""
out = ['<table cellspacing="0" cellpadding="3">']
@@ -223,30 +225,24 @@ class Interval( Tabular ):
except Exception, exc:
out = "Can't create peek %s" % str( exc )
return out
-
def ucsc_links( self, dataset, type, app, base_url ):
ret_val = []
- if dataset.has_data:
- viewport_tuple = self.get_estimated_display_viewport(dataset)
- if viewport_tuple:
- chrom = viewport_tuple[0]
- start = viewport_tuple[1]
- stop = viewport_tuple[2]
- for site_name, site_url in util.get_ucsc_by_build(dataset.dbkey):
- if site_name in app.config.ucsc_display_sites:
- # HACK: UCSC doesn't support https, so force http even
- # if our URL scheme is https. Making this work
- # requires additional hackery in your upstream proxy.
- # If UCSC ever supports https, remove this hack.
- internal_url = "%s" % url_for( controller='/dataset', dataset_id=dataset.id, action='display_at', filename='ucsc_' + site_name )
- if base_url.startswith( 'https://' ):
- base_url = base_url.replace( 'https', 'http', 1 )
- display_url = urllib.quote_plus( "%s%s/display_as?id=%i&display_app=%s&authz_method=display_at" % (base_url, url_for( controller='root' ), dataset.id, type) )
- redirect_url = urllib.quote_plus( "%sdb=%s&position=%s:%s-%s&hgt.customText=%%s" % (site_url, dataset.dbkey, chrom, start, stop ) )
- link = '%s?redirect_url=%s&display_url=%s' % ( internal_url, redirect_url, display_url )
- ret_val.append( (site_name, link) )
+ chrom, start, stop = self.get_estimated_display_viewport( dataset )
+ if chrom is not None:
+ for site_name, site_url in util.get_ucsc_by_build(dataset.dbkey):
+ if site_name in app.config.ucsc_display_sites:
+ # HACK: UCSC doesn't support https, so force http even
+ # if our URL scheme is https. Making this work
+ # requires additional hackery in your upstream proxy.
+ # If UCSC ever supports https, remove this hack.
+ internal_url = "%s" % url_for( controller='/dataset', dataset_id=dataset.id, action='display_at', filename='ucsc_' + site_name )
+ if base_url.startswith( 'https://' ):
+ base_url = base_url.replace( 'https', 'http', 1 )
+ display_url = urllib.quote_plus( "%s%s/display_as?id=%i&display_app=%s&authz_method=display_at" % (base_url, url_for( controller='root' ), dataset.id, type) )
+ redirect_url = urllib.quote_plus( "%sdb=%s&position=%s:%s-%s&hgt.customText=%%s" % (site_url, dataset.dbkey, chrom, start, stop ) )
+ link = '%s?redirect_url=%s&display_url=%s' % ( internal_url, redirect_url, display_url )
+ ret_val.append( (site_name, link) )
return ret_val
-
def validate( self, dataset ):
"""Validate an interval file using the bx GenomicIntervalReader"""
errors = list()
@@ -344,7 +340,7 @@ class BedGraph( Interval ):
"""
Set viewport based on dataset's first 100 lines.
"""
- if dataset.has_data() and dataset.state == dataset.states.OK:
+ if self.displayable( dataset ):
try:
# Set seqid, start, stop.
seqid = None
@@ -379,9 +375,10 @@ class BedGraph( Interval ):
if stop == 0:
stop = 1
return ( seqid, str( start ), str( stop ) )
- except:
- return( '', '', '' )
- return( '', '', '' )
+ except Exception, exc:
+ log.exception( str( exc ) )
+ return ( None, None, None )
+ return ( None, None, None )
class Bed( Interval ):
"""Tab delimited data in BED format"""
@@ -647,7 +644,7 @@ class Gff( Tabular, _RemoteCallMixin ):
Return a chrom, start, stop tuple for viewing a file. There are slight differences between gff 2 and gff 3
formats. This function should correctly handle both...
"""
- if dataset.has_data() and dataset.state == dataset.states.OK:
+ if self.displayable( dataset ):
try:
seqid = ''
start = 2147483647 # Maximum value of a signed 32 bit integer ( 2**31 - 1 )
@@ -698,39 +695,33 @@ class Gff( Tabular, _RemoteCallMixin ):
break
except Exception, e:
log.exception( str( e ) )
- seqid, start, stop = ( '', '', '' )
+ return ( None, None, None )
return ( seqid, str( start ), str( stop ) )
else:
- return ( '', '', '' )
+ return ( None, None, None )
def ucsc_links( self, dataset, type, app, base_url ):
ret_val = []
- if dataset.has_data:
- seqid, start, stop = self.get_estimated_display_viewport( dataset )
- if seqid and start and stop:
- for site_name, site_url in util.get_ucsc_by_build( dataset.dbkey ):
- if site_name in app.config.ucsc_display_sites:
- redirect_url = urllib.quote_plus(
- "%sdb=%s&position=%s:%s-%s&hgt.customText=%%s" %
- ( site_url, dataset.dbkey, seqid, start, stop ) )
- link = self._get_remote_call_url( redirect_url, site_name, dataset, type, app, base_url )
- ret_val.append( ( site_name, link ) )
+ seqid, start, stop = self.get_estimated_display_viewport( dataset )
+ if seqid is not None:
+ for site_name, site_url in util.get_ucsc_by_build( dataset.dbkey ):
+ if site_name in app.config.ucsc_display_sites:
+ redirect_url = urllib.quote_plus(
+ "%sdb=%s&position=%s:%s-%s&hgt.customText=%%s" %
+ ( site_url, dataset.dbkey, seqid, start, stop ) )
+ link = self._get_remote_call_url( redirect_url, site_name, dataset, type, app, base_url )
+ ret_val.append( ( site_name, link ) )
return ret_val
-
def gbrowse_links( self, dataset, type, app, base_url ):
ret_val = []
- if dataset.has_data:
- viewport_tuple = self.get_estimated_display_viewport( dataset )
- seqid = viewport_tuple[0]
- start = viewport_tuple[1]
- stop = viewport_tuple[2]
- if seqid and start and stop:
- for site_name, site_url in util.get_gbrowse_sites_by_build( dataset.dbkey ):
- if site_name in app.config.gbrowse_display_sites:
- # Old method, the one uncommented below now seems to be the way GBrowse wants the request
- # redirect_url = urllib.quote_plus( "%s%s/?ref=%s&start=%s&stop=%s&eurl=%%s" % ( site_url, dataset.dbkey, seqid, start, stop ) )
- redirect_url = urllib.quote_plus( "%s/?q=%s:%s..%s" % ( site_url, seqid, start, stop ) )
- link = self._get_remote_call_url( redirect_url, site_name, dataset, type, app, base_url )
- ret_val.append( ( site_name, link ) )
+ seqid, start, stop = self.get_estimated_display_viewport( dataset )
+ if seqid is not None:
+ for site_name, site_url in util.get_gbrowse_sites_by_build( dataset.dbkey ):
+ if site_name in app.config.gbrowse_display_sites:
+ # Old method, the one uncommented below now seems to be the way GBrowse wants the request
+ # redirect_url = urllib.quote_plus( "%s%s/?ref=%s&start=%s&stop=%s&eurl=%%s" % ( site_url, dataset.dbkey, seqid, start, stop ) )
+ redirect_url = urllib.quote_plus( "%s/?q=%s:%s..%s" % ( site_url, seqid, start, stop ) )
+ link = self._get_remote_call_url( redirect_url, site_name, dataset, type, app, base_url )
+ ret_val.append( ( site_name, link ) )
return ret_val
def sniff( self, filename ):
"""
@@ -974,53 +965,45 @@ class Wiggle( Tabular, _RemoteCallMixin
self.add_display_app( 'gbrowse', 'display in Gbrowse', 'as_gbrowse_display_file', 'gbrowse_links' )
def get_estimated_display_viewport( self, dataset ):
- num_check_lines = 100 # only check up to this many non empty lines
- vstart = None
- vend = 0
- vwig_chr = '?'
- value = None
- for i, line in enumerate( file( dataset.file_name ) ):
- line = line.rstrip( '\r\n' )
- if line:
- if line.startswith( "browser" ):
- chr_info = line.split()[-1]
- wig_chr, coords = chr_info.split( ":" )
- start, end = coords.split( "-" )
- value = ( wig_chr, start, end )
+ if self.displayable( dataset ):
+ num_check_lines = 100 # only check up to this many non empty lines
+ vstart = None
+ vend = 0
+ vwig_chr = '?'
+ value = None
+ for i, line in enumerate( file( dataset.file_name ) ):
+ line = line.rstrip( '\r\n' )
+ if line:
+ if line.startswith( "browser" ):
+ chr_info = line.split()[-1]
+ wig_chr, coords = chr_info.split( ":" )
+ start, end = coords.split( "-" )
+ value = ( wig_chr, start, end )
+ break
+ # variableStep chrom=chr20
+ if line and (line.lower().startswith( "variablestep" ) or line.lower().startswith( "fixedstep" )):
+ c = line.split("chr")[-1]
+ c = c.split()[0]
+ vwig_chr = 'chr%s' % c
+ else:
+ try:
+ offset = line.split()[0]
+ offset = int(offset)
+ vend = max(vend,offset)
+ if not vstart:
+ vstart = offset # first
+ except:
+ pass
+ if i > num_check_lines:
break
- # variableStep chrom=chr20
- if line and (line.lower().startswith( "variablestep" ) or line.lower().startswith( "fixedstep" )):
- c = line.split("chr")[-1]
- c = c.split()[0]
- vwig_chr = 'chr%s' % c
- else:
- try:
- offset = line.split()[0]
- offset = int(offset)
- vend = max(vend,offset)
- if not vstart:
- vstart = offset # first
- except:
- pass
- if i > num_check_lines:
- break
- if value == None:
- value = (vwig_chr, vstart, vend)
- return value
-
- def _get_viewer_range( self, dataset ):
- """Retrieve the chromosome, start, end for an external viewer."""
- if dataset.has_data:
- viewport_tuple = self.get_estimated_display_viewport( dataset )
- if viewport_tuple:
- chrom = viewport_tuple[0]
- start = viewport_tuple[1]
- stop = viewport_tuple[2]
- return ( chrom, start, stop )
- return ( None, None, None )
+ if value == None:
+ value = (vwig_chr, vstart, vend)
+ return value
+ else:
+ return ( None, None, None )
def gbrowse_links( self, dataset, type, app, base_url ):
ret_val = []
- chrom, start, stop = self._get_viewer_range( dataset )
+ chrom, start, stop = self.get_estimated_display_viewport( dataset )
if chrom is not None:
for site_name, site_url in util.get_gbrowse_sites_by_build( dataset.dbkey ):
if site_name in app.config.gbrowse_display_sites:
@@ -1030,7 +1013,7 @@ class Wiggle( Tabular, _RemoteCallMixin
return ret_val
def ucsc_links( self, dataset, type, app, base_url ):
ret_val = []
- chrom, start, stop = self._get_viewer_range( dataset )
+ chrom, start, stop = self.get_estimated_display_viewport( dataset )
if chrom is not None:
for site_name, site_url in util.get_ucsc_by_build( dataset.dbkey ):
if site_name in app.config.ucsc_display_sites:
@@ -1137,59 +1120,56 @@ class CustomTrack ( Tabular ):
"""Returns formated html of peek"""
return Tabular.make_html_table( self, dataset, skipchars=['track', '#'] )
def get_estimated_display_viewport( self, dataset ):
- try:
- wiggle_format = False
- for line in open(dataset.file_name):
- if (line.startswith("chr") or line.startswith("scaffold")):
- line = line.rstrip( '\n\r' )
- start = line.split("\t")[1].replace(",","")
- end = line.split("\t")[2].replace(",","")
-
- if int(start) < int(end):
- value = ( line.split("\t")[0], start, end )
- else:
- value = ( line.split("\t")[0], end, start )
-
- break
-
- elif (line.startswith('variableStep')):
- # wiggle format
- wiggle_format = True
- wig_chr = line.split()[1].split('=')[1]
- if not wig_chr.startswith("chr"):
- value = ('', '', '')
+ if self.displayable( dataset ):
+ try:
+ wiggle_format = False
+ for line in open(dataset.file_name):
+ if (line.startswith("chr") or line.startswith("scaffold")):
+ line = line.rstrip( '\n\r' )
+ start = line.split("\t")[1].replace(",","")
+ end = line.split("\t")[2].replace(",","")
+
+ if int(start) < int(end):
+ value = ( line.split("\t")[0], start, end )
+ else:
+ value = ( line.split("\t")[0], end, start )
+
break
- elif wiggle_format:
- # wiggle format
- if line.split("\t")[0].isdigit():
- start = line.split("\t")[0]
- end = str(int(start) + 1)
- value = (wig_chr, start, end)
- else:
- value = (wig_chr, '', '')
- break
-
- return value #returns the co-ordinates of the 1st track/dataset
- except:
- #return "."
- return ('', '', '')
+
+ elif (line.startswith('variableStep')):
+ # wiggle format
+ wiggle_format = True
+ wig_chr = line.split()[1].split('=')[1]
+ if not wig_chr.startswith("chr"):
+ value = ('', '', '')
+ break
+ elif wiggle_format:
+ # wiggle format
+ if line.split("\t")[0].isdigit():
+ start = line.split("\t")[0]
+ end = str(int(start) + 1)
+ value = (wig_chr, start, end)
+ else:
+ value = (wig_chr, '', '')
+ break
+ return value #returns the co-ordinates of the 1st track/dataset
+ except:
+ return ( None, None, None )
+ else:
+ return ( None, None, None )
def ucsc_links( self, dataset, type, app, base_url ):
ret_val = []
- if dataset.has_data:
- viewport_tuple = self.get_estimated_display_viewport(dataset)
- if viewport_tuple:
- chrom = viewport_tuple[0]
- start = viewport_tuple[1]
- stop = viewport_tuple[2]
- for site_name, site_url in util.get_ucsc_by_build(dataset.dbkey):
- if site_name in app.config.ucsc_display_sites:
- internal_url = "%s" % url_for( controller='dataset', dataset_id=dataset.id, action='display_at', filename='ucsc_' + site_name )
- if base_url.startswith( 'https://' ):
- base_url = base_url.replace( 'https', 'http', 1 )
- display_url = urllib.quote_plus( "%s%s/display_as?id=%i&display_app=%s&authz_method=display_at" % (base_url, url_for( controller='root' ), dataset.id, type) )
- redirect_url = urllib.quote_plus( "%sdb=%s&position=%s:%s-%s&hgt.customText=%%s" % (site_url, dataset.dbkey, chrom, start, stop ) )
- link = '%s?redirect_url=%s&display_url=%s' % ( internal_url, redirect_url, display_url )
- ret_val.append( (site_name, link) )
+ chrom, start, stop = self.get_estimated_display_viewport(dataset)
+ if chrom is not None:
+ for site_name, site_url in util.get_ucsc_by_build(dataset.dbkey):
+ if site_name in app.config.ucsc_display_sites:
+ internal_url = "%s" % url_for( controller='dataset', dataset_id=dataset.id, action='display_at', filename='ucsc_' + site_name )
+ if base_url.startswith( 'https://' ):
+ base_url = base_url.replace( 'https', 'http', 1 )
+ display_url = urllib.quote_plus( "%s%s/display_as?id=%i&display_app=%s&authz_method=display_at" % (base_url, url_for( controller='root' ), dataset.id, type) )
+ redirect_url = urllib.quote_plus( "%sdb=%s&position=%s:%s-%s&hgt.customText=%%s" % (site_url, dataset.dbkey, chrom, start, stop ) )
+ link = '%s?redirect_url=%s&display_url=%s' % ( internal_url, redirect_url, display_url )
+ ret_val.append( (site_name, link) )
return ret_val
def sniff( self, filename ):
"""
--- a/templates/library/common/ldda_info.mako
+++ b/templates/library/common/ldda_info.mako
@@ -61,7 +61,7 @@
%if current_version and can_modify:
<a class="action-button" href="${h.url_for( controller='library_common', action='upload_library_dataset', cntrller=cntrller, library_id=trans.security.encode_id( library.id ), folder_id=trans.security.encode_id( ldda.library_dataset.folder.id ), replace_id=trans.security.encode_id( ldda.library_dataset.id ) )}">Upload a new version of this dataset</a>
%endif
- %if cntrller=='library' and ldda.has_data:
+ %if cntrller=='library' and ldda.has_data():
<a class="action-button" href="${h.url_for( controller='library_common', action='act_on_multiple_datasets', cntrller=cntrller, library_id=trans.security.encode_id( library.id ), ldda_ids=trans.security.encode_id( ldda.id ), do_action='import_to_history', use_panels=use_panels, show_deleted=show_deleted )}">Import this dataset into your current history</a><a class="action-button" href="${h.url_for( controller='library_common', action='download_dataset_from_folder', cntrller=cntrller, id=trans.security.encode_id( ldda.id ), library_id=trans.security.encode_id( library.id ), use_panels=use_panels, show_deleted=show_deleted )}">Download this dataset</a>
%endif
1
0

galaxy-dist commit 11fb3bb5b250: Fix bug so that users not logged in can view accessible/published visualizations.
by commits-noreply@bitbucket.org 16 Jul '10
by commits-noreply@bitbucket.org 16 Jul '10
16 Jul '10
# HG changeset patch -- Bitbucket.org
# Project galaxy-dist
# URL http://bitbucket.org/galaxy/galaxy-dist/overview
# User jeremy goecks <jeremy.goecks(a)emory.edu>
# Date 1279227905 14400
# Node ID 11fb3bb5b25058b55d927d4dfb39dab1112f290b
# Parent 067e34574408d42d18cbf91b78e2ee6046a4ef01
Fix bug so that users not logged in can view accessible/published visualizations.
--- a/lib/galaxy/web/controllers/visualization.py
+++ b/lib/galaxy/web/controllers/visualization.py
@@ -280,12 +280,11 @@ class VisualizationController( BaseContr
return return_dict
@web.expose
- @web.require_login("get item content asynchronously")
def get_item_content_async( self, trans, id ):
""" Returns item content in HTML format. """
# Get visualization, making sure it's accessible.
- visualization = self.get_visualization( trans, id, False, True)
+ visualization = self.get_visualization( trans, id, False, True )
if visualization is None:
raise web.httpexceptions.HTTPNotFound()
1
0

galaxy-dist commit 067e34574408: Fix bug so that fasta identifier produced by 'extract genomic dna' tool for GFF files is consistent with GFF coordinates.
by commits-noreply@bitbucket.org 16 Jul '10
by commits-noreply@bitbucket.org 16 Jul '10
16 Jul '10
# HG changeset patch -- Bitbucket.org
# Project galaxy-dist
# URL http://bitbucket.org/galaxy/galaxy-dist/overview
# User jeremy goecks <jeremy.goecks(a)emory.edu>
# Date 1279227794 14400
# Node ID 067e34574408d42d18cbf91b78e2ee6046a4ef01
# Parent e56cc2ed66423b51249eb0bf3f5f9f7ccd774bce
Fix bug so that fasta identifier produced by 'extract genomic dna' tool for GFF files is consistent with GFF coordinates.
--- a/tools/extract/extract_genomic_dna.py
+++ b/tools/extract/extract_genomic_dna.py
@@ -158,6 +158,8 @@ def __main__():
if output_format == "fasta" :
l = len( sequence )
c = 0
+ if gff_format:
+ start, end = convert_bed_coords_to_gff( [ start, end ] )
fields = [dbkey, str( chrom ), str( start ), str( end ), strand]
meta_data = "_".join( fields )
fout.write( ">%s\n" % meta_data )
1
0

galaxy-dist commit 9638200fbfdc: Fixes for rgManQQ - manhattan and qqplot generator for
by commits-noreply@bitbucket.org 16 Jul '10
by commits-noreply@bitbucket.org 16 Jul '10
16 Jul '10
# HG changeset patch -- Bitbucket.org
# Project galaxy-dist
# URL http://bitbucket.org/galaxy/galaxy-dist/overview
# User fubar: ross Lazarus at gmail period com
# Date 1279184288 14400
# Node ID 9638200fbfdcc470675ca6b65f0220f28ed1809c
# Parent c0eb25264f919b2e7cac25b65483aa1ce4c6f54d
Fixes for rgManQQ - manhattan and qqplot generator for
interval pvalues
New qqplot image
Fixes to fix test output generators to only provide one set of pval columns
--- a/tools/rgenetics/rgManQQ.xml
+++ b/tools/rgenetics/rgManQQ.xml
@@ -38,13 +38,13 @@
<param name='i' value='smallwgaP.xls' ftype='tabular' ></param><param name='name' value='rgManQQtest1' />
- <param name='pval_col' value='5,7' />
+ <param name='pval_col' value='7' /><param name='chrom_col' value='1' /><param name='offset_col' value='2' /><param name='grey' value='0' /><output name='out_html' file='rgtestouts/rgManQQ/rgManQQtest1.html' ftype='html' lines_diff='17'><extra_files type="file" name='Allelep_manhattan.png' value='rgtestouts/rgManQQ/Allelep_manhattan.png' compare="sim_size"
- delta = "100" />
+ delta = "4000" /><extra_files type="file" name='Allelep_qqplot.png' value='rgtestouts/rgManQQ/Allelep_qqplot.png' compare="sim_size"
delta = "4000" /><extra_files type="file" name='Armitagep_manhattan.png' value='rgtestouts/rgManQQ/Armitagep_manhattan.png' compare="sim_size"
--- a/tools/rgenetics/rgtest.sh
+++ b/tools/rgenetics/rgtest.sh
@@ -35,7 +35,7 @@ TOOL="rgManQQ"
NPRE=${TOOL}test1
OUTPATH="$OROOT/$TOOL"
mkdir $OUTPATH
-CL="python $TOOLPATH/$TOOL.py "$INPATH/smallwgaP.xls" $NPRE ${OUTPATH}/${NPRE}.html $OUTPATH 1 2 5,7 0"
+CL="python $TOOLPATH/$TOOL.py "$INPATH/smallwgaP.xls" $NPRE ${OUTPATH}/${NPRE}.html $OUTPATH 1 2 7 0"
# rgManQQ.py '$input_file' "$name" '$out_html' '$out_html.files_path' '$chrom_col' '$offset_col'
# '$pval_col'
#python /opt/galaxy/tools/rgenetics/rgManQQ.py /opt/galaxy/test-data/smallwgaP.xls rgManQQtest1
Binary file test-data/rgtestouts/rgManQQ/Allelep_qqplot.png has changed
--- a/tools/rgenetics/rgtest_one_tool.sh
+++ b/tools/rgenetics/rgtest_one_tool.sh
@@ -2,7 +2,7 @@
# script to generate all functional test outputs for each rgenetics tool
# could be run at installation to ensure all dependencies are in place?
case $# in 0) echo "USAGE: ${0##*/} TooltoTest galaxyRoot outRoot"; exit 1;;
- [1-3]*) echo "Need ToolToTest and paths for galaxyRoot outRoot as parameters"; exit 2;;
+ [1-2]*) echo "Need ToolToTest and paths for galaxyRoot outRoot as parameters"; exit 2;;
[5-10]*) echo "Too many arguments - ToolToTest and paths for galaxyRoot outRoot as parameters"; exit 2;;
*)
esac
@@ -22,13 +22,13 @@ TOOL="rgManQQ"
NPRE=${TOOL}test1
OUTPATH="$OROOT/$TOOL"
rm -rf $OUTPATH/*
-CL="python $TOOLPATH/$TOOL.py "$INPATH/smallwgaP.xls" $NPRE ${OUTPATH}/${NPRE}.html $OUTPATH 1 2 5,7 0"
+CL="python $TOOLPATH/$TOOL.py "$INPATH/smallwgaP.xls" $NPRE ${OUTPATH}/${NPRE}.html $OUTPATH 1 2 7 0"
# rgManQQ.py '$input_file' "$name" '$out_html' '$out_html.files_path' '$chrom_col' '$offset_col'
# '$pval_col'
#python /opt/galaxy/tools/rgenetics/rgManQQ.py /opt/galaxy/test-data/smallwgaP.xls rgManQQtest1
#/opt/galaxy/test-data/rgtestouts/rgManQQ/rgManQQtest1.html /opt/galaxy/test-data/rgtestouts/rgManQQ 1 2 5,7
echo "Testing $TOOL using $CL"
-python $TOOLPATH/$TOOL.py "$INPATH/smallwgaP.xls" $NPRE ${OUTPATH}/${NPRE}.html $OUTPATH 1 2 5,7 0
+python $TOOLPATH/$TOOL.py "$INPATH/smallwgaP.xls" $NPRE ${OUTPATH}/${NPRE}.html $OUTPATH 1 2 7 0
;;
'rgfakePhe')
1
0

galaxy-dist commit 0bb17e66a560: Added Sscrofa9.58 to manual_builds.txt and removed phiX from builds.txt.sample (it's in manual_builds.txt)
by commits-noreply@bitbucket.org 16 Jul '10
by commits-noreply@bitbucket.org 16 Jul '10
16 Jul '10
# HG changeset patch -- Bitbucket.org
# Project galaxy-dist
# URL http://bitbucket.org/galaxy/galaxy-dist/overview
# User Kelly Vincent <kpvincent(a)bx.psu.edu>
# Date 1279209889 14400
# Node ID 0bb17e66a56098391e5bbdd34ca227b595ddf082
# Parent 4f157f2c6fd9cc1b692e55fe38dd66243e881439
Added Sscrofa9.58 to manual_builds.txt and removed phiX from builds.txt.sample (it's in manual_builds.txt)
--- a/tool-data/shared/ucsc/manual_builds.txt
+++ b/tool-data/shared/ucsc/manual_builds.txt
@@ -669,3 +669,4 @@ arabidopsis Arabidopsis thaliana TAIR9
arabidopsis_tair8 Arabidopsis thaliana TAIR8
araTha1 Arabidopsis thaliana TAIR7
mm5 Mouse May 2004 (mm5)
+Sscrofa9.58 Pig May 2010 (SGSC Sscrofa9.58)
--- a/tool-data/shared/ucsc/builds.txt.sample
+++ b/tool-data/shared/ucsc/builds.txt.sample
@@ -150,4 +150,3 @@ falciparum P. falciparum Plasmodium falc
sacCer2 S. cerevisiae June 2008 (SGD/sacCer2) (sacCer2)
sacCer1 S. cerevisiae Oct. 2003 (SGD/sacCer1) (sacCer1)
sc1 SARS coronavirus Apr. 2003 (GenBank Apr. 14 '03/sc1) (sc1)
-phiX phiX174 (phiX)
1
0

galaxy-dist commit c0eb25264f91: Do not require annotation when editing visualization attributes.
by commits-noreply@bitbucket.org 16 Jul '10
by commits-noreply@bitbucket.org 16 Jul '10
16 Jul '10
# HG changeset patch -- Bitbucket.org
# Project galaxy-dist
# URL http://bitbucket.org/galaxy/galaxy-dist/overview
# User jeremy goecks <jeremy.goecks(a)emory.edu>
# Date 1279141279 14400
# Node ID c0eb25264f919b2e7cac25b65483aa1ce4c6f54d
# Parent 635d6ada4357d7daafb6862758acdf26f94af53f
Do not require annotation when editing visualization attributes.
--- a/lib/galaxy/web/controllers/visualization.py
+++ b/lib/galaxy/web/controllers/visualization.py
@@ -373,13 +373,12 @@ class VisualizationController( BaseContr
visualization_slug_err = "Visualization identifier must consist of only lowercase letters, numbers, and the '-' character"
elif visualization_slug != visualization.slug and trans.sa_session.query( model.Visualization ).filter_by( user=user, slug=visualization_slug, deleted=False ).first():
visualization_slug_err = "Visualization id must be unique"
- elif not visualization_annotation:
- visualization_annotation_err = "Visualization annotation is required"
else:
visualization.title = visualization_title
visualization.slug = visualization_slug
- visualization_annotation = sanitize_html( visualization_annotation, 'utf-8', 'text/html' )
- self.add_item_annotation( trans, visualization, visualization_annotation )
+ if visualization_annotation != "":
+ visualization_annotation = sanitize_html( visualization_annotation, 'utf-8', 'text/html' )
+ self.add_item_annotation( trans, visualization, visualization_annotation )
session.flush()
# Redirect to visualization list.
return trans.response.send_redirect( web.url_for( action='list' ) )
1
0

galaxy-dist commit 14406c63e7bd: Update vcf_to_mafcustomtrack tool to enforce a minimum of one dataset to be selected.
by commits-noreply@bitbucket.org 16 Jul '10
by commits-noreply@bitbucket.org 16 Jul '10
16 Jul '10
# HG changeset patch -- Bitbucket.org
# Project galaxy-dist
# URL http://bitbucket.org/galaxy/galaxy-dist/overview
# User Dan Blankenberg <dan(a)bx.psu.edu>
# Date 1279124304 14400
# Node ID 14406c63e7bd2569bdbb73af2949e7e020c22acd
# Parent 63db00b2f0a3ef973666c81b8cd4934ad36c5317
Update vcf_to_mafcustomtrack tool to enforce a minimum of one dataset to be selected.
--- a/tools/maf/vcf_to_maf_customtrack.xml
+++ b/tools/maf/vcf_to_maf_customtrack.xml
@@ -23,13 +23,13 @@
<option value="-s">Per Sample</option></param><when value="-p">
- <repeat name="vcf_file" title="VCF population file">
+ <repeat name="vcf_file" title="VCF population file" min="1"><param format="tabular" name="vcf_input" type="data" label="VCF file"/><param name="population_name" type="text" label="Name for this population" value=""/></repeat></when><when value="-s">
- <repeat name="vcf_file" title="VCF sample file">
+ <repeat name="vcf_file" title="VCF sample file" min="1"><param format="tabular" name="vcf_input" type="data" label="VCF file"/><!-- add column count validator >= 8? --></repeat>
1
0

galaxy-dist commit 635d6ada4357: Various Bug fixes for libraries including deleting of or adding new versions to LibraryDatasets and for importing into a new LibraryDataset from a history.
by commits-noreply@bitbucket.org 16 Jul '10
by commits-noreply@bitbucket.org 16 Jul '10
16 Jul '10
# HG changeset patch -- Bitbucket.org
# Project galaxy-dist
# URL http://bitbucket.org/galaxy/galaxy-dist/overview
# User Dan Blankenberg <dan(a)bx.psu.edu>
# Date 1279141069 14400
# Node ID 635d6ada4357d7daafb6862758acdf26f94af53f
# Parent 14406c63e7bd2569bdbb73af2949e7e020c22acd
Various Bug fixes for libraries including deleting of or adding new versions to LibraryDatasets and for importing into a new LibraryDataset from a history.
--- a/lib/galaxy/web/controllers/library_common.py
+++ b/lib/galaxy/web/controllers/library_common.py
@@ -1395,7 +1395,7 @@ class LibraryCommon( BaseController ):
else:
# Since permissions on all LibraryDatasetDatasetAssociations must be the same at this point, we only need
# to check one of them to see if the current user can manage permissions on them.
- check_ldda = trans.sa_session.query( trans.app.model.LibraryDatasetDatasetAssociation ).get( trans.security.decode_id( ldda_id_list[0] ) )
+ check_ldda = trans.sa_session.query( trans.app.model.LibraryDatasetDatasetAssociation ).get( ldda_id_list[0] )
if trans.app.security_agent.can_manage_library_item( current_user_roles, check_ldda ):
if replace_dataset:
default_action = ''
@@ -1526,7 +1526,7 @@ class LibraryCommon( BaseController ):
if params.get( 'edit_attributes_button', False ):
# Deny access if the user is not an admin and does not have the LIBRARY_MODIFY permission.
if not ( is_admin or trans.app.security_agent.can_modify_library_item( current_user_roles, library_dataset ) ):
- message = "You are not authorized to modify library dataset '%s'." % ldda.name
+ message = "You are not authorized to modify library dataset '%s'." % library_dataset.name
return trans.response.send_redirect( web.url_for( controller='library_common',
action='browse_library',
id=library_id,
@@ -1615,7 +1615,7 @@ class LibraryCommon( BaseController ):
trans.sa_session.refresh( library_dataset.library_dataset_dataset_association )
message = "Permisisons updated for library dataset '%s'." % library_dataset.name
status = 'done'
- roles = trans.app.security_agent.get_legitimate_roles( trans, library, cntrller )
+ roles = trans.app.security_agent.get_legitimate_roles( trans, library_dataset, cntrller )
return trans.fill_template( '/library/common/library_dataset_permissions.mako',
cntrller=cntrller,
use_panels=use_panels,
@@ -1768,7 +1768,7 @@ class LibraryCommon( BaseController ):
outext = 'tbz2'
elif action == 'ngxzip':
archive = NgxZip( trans.app.config.nginx_x_archive_files_base )
- except (OSError, zipfile.BadZipFile):
+ except (OSError, zipfile.BadZipfile):
error = True
log.exception( "Unable to create archive for download" )
message = "Unable to create archive for download, please report this error"
@@ -2279,7 +2279,7 @@ class LibraryCommon( BaseController ):
if not library_item or not ( is_admin or trans.app.security_agent.can_access_library_item( current_user_roles, library_item, trans.user ) ):
message = 'Invalid %s id ( %s ) specifield.' % ( item_desc, item_id )
status = 'error'
- elif not ( is_admin or trans.app.security_agent.can_modify_library_item( current_user_roles, item ) ):
+ elif not ( is_admin or trans.app.security_agent.can_modify_library_item( current_user_roles, library_item ) ):
message = "You are not authorized to delete %s '%s'." % ( item_desc, library_item.name )
status = 'error'
else:
@@ -2328,7 +2328,7 @@ class LibraryCommon( BaseController ):
elif library_item.purged:
message = '%s %s has been purged, so it cannot be undeleted' % ( item_desc, library_item.name )
status = ERROR
- elif not ( is_admin or trans.app.security_agent.can_modify_library_item( current_user_roles, item ) ):
+ elif not ( is_admin or trans.app.security_agent.can_modify_library_item( current_user_roles, library_item ) ):
message = "You are not authorized to delete %s '%s'." % ( item_desc, library_item.name )
status = 'error'
else:
--- a/lib/galaxy/security/__init__.py
+++ b/lib/galaxy/security/__init__.py
@@ -246,7 +246,7 @@ class GalaxyRBACAgent( RBACAgent ):
elif type( item ) == self.model.LibraryFolder:
return self.can_access_library( roles, item.parent_library ) and self.check_folder_contents( user, roles, item )[0]
elif type( item ) == self.model.LibraryDataset:
- return self.can_acess_library( roles, item.folder.parent_library ) and self.can_access_dataset( roles, item.library_dataset_dataset_association.dataset )
+ return self.can_access_library( roles, item.folder.parent_library ) and self.can_access_dataset( roles, item.library_dataset_dataset_association.dataset )
elif type( item ) == self.model.LibraryDatasetDatasetAssociation:
return self.can_access_library( roles, item.library_dataset.folder.parent_library ) and self.can_access_dataset( roles, item.dataset )
else:
1
0