1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/ee2feed164a9/
changeset: ee2feed164a9
user: natefoo
date: 2012-09-28 22:11:38
summary: pgcleanup/set_user_disk_usage: set usage to 0, not null, when the user has no active data.
affected #: 2 files
diff -r cfd26c91f6c3bb8b6365e7835263e11fc3013004 -r ee2feed164a9efc9201409b3e6191e2707ec3e18 scripts/cleanup_datasets/pgcleanup.py
--- a/scripts/cleanup_datasets/pgcleanup.py
+++ b/scripts/cleanup_datasets/pgcleanup.py
@@ -261,7 +261,7 @@
# TODO: h.purged = false should be unnecessary once all hdas in purged histories are purged.
sql = """
UPDATE galaxy_user
- SET disk_usage = (SELECT SUM(total_size)
+ SET disk_usage = (SELECT COALESCE(SUM(total_size), 0)
FROM ( SELECT d.total_size
FROM history_dataset_association hda
JOIN history h ON h.id = hda.history_id
diff -r cfd26c91f6c3bb8b6365e7835263e11fc3013004 -r ee2feed164a9efc9201409b3e6191e2707ec3e18 scripts/set_user_disk_usage.py
--- a/scripts/set_user_disk_usage.py
+++ b/scripts/set_user_disk_usage.py
@@ -30,6 +30,9 @@
import galaxy.config
from galaxy.objectstore import build_object_store_from_config
+ # lazy
+ globals()['nice_size'] = __import__( 'galaxy.util', globals(), locals(), ( 'nice_size', ) ).nice_size
+
config_parser = ConfigParser( dict( here = os.getcwd(),
database_connection = 'sqlite:///database/universe.sqlite?isolation_level=IMMEDIATE' ) )
config_parser.read( os.path.basename( options.config ) )
@@ -48,7 +51,7 @@
def pgcalc( sa_session, id ):
sql = """
UPDATE galaxy_user
- SET disk_usage = (SELECT SUM(total_size)
+ SET disk_usage = (SELECT COALESCE(SUM(total_size), 0)
FROM ( SELECT d.total_size
FROM history_dataset_association hda
JOIN history h ON h.id = hda.history_id
@@ -72,7 +75,7 @@
def quotacheck( sa_session, users, engine ):
sa_session.refresh( user )
current = user.get_disk_usage()
- print user.username, '<' + user.email + '> old usage:', str( current ) + ',',
+ print user.username, '<' + user.email + '>:',
if engine != 'postgres':
new = user.calculate_disk_usage()
sa_session.refresh( user )
@@ -83,10 +86,14 @@
else:
new = pgcalc( sa_session, user.id )
# yes, still a small race condition between here and the flush
- if new == current:
- print 'no change'
+ print 'old usage:', nice_size( current ), 'change:',
+ if new in ( current, None ):
+ print 'none'
else:
- print 'new usage:', new
+ op = '-'
+ if new > current:
+ op = '+'
+ print '%s%s' % ( op, nice_size( new ) )
if not options.dryrun and engine != 'postgres':
user.set_disk_usage( new )
sa_session.add( user )
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/cfd26c91f6c3/
changeset: cfd26c91f6c3
user: inithello
date: 2012-09-28 21:35:44
summary: Migrate BWA to the tool shed.
affected #: 6 files
diff -r 203e3e1592439dcb8c0eb890545ed38a66f08f2c -r cfd26c91f6c3bb8b6365e7835263e11fc3013004 lib/galaxy/tool_shed/migrate/versions/0005_tools.py
--- /dev/null
+++ b/lib/galaxy/tool_shed/migrate/versions/0005_tools.py
@@ -0,0 +1,15 @@
+"""
+The tools "Map with BWA for Illumina" and "Map with BWA for SOLiD" have
+been eliminated from the distribution. The tools are now available
+in the repository named bwa_wrappers from the main Galaxy tool shed at
+http://toolshed.g2.bx.psu.edu, and will be installed into your local
+Galaxy instance at the location discussed above by running the following
+command.
+"""
+
+import sys
+
+def upgrade():
+ print __doc__
+def downgrade():
+ pass
diff -r 203e3e1592439dcb8c0eb890545ed38a66f08f2c -r cfd26c91f6c3bb8b6365e7835263e11fc3013004 scripts/migrate_tools/0005_tools.sh
--- /dev/null
+++ b/scripts/migrate_tools/0005_tools.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+cd `dirname $0`/../..
+python ./scripts/migrate_tools/migrate_tools.py 0005_tools.xml $@
diff -r 203e3e1592439dcb8c0eb890545ed38a66f08f2c -r cfd26c91f6c3bb8b6365e7835263e11fc3013004 scripts/migrate_tools/0005_tools.xml
--- /dev/null
+++ b/scripts/migrate_tools/0005_tools.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<toolshed name="toolshed.g2.bx.psu.edu">
+ <repository name="bwa_wrappers" description="Galaxy wrappers for the BWA short read aligner." changeset_revision="ffa8aaa14f7c">
+ <tool id="bwa_wrapper" version="1.2.3" file="bwa_wrapper.xml"/>
+ <tool id="bwa_color_wrapper" version="1.0.2" file="bwa_color_wrapper.xml"/>
+ </repository>
+</toolshed>
diff -r 203e3e1592439dcb8c0eb890545ed38a66f08f2c -r cfd26c91f6c3bb8b6365e7835263e11fc3013004 tool-data/bwa_index.loc.sample
--- a/tool-data/bwa_index.loc.sample
+++ /dev/null
@@ -1,38 +0,0 @@
-#This is a sample file distributed with Galaxy that enables tools
-#to use a directory of BWA indexed sequences data files. You will need
-#to create these data files and then create a bwa_index.loc file
-#similar to this one (store it in this directory) that points to
-#the directories in which those files are stored. The bwa_index.loc
-#file has this format (longer white space characters are TAB characters):
-#
-#<unique_build_id><dbkey><display_name><file_path>
-#
-#So, for example, if you had phiX indexed stored in
-#/depot/data2/galaxy/phiX/base/,
-#then the bwa_index.loc entry would look like this:
-#
-#phiX174 phiX phiX Pretty /depot/data2/galaxy/phiX/base/phiX.fa
-#
-#and your /depot/data2/galaxy/phiX/base/ directory
-#would contain phiX.fa.* files:
-#
-#-rw-r--r-- 1 james universe 830134 2005-09-13 10:12 phiX.fa.amb
-#-rw-r--r-- 1 james universe 527388 2005-09-13 10:12 phiX.fa.ann
-#-rw-r--r-- 1 james universe 269808 2005-09-13 10:12 phiX.fa.bwt
-#...etc...
-#
-#Your bwa_index.loc file should include an entry per line for each
-#index set you have stored. The "file" in the path does not actually
-#exist, but it is the prefix for the actual index files. For example:
-#
-#phiX174 phiX phiX174 /depot/data2/galaxy/phiX/base/phiX.fa
-#hg18canon hg18 hg18 Canonical /depot/data2/galaxy/hg18/base/hg18canon.fa
-#hg18full hg18 hg18 Full /depot/data2/galaxy/hg18/base/hg18full.fa
-#/orig/path/hg19.fa hg19 hg19 /depot/data2/galaxy/hg19/base/hg19.fa
-#...etc...
-#
-#Note that for backwards compatibility with workflows, the unique ID of
-#an entry must be the path that was in the original loc file, because that
-#is the value stored in the workflow for that parameter. That is why the
-#hg19 entry above looks odd. New genomes can be better-looking.
-#
diff -r 203e3e1592439dcb8c0eb890545ed38a66f08f2c -r cfd26c91f6c3bb8b6365e7835263e11fc3013004 tool-data/bwa_index_color.loc.sample
--- a/tool-data/bwa_index_color.loc.sample
+++ /dev/null
@@ -1,38 +0,0 @@
-#This is a sample file distributed with Galaxy that enables tools
-#to use a directory of BWA indexed sequences data files. You will need
-#to create these data files and then create a bwa_index_color.loc file
-#similar to this one (store it in this directory) that points to
-#the directories in which those files are stored. The bwa_index_color.loc
-#file has this format (longer white space characters are TAB characters):
-#
-#<unique_build_id><dbkey><display_name><file_path>
-#
-#So, for example, if you had phiX indexed stored in
-#/depot/data2/galaxy/phiX/color/,
-#then the bwa_index.loc entry would look like this:
-#
-#phiX174 phiX phiX Pretty /depot/data2/galaxy/phiX/color/phiX.fa
-#
-#and your /depot/data2/galaxy/phiX/color/ directory
-#would contain phiX.fa.* files:
-#
-#-rw-r--r-- 1 james universe 830134 2005-09-13 10:12 phiX.fa.amb
-#-rw-r--r-- 1 james universe 527388 2005-09-13 10:12 phiX.fa.ann
-#-rw-r--r-- 1 james universe 269808 2005-09-13 10:12 phiX.fa.bwt
-#...etc...
-#
-#Your bwa_index_color.loc file should include an entry per line for each
-#index set you have stored. The "file" in the path does not actually
-#exist, but it is the prefix for the actual index files. For example:
-#
-#phiX174 phiX phiX174 /depot/data2/galaxy/phiX/color/phiX.fa
-#hg18canon hg18 hg18 Canonical /depot/data2/galaxy/hg18/color/hg18canon.fa
-#hg18full hg18 hg18 Full /depot/data2/galaxy/hg18/color/hg18full.fa
-#/orig/path/hg19.fa hg19 hg19 /depot/data2/galaxy/hg19/color/hg19.fa
-#...etc...
-#
-#Note that for backwards compatibility with workflows, the unique ID of
-#an entry must be the path that was in the original loc file, because that
-#is the value stored in the workflow for that parameter. That is why the
-#hg19 entry above looks odd. New genomes can be better-looking.
-#
diff -r 203e3e1592439dcb8c0eb890545ed38a66f08f2c -r cfd26c91f6c3bb8b6365e7835263e11fc3013004 tool_conf.xml.sample
--- a/tool_conf.xml.sample
+++ b/tool_conf.xml.sample
@@ -330,8 +330,6 @@
<tool file="sr_mapping/bowtie_wrapper.xml" /><tool file="sr_mapping/bowtie2_wrapper.xml" /><tool file="sr_mapping/bowtie_color_wrapper.xml" />
- <tool file="sr_mapping/bwa_wrapper.xml" />
- <tool file="sr_mapping/bwa_color_wrapper.xml" /><tool file="sr_mapping/bfast_wrapper.xml" /><tool file="metag_tools/megablast_wrapper.xml" /><tool file="metag_tools/megablast_xml_parser.xml" />
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/203e3e159243/
changeset: 203e3e159243
user: james_taylor
date: 2012-09-28 21:33:08
summary: Fix for main app rename in toolshed
affected #: 1 file
diff -r a37d82881a493b1ebf5e43d692c93b69bea44527 -r 203e3e1592439dcb8c0eb890545ed38a66f08f2c lib/galaxy/webapps/community/controllers/user.py
--- a/lib/galaxy/webapps/community/controllers/user.py
+++ b/lib/galaxy/webapps/community/controllers/user.py
@@ -1,1 +1,1 @@
-from galaxy.webapps.main.controllers.user import *
\ No newline at end of file
+from galaxy.webapps.galaxy.controllers.user import *
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/c8293bc4a964/
changeset: c8293bc4a964
user: natefoo
date: 2012-09-28 20:30:10
summary: Allow Postgres users to update user disk usage with a fast wCTE rather than a slower computation in Python.
affected #: 1 file
diff -r 8759493589092eb06138a75cf020f9cd8348106f -r c8293bc4a964863237fc069b4c1419a4674045e7 scripts/set_user_disk_usage.py
--- a/scripts/set_user_disk_usage.py
+++ b/scripts/set_user_disk_usage.py
@@ -43,31 +43,58 @@
from galaxy.model import mapping
- return mapping.init( config.file_path, config.database_connection, create_tables = False, object_store = object_store ), object_store
+ return mapping.init( config.file_path, config.database_connection, create_tables = False, object_store = object_store ), object_store, config.database_connection.split(':')[0]
-def quotacheck( sa_session, users ):
+def pgcalc( sa_session, id ):
+ sql = """
+ UPDATE galaxy_user
+ SET disk_usage = (SELECT SUM(total_size)
+ FROM ( SELECT d.total_size
+ FROM history_dataset_association hda
+ JOIN history h ON h.id = hda.history_id
+ JOIN dataset d ON hda.dataset_id = d.id
+ WHERE h.user_id = :id
+ AND h.purged = false
+ AND hda.purged = false
+ AND d.purged = false
+ AND d.id NOT IN (SELECT dataset_id
+ FROM library_dataset_dataset_association)
+ GROUP BY d.id) sizes)
+ WHERE id = :id
+ RETURNING disk_usage;
+ """
+ r = sa_session.execute(sql, {'id':id})
+ new = r.fetchone()[0]
+ if options.dryrun:
+ sa_session.rollback()
+ return new
+
+def quotacheck( sa_session, users, engine ):
sa_session.refresh( user )
current = user.get_disk_usage()
print user.username, '<' + user.email + '> old usage:', str( current ) + ',',
- new = user.calculate_disk_usage()
- sa_session.refresh( user )
- # usage changed while calculating, do it again
- if user.get_disk_usage() != current:
- print 'usage changed while calculating, trying again...'
- return quotacheck( sa_session, user )
+ if engine != 'postgres':
+ new = user.calculate_disk_usage()
+ sa_session.refresh( user )
+ # usage changed while calculating, do it again
+ if user.get_disk_usage() != current:
+ print 'usage changed while calculating, trying again...'
+ return quotacheck( sa_session, user, engine )
+ else:
+ new = pgcalc( sa_session, user.id )
# yes, still a small race condition between here and the flush
if new == current:
print 'no change'
else:
print 'new usage:', new
- if not options.dryrun:
+ if not options.dryrun and engine != 'postgres':
user.set_disk_usage( new )
sa_session.add( user )
sa_session.flush()
if __name__ == '__main__':
print 'Loading Galaxy model...'
- model, object_store = init()
+ model, object_store, engine = init()
sa_session = model.context.current
if not options.username and not options.email:
@@ -75,7 +102,7 @@
print 'Processing %i users...' % user_count
for i, user in enumerate( sa_session.query( model.User ).enable_eagerloads( False ).yield_per( 1000 ) ):
print '%3i%%' % int( float(i) / user_count * 100 ),
- quotacheck( sa_session, user )
+ quotacheck( sa_session, user, engine )
print '100% complete'
object_store.shutdown()
sys.exit( 0 )
@@ -87,4 +114,4 @@
print 'User not found'
sys.exit( 1 )
object_store.shutdown()
- quotacheck( sa_session, user )
+ quotacheck( sa_session, user, engine )
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/875949358909/
changeset: 875949358909
user: greg
date: 2012-09-28 20:25:57
summary: Handle files moved from one directory location to another in a change set in a tool shed repository.
affected #: 1 file
diff -r 485932c40a2e1b1ebcf786c0ffaf288a243d3d11 -r 8759493589092eb06138a75cf020f9cd8348106f lib/galaxy/webapps/community/controllers/common.py
--- a/lib/galaxy/webapps/community/controllers/common.py
+++ b/lib/galaxy/webapps/community/controllers/common.py
@@ -401,7 +401,12 @@
for ctx_file in manifest_ctx.files():
ctx_file_name = strip_path( ctx_file )
if ctx_file_name == stripped_filename:
- fctx = manifest_ctx[ ctx_file ]
+ try:
+ fctx = manifest_ctx[ ctx_file ]
+ except LookupError:
+ # The ctx_file may have been moved in the change set. For example, 'ncbi_blastp_wrapper.xml' was moved to
+ # 'tools/ncbi_blast_plus/ncbi_blastp_wrapper.xml', so keep looking for the file until we find the new location.
+ continue
fh = tempfile.NamedTemporaryFile( 'wb' )
tmp_filename = fh.name
fh.close()
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.