diff --git a/README.txt b/README.txt index fd2f7f88bb9..459a93ee5a1 100644 --- a/README.txt +++ b/README.txt @@ -7,7 +7,7 @@ website above. HOW TO START ============ -Galaxy requires Python 2.4, 2.5 or 2.6. To check your python version, run: +Galaxy requires Python 2.5, 2.6 or 2.7. To check your python version, run: % python -V Python 2.4.4 diff --git a/community_wsgi.ini.sample b/community_wsgi.ini.sample index 55b67ce5d4c..7dff5b2da3d 100644 --- a/community_wsgi.ini.sample +++ b/community_wsgi.ini.sample @@ -26,9 +26,6 @@ file_path = database/community_files # Temporary storage for additional datasets, this should be shared through the cluster new_file_path = database/tmp -# Where templates are stored -template_path = lib/galaxy/webapps/community/templates - # Session support (beaker) use_beaker_session = True session_type = memory diff --git a/contrib/README b/contrib/README index 8bd81b76e51..1bfe7741c1d 100644 --- a/contrib/README +++ b/contrib/README @@ -19,6 +19,12 @@ galaxy.debian-init: paths, and configure for start at boot with `update-rc.d galaxy defaults`. Also written and submitted by James Casbon. +galaxy.fedora-init: + + init script for Fedora/RedHat/Scientific Linux/CentOS. Copy to + /etc/init.d/galaxy, modify paths, and configure for start at boot with + `chkconfig galaxy on`. Written and submitted by Brad Chapman. + galaxy.solaris-smf.xml: SMF Manifest for Solaris 10 and OpenSolaris. Import with `svccfg import diff --git a/contrib/galaxy.fedora-init b/contrib/galaxy.fedora-init new file mode 100644 index 00000000000..58f08607b49 --- /dev/null +++ b/contrib/galaxy.fedora-init @@ -0,0 +1,105 @@ +#!/bin/bash +# +# Init file for Galaxy (http://galaxyproject.org/) +# Suitable for use on Fedora and derivatives (RedHat Enterprise Linux, Scientific Linux, CentOS) +# +# Contributed by Brad Chapman +# +# chkconfig: 2345 98 20 +# description: Galaxy http://galaxyproject.org/ + +#--- config + +SERVICE_NAME="galaxy" +RUN_AS="galaxy" +RUN_IN="/path/to/galaxy-dist" + +#--- main actions + +start() { + echo "Starting $SERVICE_NAME... " + cmd="cd $RUN_IN && sh run.sh --daemon" + case "$(id -un)" in + $RUN_AS) + eval "$cmd" + ;; + root) + su - $RUN_AS -c "$cmd" + ;; + *) + echo "*** ERROR *** must be $RUN_AS or root in order to control this service" >&2 + exit 1 + esac + echo "...done." +} + +stop() { + echo -n "Stopping $SERVICE_NAME... " + + cmd="cd $RUN_IN && sh run.sh --stop-daemon" + + case "$(id -un)" in + $RUN_AS) + eval "$cmd" + ;; + root) + su - $RUN_AS -c "$cmd" + ;; + *) + echo "*** ERROR *** must be $RUN_AS or root in order to control this service" >&2 + exit 1 + esac + + echo "done." +} + +status() { + echo -n "$SERVICE_NAME status: " + + while read pid; do + if [ "$(readlink -m /proc/$pid/cwd)" = "$(readlink -m $RUN_IN)" ]; then + echo "started" + return 0 + fi + done < <(ps ax -o 'pid cmd' | grep -P '^\s*\d+ python ./scripts/paster.py serve' | awk '{print $1}') + echo "stopped" + return 3 +} + +notsupported() { + echo "*** ERROR*** $SERVICE_NAME: operation [$1] not supported" +} + +usage() { + echo "Usage: $SERVICE_NAME start|stop|restart|status" +} + + +#--- + +case "$1" in + start) + start "$@" + ;; + stop) + stop + ;; + restart|reload) + stop + start + ;; + status) + set +e + status + exit $? + ;; + '') + usage >&2 + exit 1 + ;; + *) + notsupported "$1" >&2 + usage >&2 + exit 1 + ;; +esac diff --git a/datatypes_conf.xml.sample b/datatypes_conf.xml.sample index a7d31f05a5a..73e147ee71f 100644 --- a/datatypes_conf.xml.sample +++ b/datatypes_conf.xml.sample @@ -1,352 +1,376 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/display_applications/igv/bam.xml b/display_applications/igv/bam.xml index 03c1bbf3543..cbe652f39e7 100644 --- a/display_applications/igv/bam.xml +++ b/display_applications/igv/bam.xml @@ -1,12 +1,32 @@ + - - $jnlp.url - - - <?xml version="1.0" encoding="utf-8"?> + + + + + + + + + + + + + ${dataset.dbkey in $site_dbkeys} + + + ${redirect_url} + + + + + $site_organisms[ $site_dbkeys.index( $bam_file.dbkey ) ] + + + <?xml version="1.0" encoding="utf-8"?> <jnlp spec="1.0+" - codebase="http://www.broadinstitute.org/igvdata/jws/prod"> + codebase="${site_link}"> <information> <title>IGV 1.5</title> <vendor>The Broad Institute</vendor> @@ -54,17 +74,22 @@ <application-desc main-class="org.broad.igv.ui.IGVMainFrame"> <argument>-g</argument> - <argument>${bam_file.dbkey}</argument> + <argument>${site_organism}</argument> <argument>${bam_file.url}</argument> </application-desc> </jnlp> - - - - - http://localhost:60151/load?file=${qp($bam_file.url)}&genome=${qp($bam_file.dbkey)}&merge=true - - - + + #if $site_id.startswith( 'local_' ) + ${site_link}?file=${bam_file.qp}&genome=${site_organism}&merge=true + #elif $site_id.startswith( 'web_link_' ): + ${site_link}?sessionURL=${bam_file.qp}&genome=${site_organism}&merge=true + #else: + ${jnlp.url} + #end if + + + + + \ No newline at end of file diff --git a/display_applications/igv/vcf.xml b/display_applications/igv/vcf.xml new file mode 100644 index 00000000000..16ae71b749f --- /dev/null +++ b/display_applications/igv/vcf.xml @@ -0,0 +1,95 @@ + + + + + + + + + + + + + + + ${dataset.dbkey in $site_dbkeys} + + + ${redirect_url} + + + + + $site_organisms[ $site_dbkeys.index( $bgzip_file.dbkey ) ] + + + <?xml version="1.0" encoding="utf-8"?> +<jnlp + spec="1.0+" + codebase="${site_link}"> + <information> + <title>IGV 1.5</title> + <vendor>The Broad Institute</vendor> + <homepage href="http://www.broadinstitute.org/igv"/> + <description>IGV Software</description> + <description kind="short">IGV</description> + </information> + <security> + <all-permissions/> + </security> + <resources> + +<j2se version="1.5+" initial-heap-size="256m" max-heap-size="1100m"/> + <jar href="igv.jar" download="eager" main="true"/> + <jar href="batik-codec.jar" download="eager"/> + <property name="apple.laf.useScreenMenuBar" value="true"/> + <property name="com.apple.mrj.application.growbox.intrudes" value="false"/> + <property name="com.apple.mrj.application.live-resize" value="true"/> + <property name="com.apple.macos.smallTabs" value="true"/> + </resources> + + <resources os="Mac" arch="i386"> + <property name="apple.awt.graphics.UseQuartz" value="false"/> + <nativelib href="hdfnative-macintel.jar"/> + </resources> + + <resources os="Mac" arch="ppc"> + <property name="apple.awt.graphics.UseQuartz" value="false"/> + <nativelib href="hdfnative-macppc.jar"/> + </resources> + + <resources os="Mac" arch="PowerPC"> + <property name="apple.awt.graphics.UseQuartz" value="false"/> + <nativelib href="hdfnative-macppc.jar"/> + </resources> + + <resources os="Windows"> + <property name="sun.java2d.noddraw" value="true"/> + <nativelib href="hdfnative-win.jar"/> + </resources> + + <resources os="Linux"> + <nativelib href="hdfnative-linux64.jar"/> + </resources> + + <application-desc main-class="org.broad.igv.ui.IGVMainFrame"> + <argument>-g</argument> + <argument>${site_organism}</argument> + <argument>${bgzip_file.url}</argument> + </application-desc> +</jnlp> + + + #if $site_id.startswith( 'local_' ) + ${site_link}?file=${bgzip_file.qp}&genome=${site_organism}&merge=true + #elif $site_id.startswith( 'web_link_' ): + ${site_link}?sessionURL=${bgzip_file.qp}&genome=${site_organism}&merge=true + #else: + ${jnlp.url} + #end if + + + + + + \ No newline at end of file diff --git a/display_applications/ucsc/bam.xml b/display_applications/ucsc/bam.xml index da9183a35c9..4031e318237 100644 --- a/display_applications/ucsc/bam.xml +++ b/display_applications/ucsc/bam.xml @@ -10,8 +10,8 @@ ${dataset.dbkey in $builds} ${ucsc_link}db=${qp($bam_file.dbkey)}&hgt.customText=${qp($track.url)} - - - track type=bam name="${bam_file.name}" bigDataUrl=${bam_file.url} db=${bam_file.dbkey} + + + track type="bam" name="${bam_file.name.replace( '\\', '\\\\' ).replace( '"', '\\"' )}" bigDataUrl="${bam_file.url}" db="${bam_file.dbkey}" pairEndsByName="." diff --git a/display_applications/ucsc/bigbed.xml b/display_applications/ucsc/bigbed.xml index 21e08d0d9b9..59397182c6a 100644 --- a/display_applications/ucsc/bigbed.xml +++ b/display_applications/ucsc/bigbed.xml @@ -10,7 +10,7 @@ ${dataset.dbkey in $builds} ${ucsc_link}db=${qp($bigbed_file.dbkey)}&hgt.customText=${qp($track.url)} - - track type=bigBed name="${bigbed_file.name}" bigDataUrl=${bigbed_file.url} db=${bigbed_file.dbkey} + + track type="bigBed" name="${bigbed_file.name.replace( '\\', '\\\\' ).replace( '"', '\\"' )}" bigDataUrl="${bigbed_file.url}" db="${bigbed_file.dbkey}" diff --git a/display_applications/ucsc/bigwig.xml b/display_applications/ucsc/bigwig.xml index e3a5f5b291a..fcb5bad369b 100644 --- a/display_applications/ucsc/bigwig.xml +++ b/display_applications/ucsc/bigwig.xml @@ -10,7 +10,7 @@ ${dataset.dbkey in $builds} ${ucsc_link}db=${qp($bigwig_file.dbkey)}&hgt.customText=${qp($track.url)} - - track type=bigWig name="${bigwig_file.name}" bigDataUrl=${bigwig_file.url} db=${bigwig_file.dbkey} + + track type="bigWig" name="${bigwig_file.name.replace( '\\', '\\\\' ).replace( '"', '\\"' )}" bigDataUrl="${bigwig_file.url}" db="${bigwig_file.dbkey}" diff --git a/display_applications/ucsc/vcf.xml b/display_applications/ucsc/vcf.xml new file mode 100644 index 00000000000..1791199d06e --- /dev/null +++ b/display_applications/ucsc/vcf.xml @@ -0,0 +1,17 @@ + + + + + + + + + ${site_id in $APP.config.ucsc_display_sites} + ${dataset.dbkey in $builds} + + ${ucsc_link}db=${qp($bgzip_file.dbkey)}&hgt.customText=${qp($track.url)} + + + track type="vcfTabix" name="${bgzip_file.name.replace( '\\', '\\\\' ).replace( '"', '\\"' )}" bigDataUrl="${bgzip_file.url}" db="${bgzip_file.dbkey}" + + diff --git a/distributed_object_store_conf.xml.sample b/distributed_object_store_conf.xml.sample new file mode 100644 index 00000000000..38e61944a9f --- /dev/null +++ b/distributed_object_store_conf.xml.sample @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/eggs.ini b/eggs.ini index 7bec53d8b6f..53f0c09e0f9 100644 --- a/eggs.ini +++ b/eggs.ini @@ -12,7 +12,7 @@ repository = http://eggs.g2.bx.psu.edu no_auto = pbs_python DRMAA_python [eggs:platform] -bx_python = 0.7.0 +bx_python = 0.7.1 Cheetah = 2.2.2 ctypes = 1.0.2 DRMAA_python = 0.2 @@ -32,6 +32,7 @@ guppy = 0.1.8 [eggs:noplatform] amqplib = 0.6.1 Beaker = 1.4 +boto = 1.8d decorator = 3.1.2 docutils = 0.7 drmaa = 0.4b3 @@ -67,7 +68,7 @@ Whoosh = 0.3.18 psycopg2 = _8.4.2_static pysqlite = _3.6.17_static MySQL_python = _5.1.41_static -bx_python = _494c2d1d68b3_rebuild1 +bx_python = _7b95ff194725 GeneTrack = _dev_48da9e998f0caf01c5be731e926f4b0481f658f0 SQLAlchemy = _dev_r6498 pysam = _kanwei_b10f6e722e9a diff --git a/extract_dataset_parts.sh b/extract_dataset_parts.sh new file mode 100755 index 00000000000..26f915c0c3d --- /dev/null +++ b/extract_dataset_parts.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +cd `dirname $0` +for file in $1/split_info*.json +do + # echo processing $file + python ./scripts/extract_dataset_part.py $file +done diff --git a/lib/galaxy/app.py b/lib/galaxy/app.py index be16f355b1f..088f9cc31ed 100644 --- a/lib/galaxy/app.py +++ b/lib/galaxy/app.py @@ -3,11 +3,12 @@ import sys, os, atexit from galaxy import config, jobs, util, tools, web import galaxy.tools.search import galaxy.tools.data -import galaxy.tools.tool_shed_registry +import galaxy.tool_shed.tool_shed_registry from galaxy.web import security import galaxy.model import galaxy.datatypes.registry import galaxy.security +from galaxy.objectstore import build_object_store_from_config import galaxy.quota from galaxy.tags.tag_handler import GalaxyTagHandler from galaxy.tools.imp_exp import load_history_imp_exp_tools @@ -21,12 +22,13 @@ class UniverseApplication( object ): self.config = config.Configuration( **kwargs ) self.config.check() config.configure_logging( self.config ) - # Set up datatypes registry - self.datatypes_registry = galaxy.datatypes.registry.Registry( self.config.root, self.config.datatypes_config ) + # Initialize the datatypes registry to the default data types included in self.config.datatypes_config. + self.datatypes_registry = galaxy.datatypes.registry.Registry() + self.datatypes_registry.load_datatypes( self.config.root, self.config.datatypes_config ) galaxy.model.set_datatypes_registry( self.datatypes_registry ) # Set up the tool sheds registry if os.path.isfile( self.config.tool_sheds_config ): - self.tool_shed_registry = galaxy.tools.tool_shed_registry.Registry( self.config.root, self.config.tool_sheds_config ) + self.tool_shed_registry = galaxy.tool_shed.tool_shed_registry.Registry( self.config.root, self.config.tool_sheds_config ) else: self.tool_shed_registry = None # Determine the database url @@ -37,12 +39,15 @@ class UniverseApplication( object ): # Initialize database / check for appropriate schema version from galaxy.model.migrate.check import create_or_verify_database create_or_verify_database( db_url, kwargs.get( 'global_conf', {} ).get( '__file__', None ), self.config.database_engine_options ) + # Object store manager + self.object_store = build_object_store_from_config(self.config) # Setup the database engine and ORM from galaxy.model import mapping self.model = mapping.init( self.config.file_path, db_url, self.config.database_engine_options, - database_query_profiling_proxy = self.config.database_query_profiling_proxy ) + database_query_profiling_proxy = self.config.database_query_profiling_proxy, + object_store = self.object_store ) # Security helper self.security = security.SecurityHelper( id_secret=self.config.id_secret ) # Tag handler @@ -53,6 +58,20 @@ class UniverseApplication( object ): self.toolbox = tools.ToolBox( self.config.tool_configs, self.config.tool_path, self ) # Search support for tools self.toolbox_search = galaxy.tools.search.ToolBoxSearch( self.toolbox ) + # If enabled, check for tools missing from the distribution because they + # have been moved to the tool shed and install all such discovered tools. + if self.config.get_bool( 'enable_tool_shed_install', False ): + from tool_shed import install_manager + self.install_manager = install_manager.InstallManager( self, self.config.tool_shed_install_config, self.config.install_tool_config ) + # If enabled, poll respective tool sheds to see if updates are + # available for any installed tool shed repositories. + if self.config.get_bool( 'enable_tool_shed_check', False ): + from tool_shed import update_manager + self.update_manager = update_manager.UpdateManager( self ) + # Manage installed tool shed repositories + self.installed_repository_manager = galaxy.tool_shed.InstalledRepositoryManager( self ) + # Add additional datatypes from installed tool shed repositories to the datatypes registry. + self.installed_repository_manager.load_datatypes() # Load datatype converters self.datatypes_registry.load_datatype_converters( self.toolbox ) # Load history import/export tools @@ -99,8 +118,15 @@ class UniverseApplication( object ): self.job_stop_queue = self.job_manager.job_stop_queue # Initialize the external service types self.external_service_types = external_service_types.ExternalServiceTypesCollection( self.config.external_service_type_config_file, self.config.external_service_type_path, self ) - def shutdown( self ): self.job_manager.shutdown() + self.object_store.shutdown() if self.heartbeat: self.heartbeat.shutdown() + try: + # If the datatypes registry was persisted, attempt to + # remove the temporary file in which it was written. + if self.datatypes_registry.integrated_datatypes_configs is not None: + os.unlink( self.datatypes_registry.integrated_datatypes_configs ) + except: + pass diff --git a/lib/galaxy/config.py b/lib/galaxy/config.py index 22fa920d52d..7df465e839f 100644 --- a/lib/galaxy/config.py +++ b/lib/galaxy/config.py @@ -47,12 +47,29 @@ class Configuration( object ): self.enable_openid = string_as_bool( kwargs.get( 'enable_openid', False ) ) self.enable_quotas = string_as_bool( kwargs.get( 'enable_quotas', False ) ) self.tool_sheds_config = kwargs.get( 'tool_sheds_config_file', 'tool_sheds_conf.xml' ) + self.enable_unique_workflow_defaults = string_as_bool( kwargs.get( 'enable_unique_workflow_defaults', False ) ) self.tool_path = resolve_path( kwargs.get( "tool_path", "tools" ), self.root ) self.tool_data_path = resolve_path( kwargs.get( "tool_data_path", "tool-data" ), os.getcwd() ) self.len_file_path = kwargs.get( "len_file_path", resolve_path(os.path.join(self.tool_data_path, 'shared','ucsc','chrom'), self.root) ) self.test_conf = resolve_path( kwargs.get( "test_conf", "" ), self.root ) - self.tool_configs = [ resolve_path( p, self.root ) for p in listify( kwargs.get( 'tool_config_file', 'tool_conf.xml' ) ) ] + self.enable_tool_shed_install = string_as_bool( kwargs.get( 'enable_tool_shed_install', False ) ) + self.tool_shed_install_config = resolve_path( kwargs.get( "tool_shed_install_config_file", "tool_shed_install.xml" ), self.root ) + self.install_tool_config = resolve_path( kwargs.get( "install_tool_config_file", "shed_tool_conf.xml" ), self.root ) + if 'tool_config_file' in kwargs: + tcf = kwargs[ 'tool_config_file' ] + elif 'tool_config_files' in kwargs: + tcf = kwargs[ 'tool_config_files' ] + else: + tcf = 'tool_conf.xml' + self.tool_configs = [ resolve_path( p, self.root ) for p in listify( tcf ) ] self.tool_data_table_config_path = resolve_path( kwargs.get( 'tool_data_table_config_path', 'tool_data_table_conf.xml' ), self.root ) + self.enable_tool_shed_check = string_as_bool( kwargs.get( 'enable_tool_shed_check', False ) ) + try: + self.hours_between_check = int( kwargs.get( 'hours_between_check', 12 ) ) + if self.hours_between_check < 1 or self.hours_between_check > 24: + self.hours_between_check = 12 + except: + self.hours_between_check = 12 self.tool_secret = kwargs.get( "tool_secret", "" ) self.id_secret = kwargs.get( "id_secret", "USING THE DEFAULT IS NOT SECURE!" ) self.set_metadata_externally = string_as_bool( kwargs.get( "set_metadata_externally", "False" ) ) @@ -64,6 +81,7 @@ class Configuration( object ): self.allow_user_creation = string_as_bool( kwargs.get( "allow_user_creation", "True" ) ) self.allow_user_deletion = string_as_bool( kwargs.get( "allow_user_deletion", "False" ) ) self.allow_user_dataset_purge = string_as_bool( kwargs.get( "allow_user_dataset_purge", "False" ) ) + self.allow_user_impersonation = string_as_bool( kwargs.get( "allow_user_impersonation", "False" ) ) self.new_user_dataset_access_role_default_private = string_as_bool( kwargs.get( "new_user_dataset_access_role_default_private", "False" ) ) self.template_path = resolve_path( kwargs.get( "template_path", "templates" ), self.root ) self.template_cache = resolve_path( kwargs.get( "template_cache_path", "database/compiled_templates" ), self.root ) @@ -72,6 +90,7 @@ class Configuration( object ): self.job_queue_cleanup_interval = int( kwargs.get("job_queue_cleanup_interval", "5") ) self.cluster_files_directory = os.path.abspath( kwargs.get( "cluster_files_directory", "database/pbs" ) ) self.job_working_directory = resolve_path( kwargs.get( "job_working_directory", "database/job_working_directory" ), self.root ) + self.cleanup_job = kwargs.get( "cleanup_job", "always" ) self.outputs_to_working_directory = string_as_bool( kwargs.get( 'outputs_to_working_directory', False ) ) self.output_size_limit = int( kwargs.get( 'output_size_limit', 0 ) ) self.job_walltime = kwargs.get( 'job_walltime', None ) @@ -138,6 +157,13 @@ class Configuration( object ): self.nginx_upload_path = kwargs.get( 'nginx_upload_path', False ) if self.nginx_upload_store: self.nginx_upload_store = os.path.abspath( self.nginx_upload_store ) + self.object_store = kwargs.get( 'object_store', 'disk' ) + self.aws_access_key = kwargs.get( 'aws_access_key', None ) + self.aws_secret_key = kwargs.get( 'aws_secret_key', None ) + self.s3_bucket = kwargs.get( 's3_bucket', None) + self.use_reduced_redundancy = kwargs.get( 'use_reduced_redundancy', False ) + self.object_store_cache_size = float(kwargs.get( 'object_store_cache_size', -1 )) + self.distributed_object_store_config_file = kwargs.get( 'distributed_object_store_config_file', None ) # Parse global_conf and save the parser global_conf = kwargs.get( 'global_conf', None ) global_conf_parser = ConfigParser.ConfigParser() diff --git a/lib/galaxy/datatypes/binary.py b/lib/galaxy/datatypes/binary.py index 59c4213f46e..938d1e37f22 100644 --- a/lib/galaxy/datatypes/binary.py +++ b/lib/galaxy/datatypes/binary.py @@ -26,7 +26,7 @@ class Binary( data.Data ): """Set the peek and blurb text""" if not dataset.dataset.purged: dataset.peek = 'binary data' - dataset.blurb = 'data' + dataset.blurb = data.nice_size( dataset.get_size() ) else: dataset.peek = 'file does not exist' dataset.blurb = 'file purged from disk' diff --git a/lib/galaxy/datatypes/converters/bam_to_summary_tree_converter.py b/lib/galaxy/datatypes/converters/bam_to_summary_tree_converter.py deleted file mode 100644 index 0071b052d90..00000000000 --- a/lib/galaxy/datatypes/converters/bam_to_summary_tree_converter.py +++ /dev/null @@ -1,34 +0,0 @@ -#!/usr/bin/env python - -from __future__ import division - -import sys, os -sys.stderr = open(os.devnull, 'w') # suppress stderr as cython produces warning on some systems: - # csamtools.so:6: RuntimeWarning: __builtin__.file size changed - -from galaxy import eggs -import pkg_resources - -if sys.version_info[:2] == (2, 4): - pkg_resources.require( "ctypes" ) -pkg_resources.require( "pysam" ) - -from pysam import csamtools -from galaxy.visualization.tracks.summary import * - -def main(): - - input_fname = sys.argv[1] - index_fname = sys.argv[2] - out_fname = sys.argv[3] - - bamfile = csamtools.Samfile( filename=input_fname, mode='rb', index_filename=index_fname ) - - st = SummaryTree(block_size=25, levels=6, draw_cutoff=150, detail_cutoff=30) - for read in bamfile.fetch(): - st.insert_range(bamfile.getrname(read.rname), read.pos, read.pos + read.rlen) - - st.write(out_fname) - -if __name__ == "__main__": - main() diff --git a/lib/galaxy/datatypes/converters/bam_to_summary_tree_converter.xml b/lib/galaxy/datatypes/converters/bam_to_summary_tree_converter.xml index adfdb22acc8..0627dd6ff5a 100644 --- a/lib/galaxy/datatypes/converters/bam_to_summary_tree_converter.xml +++ b/lib/galaxy/datatypes/converters/bam_to_summary_tree_converter.xml @@ -1,6 +1,6 @@