From af3b0669aa9310bb0b05a339cff79b09b03fe790 Mon Sep 17 00:00:00 2001 From: Greg Von Kuster Date: Fri, 28 Mar 2008 15:24:50 +0000 Subject: [PATCH] Eliminated all Python2.4 references, added necessary assert statements to ensure minimum version of Python 2.4. --- cron/updateucsc.sh.sample | 8 ++-- delete_userless_histories_main.sh | 5 +- .../converters/bed_to_gff_converter.py | 4 +- .../converters/bed_to_gff_converter.py.old | 46 ------------------- .../converters/bed_to_gff_converter.xml | 2 +- .../converters/bed_to_gff_converter.xml.old | 13 ------ .../converters/gff_to_bed_converter.py | 4 +- .../converters/gff_to_bed_converter.xml | 2 +- .../converters/interval_to_bed_converter.py | 4 +- .../converters/interval_to_bed_converter.xml | 2 +- .../converters/maf_to_fasta_converter.py | 4 +- .../converters/maf_to_fasta_converter.xml | 2 +- .../converters/maf_to_interval_converter.py | 4 +- .../converters/maf_to_interval_converter.xml | 2 +- lib/galaxy/tools/util/maf_utilities.py | 4 +- .../static/january_2008_style/gradient.py | 4 +- .../static/january_2008_style/make_style.py | 4 +- purge_datasets_main.sh | 5 +- purge_histories_main.sh | 5 +- run_reports.sh | 5 +- scripts/cleanup_datasets.py | 4 +- scripts/get_platforms.py | 6 ++- scripts/microbes/README.txt | 12 ++--- scripts/microbes/create_bacteria_loc_file.py | 4 +- scripts/microbes/create_bacteria_table.py | 4 +- scripts/microbes/create_nib_seq_loc_file.py | 4 +- scripts/microbes/get_builds_lengths.py | 4 +- scripts/microbes/harvest_bacteria.py | 4 +- scripts/microbes/util.py | 4 +- scripts/nosetests.py | 4 +- scripts/paster.py | 6 ++- scripts/remove_renamed_datasets_from_disk.py | 6 ++- scripts/rename_purged_datasets.py | 6 ++- scripts/update_dataset_size.py | 3 +- scripts/update_metadata.py | 3 +- static/june_2007_style/callout_top.py | 4 +- static/june_2007_style/circle.py | 4 +- static/june_2007_style/gradient.py | 4 +- static/june_2007_style/make_style.py | 4 +- static/june_2007_style/png_over_color.py | 4 +- static/june_2007_style/workflow_arrow.py | 4 +- static/light_hatched_style/gradient.py | 4 +- static/light_hatched_style/make_style.py | 4 +- static/light_hatched_style/png_over_color.py | 4 +- tools/data_source/echo.py | 5 +- tools/data_source/encode_import.py | 6 ++- tools/data_source/fetch.py | 4 +- tools/data_source/genbank.py | 4 +- tools/data_source/import.py | 5 +- tools/data_source/microbial_import.py | 6 ++- tools/data_source/ucsc_proxy.py | 4 +- tools/data_source/ucsc_tablebrowser.py | 4 +- tools/data_source/ucsc_tablebrowser.xml | 2 +- .../data_source/ucsc_tablebrowser_archaea.xml | 2 +- tools/data_source/ucsc_tablebrowser_test.xml | 2 +- tools/encode/gencode_partition.xml | 2 +- tools/encode/random_intervals.xml | 2 +- tools/encode/random_intervals_no_bits.py | 4 +- tools/encode/split_by_partitions.py | 4 +- tools/extract/extract_GFF_Features.py | 4 +- tools/extract/extract_GFF_Features.xml | 2 +- tools/extract/extract_genomic_dna.py | 4 +- tools/extract/liftOver_wrapper.py | 4 +- tools/extract/phastOdds/get_scores_galaxy.py | 4 +- tools/extract/phastOdds/phastOdds_tool.xml | 2 +- tools/fasta_tools/tabular_to_fasta.py | 4 +- tools/filters/axt_to_concat_fasta.xml | 2 +- tools/filters/axt_to_fasta.xml | 2 +- tools/filters/axt_to_lav.xml | 2 +- tools/filters/bed2gff.xml | 2 +- tools/filters/bed_to_gff_converter.py | 4 +- tools/filters/gff2bed.xml | 2 +- tools/filters/gff_to_bed_converter.py | 4 +- tools/filters/lav_to_bed.xml | 2 +- tools/hyphy/hyphy_branch_lengths_wrapper.xml | 2 +- tools/hyphy/hyphy_dnds_wrapper.xml | 2 +- tools/hyphy/hyphy_nj_tree_wrapper.xml | 2 +- tools/maf/genebed_maf_to_fasta.xml | 2 +- tools/maf/interval2maf.py | 4 +- tools/maf/interval2maf.xml | 2 +- tools/maf/interval2maf_pairwise.xml | 2 +- tools/maf/interval_maf_to_merged_fasta.py | 4 +- tools/maf/interval_maf_to_merged_fasta.xml | 2 +- tools/maf/maf_by_block_number.py | 4 +- tools/maf/maf_by_block_number.xml | 2 +- tools/maf/maf_limit_size.py | 4 +- tools/maf/maf_limit_size.xml | 2 +- tools/maf/maf_limit_to_species.xml | 2 +- tools/maf/maf_reverse_complement.py | 4 +- tools/maf/maf_reverse_complement.xml | 2 +- tools/maf/maf_stats.py | 4 +- tools/maf/maf_stats.xml | 2 +- tools/maf/maf_thread_for_species.xml | 2 +- tools/maf/maf_to_bed.xml | 2 +- tools/maf/maf_to_fasta.xml | 2 +- tools/metag_tools/megablast_xml_parser.xml | 2 +- tools/new_operations/basecoverage.xml | 2 +- tools/new_operations/cluster.xml | 2 +- tools/new_operations/complement.xml | 2 +- tools/new_operations/concat.xml | 2 +- tools/new_operations/coverage.xml | 2 +- tools/new_operations/flanking_features.xml | 2 +- tools/new_operations/get_flanks.xml | 2 +- tools/new_operations/gops_basecoverage.py | 4 +- tools/new_operations/intersect.xml | 2 +- tools/new_operations/join.xml | 2 +- tools/new_operations/merge.xml | 2 +- tools/new_operations/subtract.xml | 2 +- tools/new_operations/subtract_query.py | 4 +- tools/new_operations/subtract_query.xml | 2 +- tools/patmat/findcluster_mysql.py | 3 +- tools/patmat/findcluster_mysql.xml | 2 +- tools/patmat/findcluster_mysql_subs.py | 6 ++- tools/plotting/bar_chart.py | 5 +- tools/plotting/bar_chart.xml | 2 +- tools/plotting/histogram.py | 4 +- tools/plotting/plotter.py | 4 +- tools/regVariation/featureCounter.xml | 2 +- tools/regVariation/getIndelRates_3way.py | 4 +- tools/regVariation/getIndels.py | 4 +- tools/regVariation/maf_cpg_filter.py | 4 +- tools/regVariation/maf_cpg_filter.xml | 2 +- tools/regVariation/quality_filter.xml | 2 +- tools/regVariation/qv_to_bqv.xml | 2 +- tools/regVariation/windowSplitter.xml | 2 +- .../aggregate_binned_scores_in_intervals.xml | 2 +- tools/stats/aggregate_scores_in_intervals.py | 4 +- tools/stats/column_maker.xml | 2 +- tools/stats/filtering.xml | 2 +- tools/stats/grouping.xml | 2 +- tools/stats/wiggle_to_simple.xml | 2 +- tools/validation/fix_errors.xml | 2 +- tools/visualization/GMAJ.py | 4 +- tools/visualization/GMAJ.xml | 2 +- tools/visualization/LAJ.py | 5 +- tools/visualization/LAJ.xml | 2 +- .../visualization/build_ucsc_custom_track.py | 4 +- .../visualization/build_ucsc_custom_track.xml | 2 +- update_metadata.sh | 5 +- 139 files changed, 300 insertions(+), 215 deletions(-) delete mode 100644 lib/galaxy/datatypes/converters/bed_to_gff_converter.py.old delete mode 100644 lib/galaxy/datatypes/converters/bed_to_gff_converter.xml.old diff --git a/cron/updateucsc.sh.sample b/cron/updateucsc.sh.sample index e6022becb2f..fa33d659d34 100644 --- a/cron/updateucsc.sh.sample +++ b/cron/updateucsc.sh.sample @@ -17,7 +17,7 @@ echo "Updating UCSC static tables." # Try to build "builds.txt" echo "Updating builds.txt" -python2.4 ${GALAXY}/cron/parse_builds.py > ${GALAXY}/static/ucsc/new/builds.txt +python ${GALAXY}/cron/parse_builds.py > ${GALAXY}/static/ucsc/new/builds.txt if [ $? -eq 0 ] then cp -uf ${GALAXY}/static/ucsc/new/builds.txt ${GALAXY}/static/ucsc/builds.txt @@ -27,7 +27,7 @@ fi # Try to build ucsc_build_sites.txt echo "Updating ucsc_build_sites.txt" -python2.4 ${GALAXY}/cron/parse_builds_3_sites.py > ${GALAXY}/static/ucsc/new/ucsc_build_sites.txt +python ${GALAXY}/cron/parse_builds_3_sites.py > ${GALAXY}/static/ucsc/new/ucsc_build_sites.txt if [ $? -eq 0 ] then cp -uf ${GALAXY}/static/ucsc/new/ucsc_build_sites.txt ${GALAXY}/static/ucsc/ucsc_build_sites.txt @@ -37,7 +37,7 @@ fi # Try to build chromInfo tables echo "Building chromInfo tables." -python2.4 ${GALAXY}/cron/build_chrom_db.py ${GALAXY}/static/ucsc/chrom/new/ ${GALAXY}/static/ucsc/builds.txt +python ${GALAXY}/cron/build_chrom_db.py ${GALAXY}/static/ucsc/chrom/new/ ${GALAXY}/static/ucsc/builds.txt if [ $? -eq 0 ] then cp -uf ${GALAXY}/static/ucsc/chrom/new/*.len ${GALAXY}/static/ucsc/chrom/ @@ -51,7 +51,7 @@ echo "Update complete." #Perform Manual Additions here echo "Adding Manual Builds." -python2.4 ${GALAXY}/cron/add_manual_builds.py ${GALAXY}/static/ucsc/manual_builds.txt ${GALAXY}/static/ucsc/builds.txt ${GALAXY}/static/ucsc/chrom/ +python ${GALAXY}/cron/add_manual_builds.py ${GALAXY}/static/ucsc/manual_builds.txt ${GALAXY}/static/ucsc/builds.txt ${GALAXY}/static/ucsc/chrom/ if [ $? -eq 0 ] then echo "Manual addition was successful." diff --git a/delete_userless_histories_main.sh b/delete_userless_histories_main.sh index 621d3c078ba..fe1600ef54f 100644 --- a/delete_userless_histories_main.sh +++ b/delete_userless_histories_main.sh @@ -1,5 +1,6 @@ #!/bin/sh -source ./setup_paths.sh +. ./scripts/get_python.sh +. ./setup_paths.sh -python2.4 ./scripts/cleanup_datasets.py ./universe_wsgi.ini -d 60 -2 $@ >> ./delete_userless_histories.log +$GALAXY_PYTHON ./scripts/cleanup_datasets.py ./universe_wsgi.ini -d 60 -2 $@ >> ./delete_userless_histories.log diff --git a/lib/galaxy/datatypes/converters/bed_to_gff_converter.py b/lib/galaxy/datatypes/converters/bed_to_gff_converter.py index f49151ad95d..34ba2dcf326 100644 --- a/lib/galaxy/datatypes/converters/bed_to_gff_converter.py +++ b/lib/galaxy/datatypes/converters/bed_to_gff_converter.py @@ -1,7 +1,9 @@ -#!/usr/bin/env python2.4 +#!/usr/bin/env python # This code exists in 2 places: ~/datatypes/converters and ~/tools/filters import sys +assert sys.version_info[:2] >= ( 2, 4 ) + def __main__(): input_name = sys.argv[1] output_name = sys.argv[2] diff --git a/lib/galaxy/datatypes/converters/bed_to_gff_converter.py.old b/lib/galaxy/datatypes/converters/bed_to_gff_converter.py.old deleted file mode 100644 index 55aae6bc7c0..00000000000 --- a/lib/galaxy/datatypes/converters/bed_to_gff_converter.py.old +++ /dev/null @@ -1,46 +0,0 @@ -#!/usr/bin/env python2.4 -# This code exists in 2 places: ~/datatypes/converters and ~/tools/filters -import sys - -def __main__(): - input_name = sys.argv[1] - output_name = sys.argv[2] - skipped_lines = 0 - first_skipped_line = 0 - out = open( output_name, 'w' ) - out.write( "## gff-version 2\n" ) - out.write( "## bed_to_gff_converter.py\n\n" ) - for i, line in enumerate( file( input_name ) ): - line = line.rstrip( '\r\n' ) - if line and not line.startswith( '#' ) and not line.startswith( 'track' ) and not line.startswith( 'browser' ): - try: - elems = line.split( '\t' ) - start = str( int( elems[1] ) + 1 ) - try: - feature = elems[3] - except: - feature = 'feature_%d' % ( i + 1 ) - try: - score = elems[4] - except: - score = '0' - # Wouldn't it be better to use the score if it exists rather then hard-coding the '.'? - # The same goes for strand, rather than hard-coding the '+'. - # I also wonder why each line ends in a semi-colon. - # I'm keeping thigs as they were in the original perl code in order to not break workflow. - out.write( '%s\tbed2gff\t%s\t%s\t%s\t.\t+\t.\tscore "%s";\n' % ( elems[0], feature, start, elems[2], score ) ) - except: - skipped_lines += 1 - if not first_skipped_line: - first_skipped_line = i + 1 - else: - skipped_lines += 1 - if not first_skipped_line: - first_skipped_line = i + 1 - out.close() - info_msg = "%i lines converted to GFF version 2. " % ( i + 1 - skipped_lines ) - if skipped_lines > 0: - info_msg += "Skipped %d blank/comment/invalid lines starting with line #%d." %( skipped_lines, first_skipped_line ) - print info_msg - -if __name__ == "__main__": __main__() diff --git a/lib/galaxy/datatypes/converters/bed_to_gff_converter.xml b/lib/galaxy/datatypes/converters/bed_to_gff_converter.xml index 7f83c626f7b..548acbd8ec9 100644 --- a/lib/galaxy/datatypes/converters/bed_to_gff_converter.xml +++ b/lib/galaxy/datatypes/converters/bed_to_gff_converter.xml @@ -1,7 +1,7 @@ - bed_to_gff_converter.py $input1 $output1 + bed_to_gff_converter.py $input1 $output1 diff --git a/lib/galaxy/datatypes/converters/bed_to_gff_converter.xml.old b/lib/galaxy/datatypes/converters/bed_to_gff_converter.xml.old deleted file mode 100644 index b29a2cd2c67..00000000000 --- a/lib/galaxy/datatypes/converters/bed_to_gff_converter.xml.old +++ /dev/null @@ -1,13 +0,0 @@ - - - - bed_to_gff_converter.py $input1 $output1 - - - - - - - - - diff --git a/lib/galaxy/datatypes/converters/gff_to_bed_converter.py b/lib/galaxy/datatypes/converters/gff_to_bed_converter.py index 51b6fc1ad87..3851d417845 100644 --- a/lib/galaxy/datatypes/converters/gff_to_bed_converter.py +++ b/lib/galaxy/datatypes/converters/gff_to_bed_converter.py @@ -1,6 +1,8 @@ -#!/usr/bin/env python2.4 +#!/usr/bin/env python import sys +assert sys.version_info[:2] >= ( 2, 4 ) + def __main__(): input_name = sys.argv[1] output_name = sys.argv[2] diff --git a/lib/galaxy/datatypes/converters/gff_to_bed_converter.xml b/lib/galaxy/datatypes/converters/gff_to_bed_converter.xml index bb2ea2cb8d3..5047dd0a24c 100644 --- a/lib/galaxy/datatypes/converters/gff_to_bed_converter.xml +++ b/lib/galaxy/datatypes/converters/gff_to_bed_converter.xml @@ -1,7 +1,7 @@ - gff_to_bed_converter.py $input1 $output1 + gff_to_bed_converter.py $input1 $output1 diff --git a/lib/galaxy/datatypes/converters/interval_to_bed_converter.py b/lib/galaxy/datatypes/converters/interval_to_bed_converter.py index 6c9c0fc6a95..921083d1043 100644 --- a/lib/galaxy/datatypes/converters/interval_to_bed_converter.py +++ b/lib/galaxy/datatypes/converters/interval_to_bed_converter.py @@ -1,10 +1,12 @@ -#!/usr/bin/env python2.4 +#!/usr/bin/env python #Dan Blankenberg import sys import pkg_resources; pkg_resources.require( "bx-python" ) import bx.intervals.io +assert sys.version_info[:2] >= ( 2, 4 ) + def stop_err( msg ): sys.stderr.write( msg ) sys.exit() diff --git a/lib/galaxy/datatypes/converters/interval_to_bed_converter.xml b/lib/galaxy/datatypes/converters/interval_to_bed_converter.xml index 4b524ec8b2e..ad260856554 100644 --- a/lib/galaxy/datatypes/converters/interval_to_bed_converter.xml +++ b/lib/galaxy/datatypes/converters/interval_to_bed_converter.xml @@ -1,7 +1,7 @@ - interval_to_bed_converter.py $output1 $input1 $input1_chromCol $input1_startCol $input1_endCol $input1_strandCol + interval_to_bed_converter.py $output1 $input1 $input1_chromCol $input1_startCol $input1_endCol $input1_strandCol diff --git a/lib/galaxy/datatypes/converters/maf_to_fasta_converter.py b/lib/galaxy/datatypes/converters/maf_to_fasta_converter.py index 3938ab8b0c4..839cfe0386c 100644 --- a/lib/galaxy/datatypes/converters/maf_to_fasta_converter.py +++ b/lib/galaxy/datatypes/converters/maf_to_fasta_converter.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python2.4 +#!/usr/bin/env python #Dan Blankenberg import sys @@ -6,6 +6,8 @@ import pkg_resources; pkg_resources.require( "bx-python" ) import bx.align.maf from galaxy.tools.util import maf_utilities +assert sys.version_info[:2] >= ( 2, 4 ) + def __main__(): output_name = sys.argv.pop(1) input_name = sys.argv.pop(1) diff --git a/lib/galaxy/datatypes/converters/maf_to_fasta_converter.xml b/lib/galaxy/datatypes/converters/maf_to_fasta_converter.xml index 44859fdff5f..d4798724d90 100644 --- a/lib/galaxy/datatypes/converters/maf_to_fasta_converter.xml +++ b/lib/galaxy/datatypes/converters/maf_to_fasta_converter.xml @@ -1,6 +1,6 @@ - maf_to_fasta_converter.py $output1 $input1 + maf_to_fasta_converter.py $output1 $input1 diff --git a/lib/galaxy/datatypes/converters/maf_to_interval_converter.py b/lib/galaxy/datatypes/converters/maf_to_interval_converter.py index dd507b11185..fcf0dadb2a0 100644 --- a/lib/galaxy/datatypes/converters/maf_to_interval_converter.py +++ b/lib/galaxy/datatypes/converters/maf_to_interval_converter.py @@ -1,10 +1,12 @@ -#!/usr/bin/env python2.4 +#!/usr/bin/env python #Dan Blankenberg import sys import pkg_resources; pkg_resources.require( "bx-python" ) import bx.align.maf +assert sys.version_info[:2] >= ( 2, 4 ) + def __main__(): output_name = sys.argv.pop(1) input_name = sys.argv.pop(1) diff --git a/lib/galaxy/datatypes/converters/maf_to_interval_converter.xml b/lib/galaxy/datatypes/converters/maf_to_interval_converter.xml index dcc50d2895d..43c9d3d7d27 100644 --- a/lib/galaxy/datatypes/converters/maf_to_interval_converter.xml +++ b/lib/galaxy/datatypes/converters/maf_to_interval_converter.xml @@ -1,6 +1,6 @@ - maf_to_interval_converter.py $output1 $input1 $input1_dbkey + maf_to_interval_converter.py $output1 $input1 $input1_dbkey diff --git a/lib/galaxy/tools/util/maf_utilities.py b/lib/galaxy/tools/util/maf_utilities.py index 1dec1844761..ccbc58a7a8e 100644 --- a/lib/galaxy/tools/util/maf_utilities.py +++ b/lib/galaxy/tools/util/maf_utilities.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python2.4 +#!/usr/bin/env python """ Provides wrappers and utilities for working with MAF files and alignments. """ @@ -9,6 +9,8 @@ import bx.intervals import bx.interval_index_file import sys, os, string, tempfile +assert sys.version_info[:2] >= ( 2, 4 ) + #an object corresponding to a reference layered alignment class RegionAlignment( object ): diff --git a/lib/galaxy/webapps/reports/static/january_2008_style/gradient.py b/lib/galaxy/webapps/reports/static/january_2008_style/gradient.py index 7e8403b1b30..3a857c189e9 100755 --- a/lib/galaxy/webapps/reports/static/january_2008_style/gradient.py +++ b/lib/galaxy/webapps/reports/static/january_2008_style/gradient.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python2.4 +#!/usr/bin/env python """ usage: %prog width height bg_color hatch_color [color alpha stop_pos] + @@ -9,6 +9,8 @@ from __future__ import division import sys import cairo +assert sys.version_info[:2] >= ( 2, 4 ) + def parse_css_color( color ): if color.startswith( '#' ): color = color[1:] diff --git a/lib/galaxy/webapps/reports/static/january_2008_style/make_style.py b/lib/galaxy/webapps/reports/static/january_2008_style/make_style.py index 0a764900162..6ceb32d368c 100755 --- a/lib/galaxy/webapps/reports/static/january_2008_style/make_style.py +++ b/lib/galaxy/webapps/reports/static/january_2008_style/make_style.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python2.4 +#!/usr/bin/env python import pkg_resources; pkg_resources.require( "Cheetah" ) @@ -9,6 +9,8 @@ import string from subprocess import Popen, PIPE import os.path +assert sys.version_info[:2] >= ( 2, 4 ) + def run( cmd ): return Popen( cmd, stdout=PIPE).communicate()[0] diff --git a/purge_datasets_main.sh b/purge_datasets_main.sh index 41a7d0720bb..0bd49f9a746 100644 --- a/purge_datasets_main.sh +++ b/purge_datasets_main.sh @@ -1,5 +1,6 @@ #!/bin/sh -source ./setup_paths.sh +. ./scripts/get_python.sh +. ./setup_paths.sh -python2.4 ./scripts/cleanup_datasets.py ./universe_wsgi.ini -d 60 -6 -r $@ >> ./purge_datasets.log +$GALAXY_PYTHON ./scripts/cleanup_datasets.py ./universe_wsgi.ini -d 60 -6 -r $@ >> ./purge_datasets.log diff --git a/purge_histories_main.sh b/purge_histories_main.sh index 5806a135189..343b1675b65 100644 --- a/purge_histories_main.sh +++ b/purge_histories_main.sh @@ -1,5 +1,6 @@ #!/bin/sh -source ./setup_paths.sh +. ./scripts/get_python.sh +. ./setup_paths.sh -python2.4 ./scripts/cleanup_datasets.py ./universe_wsgi.ini -d 60 -4 -r $@ >> ./purge_histories.log +$GALAXY_PYTHON ./scripts/cleanup_datasets.py ./universe_wsgi.ini -d 60 -4 -r $@ >> ./purge_histories.log diff --git a/run_reports.sh b/run_reports.sh index fa109d35a10..2c25222026e 100644 --- a/run_reports.sh +++ b/run_reports.sh @@ -1,5 +1,6 @@ #!/bin/sh -source setup_paths.sh +. ./scripts/get_python.sh +. ./setup_paths.sh -python2.4 ./scripts/paster.py serve reports_wsgi.ini --pid-file=reports_webapp.pid --log-file=reports_webapp.log $@ +$GALAXY_PYTHON ./scripts/paster.py serve reports_wsgi.ini --pid-file=reports_webapp.pid --log-file=reports_webapp.log $@ diff --git a/scripts/cleanup_datasets.py b/scripts/cleanup_datasets.py index 24992f38708..8781fbab91a 100644 --- a/scripts/cleanup_datasets.py +++ b/scripts/cleanup_datasets.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python2.4 +#!/usr/bin/env python import sys, os, time, ConfigParser from datetime import datetime, timedelta @@ -9,6 +9,8 @@ import pkg_resources pkg_resources.require( "sqlalchemy>=0.3" ) from sqlalchemy import eagerload +assert sys.version_info[:2] >= ( 2, 4 ) + def main(): parser = OptionParser() parser.add_option( "-d", "--days", dest="days", action="store", type="int", help="number of days (60)", default=60 ) diff --git a/scripts/get_platforms.py b/scripts/get_platforms.py index 8cae5846ef8..be75ca87698 100755 --- a/scripts/get_platforms.py +++ b/scripts/get_platforms.py @@ -1,4 +1,8 @@ -#!/usr/bin/env python2.4 +#!/usr/bin/env python + +import sys + +assert sys.version_info[:2] >= ( 2, 4 ) from eggs import get_full_platform, get_noplatform print get_noplatform() diff --git a/scripts/microbes/README.txt b/scripts/microbes/README.txt index ae8de163d61..7904f20d09d 100644 --- a/scripts/microbes/README.txt +++ b/scripts/microbes/README.txt @@ -6,19 +6,19 @@ Step 3 requires a binary 'faToNib' to properly generate sequence files. Steps should be performed in the order they appear here. (1.) To Download and process Genome Projects from NCBI into a form usable by Galaxy: - python2.4 /GALAXY_ROOT/scripts/microbes/harvest_bacteria.py /OUTPUT/DIRECTORY/microbes/ > /OUTPUT/DIRECTORY/harvest.txt + python /GALAXY_ROOT/scripts/microbes/harvest_bacteria.py /OUTPUT/DIRECTORY/microbes/ > /OUTPUT/DIRECTORY/harvest.txt (2.) To Walk downloaded Genome Projects and Convert, in place, IDs to match the UCSC Archaea browser, where applicable: - python2.4 /GALAXY_ROOT/scripts/microbes/ncbi_to_ucsc.py /OUTPUT/DIRECTORY/microbes/ > /OUTPUT/DIRECTORY/ncbi_to_ucsc.txt + python /GALAXY_ROOT/scripts/microbes/ncbi_to_ucsc.py /OUTPUT/DIRECTORY/microbes/ > /OUTPUT/DIRECTORY/ncbi_to_ucsc.txt (3.) To create nib files (for extraction) and to generate the location file content for Microbes used for extracting Genomic DNA: - python2.4 /GALAXY_ROOT/scripts/microbes/create_nib_seq_loc_file.py /OUTPUT/DIRECTORY/microbes/ seq.loc > /OUTPUT/DIRECTORY/sequence.txt + python /GALAXY_ROOT/scripts/microbes/create_nib_seq_loc_file.py /OUTPUT/DIRECTORY/microbes/ seq.loc > /OUTPUT/DIRECTORY/sequence.txt (4.) To create the location file for the Microbial Data Resource tool in Galaxy: - python2.4 /GALAXY_ROOT/scripts/microbes/create_bacteria_loc_file.py /OUTPUT/DIRECTORY/microbes/ > /OUTPUT/DIRECTORY/microbial_data.loc + python /GALAXY_ROOT/scripts/microbes/create_bacteria_loc_file.py /OUTPUT/DIRECTORY/microbes/ > /OUTPUT/DIRECTORY/microbial_data.loc (5.) To Generate a single file containing the lengths for each chromosome for each species, to be added to 'manual_builds.txt': - python2.4 /GALAXY_ROOT/scripts/microbes/get_builds_lengths.py /OUTPUT/DIRECTORY/microbes/ > /OUTPUT/DIRECTORY/microbes.len + python /GALAXY_ROOT/scripts/microbes/get_builds_lengths.py /OUTPUT/DIRECTORY/microbes/ > /OUTPUT/DIRECTORY/microbes.len (6.) To Create the Wiki Table listing available Microbial Data in Galaxy: - python2.4 /GALAXY_ROOT/scripts/microbes/create_bacteria_table.py /OUTPUT/DIRECTORY/microbes/ > /OUTPUT/DIRECTORY/microbes.table \ No newline at end of file + python /GALAXY_ROOT/scripts/microbes/create_bacteria_table.py /OUTPUT/DIRECTORY/microbes/ > /OUTPUT/DIRECTORY/microbes.table \ No newline at end of file diff --git a/scripts/microbes/create_bacteria_loc_file.py b/scripts/microbes/create_bacteria_loc_file.py index dac404703ab..9ba28b5f5d0 100644 --- a/scripts/microbes/create_bacteria_loc_file.py +++ b/scripts/microbes/create_bacteria_loc_file.py @@ -1,8 +1,10 @@ -#!/usr/bin/env python2.4 +#!/usr/bin/env python #Dan Blankenberg import sys, os +assert sys.version_info[:2] >= ( 2, 4 ) + def __main__(): base_dir = os.path.join( os.getcwd(), "bacteria" ) try: diff --git a/scripts/microbes/create_bacteria_table.py b/scripts/microbes/create_bacteria_table.py index 57fc702ba57..3324e39c064 100644 --- a/scripts/microbes/create_bacteria_table.py +++ b/scripts/microbes/create_bacteria_table.py @@ -1,8 +1,10 @@ -#!/usr/bin/env python2.4 +#!/usr/bin/env python #Dan Blankenberg import sys, os +assert sys.version_info[:2] >= ( 2, 4 ) + def __main__(): base_dir = os.path.join( os.getcwd(), "bacteria" ) try: diff --git a/scripts/microbes/create_nib_seq_loc_file.py b/scripts/microbes/create_nib_seq_loc_file.py index 3f7b2649f90..06408cb028a 100644 --- a/scripts/microbes/create_nib_seq_loc_file.py +++ b/scripts/microbes/create_nib_seq_loc_file.py @@ -1,8 +1,10 @@ -#!/usr/bin/env python2.4 +#!/usr/bin/env python #Dan Blankenberg import sys, os +assert sys.version_info[:2] >= ( 2, 4 ) + def __main__(): base_dir = os.path.join( os.getcwd(), "bacteria" ) try: diff --git a/scripts/microbes/get_builds_lengths.py b/scripts/microbes/get_builds_lengths.py index 7d69c8e6211..3c473cb7393 100644 --- a/scripts/microbes/get_builds_lengths.py +++ b/scripts/microbes/get_builds_lengths.py @@ -1,8 +1,10 @@ -#!/usr/bin/env python2.4 +#!/usr/bin/env python #Dan Blankenberg import sys, os +assert sys.version_info[:2] >= ( 2, 4 ) + def __main__(): base_dir = os.path.join( os.getcwd(), "bacteria" ) try: diff --git a/scripts/microbes/harvest_bacteria.py b/scripts/microbes/harvest_bacteria.py index 91fbbec375c..4e420ad305c 100644 --- a/scripts/microbes/harvest_bacteria.py +++ b/scripts/microbes/harvest_bacteria.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python2.4 +#!/usr/bin/env python #Dan Blankenberg #Harvest Bacteria @@ -12,6 +12,8 @@ from ftplib import FTP from BeautifulSoup import BeautifulSoup from util import get_bed_from_genbank, get_bed_from_glimmer3, get_bed_from_GeneMarkHMM, get_bed_from_GeneMark +assert sys.version_info[:2] >= ( 2, 4 ) + #this defines the types of ftp files we are interested in, and how to process/convert them to a form for our use desired_ftp_files = {'GeneMark':{'ext':'GeneMark-2.5f','parser':'process_GeneMark'}, 'GeneMarkHMM':{'ext':'GeneMarkHMM-2.6m','parser':'process_GeneMarkHMM'}, diff --git a/scripts/microbes/util.py b/scripts/microbes/util.py index 91756782a64..a16a5795d25 100644 --- a/scripts/microbes/util.py +++ b/scripts/microbes/util.py @@ -1,8 +1,10 @@ -#!/usr/bin/env python2.4 +#!/usr/bin/env python #Dan Blankenberg import sys +assert sys.version_info[:2] >= ( 2, 4 ) + #genbank_to_bed class Region: def __init__( self ): diff --git a/scripts/nosetests.py b/scripts/nosetests.py index 073a93356d3..803efcfba69 100755 --- a/scripts/nosetests.py +++ b/scripts/nosetests.py @@ -1,9 +1,11 @@ -#!/usr/bin/env python2.4 +#!/usr/bin/env python # EASY-INSTALL-ENTRY-SCRIPT: 'nose','console_scripts','nosetests' __requires__ = 'nose' import sys from pkg_resources import load_entry_point +assert sys.version_info[:2] >= ( 2, 4 ) + sys.exit( load_entry_point('nose', 'console_scripts', 'nosetests')() ) diff --git a/scripts/paster.py b/scripts/paster.py index e96d6bb57eb..aa90261ffda 100755 --- a/scripts/paster.py +++ b/scripts/paster.py @@ -1,4 +1,8 @@ -#!/usr/bin/env python2.4 +#!/usr/bin/env python + +import sys + +assert sys.version_info[:2] >= ( 2, 4 ) import pkg_resources; pkg_resources.require( "PasteScript" ) diff --git a/scripts/remove_renamed_datasets_from_disk.py b/scripts/remove_renamed_datasets_from_disk.py index 3d08c148dc8..315b3467ca0 100644 --- a/scripts/remove_renamed_datasets_from_disk.py +++ b/scripts/remove_renamed_datasets_from_disk.py @@ -1,11 +1,13 @@ -#!/usr/bin/env python2.4 +#!/usr/bin/env python """ Removes a dataset file ( which was first renamed by appending _purged to the file name ) from disk. -Usage: python2.4 remove_renamed_datasets_from_disk.py renamed.log +Usage: python remove_renamed_datasets_from_disk.py renamed.log """ import sys, os +assert sys.version_info[:2] >= ( 2, 4 ) + def main(): infile = sys.argv[1] outfile = infile + ".removed.log" diff --git a/scripts/rename_purged_datasets.py b/scripts/rename_purged_datasets.py index f6e1563d955..60b42b16383 100644 --- a/scripts/rename_purged_datasets.py +++ b/scripts/rename_purged_datasets.py @@ -1,11 +1,13 @@ -#!/usr/bin/env python2.4 +#!/usr/bin/env python """ Renames a dataset file by appending _purged to the file name so that it can later be removed from disk. -Usage: python2.4 rename_purged_datasets.py purge.log +Usage: python rename_purged_datasets.py purge.log """ import sys, os +assert sys.version_info[:2] >= ( 2, 4 ) + def main(): infile = sys.argv[1] outfile = infile + ".renamed.log" diff --git a/scripts/update_dataset_size.py b/scripts/update_dataset_size.py index 6a6bd0f7a2e..6e384f743cf 100644 --- a/scripts/update_dataset_size.py +++ b/scripts/update_dataset_size.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python2.4 +#!/usr/bin/env python """ Updates dataset.size column. Remember to backup your database before running. @@ -7,6 +7,7 @@ Remember to backup your database before running. import sys, os, ConfigParser import galaxy.app +assert sys.version_info[:2] >= ( 2, 4 ) def main(): ini_file = sys.argv.pop(1) diff --git a/scripts/update_metadata.py b/scripts/update_metadata.py index 71d70988f85..59e054cdcd8 100644 --- a/scripts/update_metadata.py +++ b/scripts/update_metadata.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python2.4 +#!/usr/bin/env python #Dan Blankenberg """ Updates metadata in the database to match rev 1891. @@ -11,6 +11,7 @@ import galaxy.app from galaxy.util.bunch import Bunch import galaxy.datatypes.tabular +assert sys.version_info[:2] >= ( 2, 4 ) def main(): ini_file = sys.argv.pop(1) diff --git a/static/june_2007_style/callout_top.py b/static/june_2007_style/callout_top.py index 0e6847fb33e..00f0e1c25f2 100755 --- a/static/june_2007_style/callout_top.py +++ b/static/june_2007_style/callout_top.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python2.4 +#!/usr/bin/env python """ usage: %prog width height bg_color hatch_color [color alpha stop_pos] + @@ -9,6 +9,8 @@ from __future__ import division import sys import cairo +assert sys.version_info[:2] >= ( 2, 4 ) + def parse_css_color( color ): if color.startswith( '#' ): color = color[1:] diff --git a/static/june_2007_style/circle.py b/static/june_2007_style/circle.py index 56956b2a525..92a9cb82d8f 100755 --- a/static/june_2007_style/circle.py +++ b/static/june_2007_style/circle.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python2.4 +#!/usr/bin/env python """ usage: %prog width height bg_color hatch_color [color alpha stop_pos] + @@ -10,6 +10,8 @@ import sys import cairo from math import pi +assert sys.version_info[:2] >= ( 2, 4 ) + def parse_css_color( color ): if color.startswith( '#' ): color = color[1:] diff --git a/static/june_2007_style/gradient.py b/static/june_2007_style/gradient.py index 7e8403b1b30..3a857c189e9 100755 --- a/static/june_2007_style/gradient.py +++ b/static/june_2007_style/gradient.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python2.4 +#!/usr/bin/env python """ usage: %prog width height bg_color hatch_color [color alpha stop_pos] + @@ -9,6 +9,8 @@ from __future__ import division import sys import cairo +assert sys.version_info[:2] >= ( 2, 4 ) + def parse_css_color( color ): if color.startswith( '#' ): color = color[1:] diff --git a/static/june_2007_style/make_style.py b/static/june_2007_style/make_style.py index 911904fa26d..7c712699a60 100755 --- a/static/june_2007_style/make_style.py +++ b/static/june_2007_style/make_style.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python2.4 +#!/usr/bin/env python import sys from Cheetah.Template import Template @@ -6,6 +6,8 @@ import string from subprocess import Popen, PIPE import os.path +assert sys.version_info[:2] >= ( 2, 4 ) + def run( cmd ): return Popen( cmd, stdout=PIPE).communicate()[0] diff --git a/static/june_2007_style/png_over_color.py b/static/june_2007_style/png_over_color.py index b1a72c57cd0..448d6254cf5 100755 --- a/static/june_2007_style/png_over_color.py +++ b/static/june_2007_style/png_over_color.py @@ -1,9 +1,11 @@ -#!/usr/bin/env python2.4 +#!/usr/bin/env python import sys import Image import ImageColor +assert sys.version_info[:2] >= ( 2, 4 ) + over = Image.open( sys.argv[1] ) color = ImageColor.getrgb( sys.argv[2] ) diff --git a/static/june_2007_style/workflow_arrow.py b/static/june_2007_style/workflow_arrow.py index deeb98f66ba..9f066feded4 100755 --- a/static/june_2007_style/workflow_arrow.py +++ b/static/june_2007_style/workflow_arrow.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python2.4 +#!/usr/bin/env python """ usage: %prog width height bg_color hatch_color [color alpha stop_pos] + @@ -9,6 +9,8 @@ from __future__ import division import sys import cairo +assert sys.version_info[:2] >= ( 2, 4 ) + def parse_css_color( color ): if color.startswith( '#' ): color = color[1:] diff --git a/static/light_hatched_style/gradient.py b/static/light_hatched_style/gradient.py index 7e8403b1b30..3a857c189e9 100755 --- a/static/light_hatched_style/gradient.py +++ b/static/light_hatched_style/gradient.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python2.4 +#!/usr/bin/env python """ usage: %prog width height bg_color hatch_color [color alpha stop_pos] + @@ -9,6 +9,8 @@ from __future__ import division import sys import cairo +assert sys.version_info[:2] >= ( 2, 4 ) + def parse_css_color( color ): if color.startswith( '#' ): color = color[1:] diff --git a/static/light_hatched_style/make_style.py b/static/light_hatched_style/make_style.py index 23eacf0383d..cf968baf303 100755 --- a/static/light_hatched_style/make_style.py +++ b/static/light_hatched_style/make_style.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python2.4 +#!/usr/bin/env python import sys from Cheetah.Template import Template @@ -6,6 +6,8 @@ import string from subprocess import Popen, PIPE import os.path +assert sys.version_info[:2] >= ( 2, 4 ) + def run( cmd ): return Popen( cmd, stdout=PIPE).communicate()[0] diff --git a/static/light_hatched_style/png_over_color.py b/static/light_hatched_style/png_over_color.py index b1a72c57cd0..448d6254cf5 100755 --- a/static/light_hatched_style/png_over_color.py +++ b/static/light_hatched_style/png_over_color.py @@ -1,9 +1,11 @@ -#!/usr/bin/env python2.4 +#!/usr/bin/env python import sys import Image import ImageColor +assert sys.version_info[:2] >= ( 2, 4 ) + over = Image.open( sys.argv[1] ) color = ImageColor.getrgb( sys.argv[2] ) diff --git a/tools/data_source/echo.py b/tools/data_source/echo.py index c8803ac31ca..761a47303c7 100644 --- a/tools/data_source/echo.py +++ b/tools/data_source/echo.py @@ -1,10 +1,13 @@ -#!/usr/bin/env python2.4 +#!/usr/bin/env python """ Script that just echos the command line. """ import sys + +assert sys.version_info[:2] >= ( 2, 4 ) + print '-' * 20, "
" for elem in sys.argv: print elem, "
" diff --git a/tools/data_source/encode_import.py b/tools/data_source/encode_import.py index 1fbeb46e2d0..87e07b89fad 100755 --- a/tools/data_source/encode_import.py +++ b/tools/data_source/encode_import.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python2.4 +#!/usr/bin/env python """ Script that imports locally stored data as a new dataset for the user @@ -6,7 +6,9 @@ Usage: import id outputfile """ import sys, os from shutil import copyfile -#tempfile, shutil + +assert sys.version_info[:2] >= ( 2, 4 ) + BUFFER = 1048576 def stop_err( msg ): diff --git a/tools/data_source/fetch.py b/tools/data_source/fetch.py index a8cba7d4b1e..3a115dd9eb9 100644 --- a/tools/data_source/fetch.py +++ b/tools/data_source/fetch.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python2.4 +#!/usr/bin/env python """ Script that just echos the command line. @@ -6,6 +6,8 @@ Script that just echos the command line. import sys, os, urllib +assert sys.version_info[:2] >= ( 2, 4 ) + BUFFER = 1048576 url = sys.argv[1] diff --git a/tools/data_source/genbank.py b/tools/data_source/genbank.py index 2dcd1177468..5b39bd270d9 100644 --- a/tools/data_source/genbank.py +++ b/tools/data_source/genbank.py @@ -1,7 +1,9 @@ -#!/usr/bin/env python2.4 +#!/usr/bin/env python from Bio import GenBank import sys, os, sets, textwrap +assert sys.version_info[:2] >= ( 2, 4 ) + def make_fasta(rec): '''Creates fasta format from a record''' gi = rec.annotations.get('gi','') diff --git a/tools/data_source/import.py b/tools/data_source/import.py index 02aacf6947f..bbc75e39b48 100644 --- a/tools/data_source/import.py +++ b/tools/data_source/import.py @@ -1,10 +1,13 @@ -#!/usr/bin/env python2.4 +#!/usr/bin/env python """ Script that imports locally stored data as a new dataset for the user Usage: import id outputfile """ import sys, os + +assert sys.version_info[:2] >= ( 2, 4 ) + BUFFER = 1048576 dataid = sys.argv[1] diff --git a/tools/data_source/microbial_import.py b/tools/data_source/microbial_import.py index faddf729c79..a0b86f2f95e 100644 --- a/tools/data_source/microbial_import.py +++ b/tools/data_source/microbial_import.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python2.4 +#!/usr/bin/env python """ Script that imports locally stored data as a new dataset for the user @@ -6,7 +6,9 @@ Usage: import id outputfile """ import sys, os from shutil import copyfile -#tempfile, shutil + +assert sys.version_info[:2] >= ( 2, 4 ) + BUFFER = 1048576 uids = sys.argv[1].split(",") diff --git a/tools/data_source/ucsc_proxy.py b/tools/data_source/ucsc_proxy.py index 31ef1be1d72..6105453d805 100644 --- a/tools/data_source/ucsc_proxy.py +++ b/tools/data_source/ucsc_proxy.py @@ -1,7 +1,9 @@ -#!/usr/bin/env python2.4 +#!/usr/bin/env python import urllib import sys, os, sets +assert sys.version_info[:2] >= ( 2, 4 ) + CHUNK = 2**20 # 1Mb MAXSIZE = CHUNK * 100 if __name__ == '__main__': diff --git a/tools/data_source/ucsc_tablebrowser.py b/tools/data_source/ucsc_tablebrowser.py index 1011d89fb41..8048546c966 100644 --- a/tools/data_source/ucsc_tablebrowser.py +++ b/tools/data_source/ucsc_tablebrowser.py @@ -1,8 +1,10 @@ -#!/usr/bin/env python2.4 +#!/usr/bin/env python #Retreives data from UCSC and stores in a file. UCSC parameters are provided in the input/output file. import urllib, sys, os, gzip, tempfile, shutil from galaxy.datatypes import data +assert sys.version_info[:2] >= ( 2, 4 ) + def stop_err( msg ): sys.stderr.write( msg ) sys.exit() diff --git a/tools/data_source/ucsc_tablebrowser.xml b/tools/data_source/ucsc_tablebrowser.xml index 438d1435fea..76c081c04f1 100644 --- a/tools/data_source/ucsc_tablebrowser.xml +++ b/tools/data_source/ucsc_tablebrowser.xml @@ -3,7 +3,7 @@ table browser - ucsc_tablebrowser.py $output + ucsc_tablebrowser.py $output go to UCSC Table Browser $GALAXY_URL diff --git a/tools/data_source/ucsc_tablebrowser_archaea.xml b/tools/data_source/ucsc_tablebrowser_archaea.xml index 40c10930655..f2bd657d6e6 100644 --- a/tools/data_source/ucsc_tablebrowser_archaea.xml +++ b/tools/data_source/ucsc_tablebrowser_archaea.xml @@ -3,7 +3,7 @@ table browser - ucsc_tablebrowser.py $output + ucsc_tablebrowser.py $output go to UCSC Table Browser $GALAXY_URL diff --git a/tools/data_source/ucsc_tablebrowser_test.xml b/tools/data_source/ucsc_tablebrowser_test.xml index d85a282239d..4413f1d6f63 100644 --- a/tools/data_source/ucsc_tablebrowser_test.xml +++ b/tools/data_source/ucsc_tablebrowser_test.xml @@ -3,7 +3,7 @@ table browser - ucsc_tablebrowser.py $output + ucsc_tablebrowser.py $output go to UCSC Table Browser $GALAXY_URL diff --git a/tools/encode/gencode_partition.xml b/tools/encode/gencode_partition.xml index 1cb80528d7a..a85282f49a3 100755 --- a/tools/encode/gencode_partition.xml +++ b/tools/encode/gencode_partition.xml @@ -1,6 +1,6 @@ an interval file - split_by_partitions.py /home/universe/encode_feature_partitions/partition_list.txt $input1 $out_file1 $input1_chromCol $input1_startCol $input1_endCol $input1_strandCol + split_by_partitions.py /home/universe/encode_feature_partitions/partition_list.txt $input1 $out_file1 $input1_chromCol $input1_startCol $input1_endCol $input1_strandCol diff --git a/tools/encode/random_intervals.xml b/tools/encode/random_intervals.xml index 99d0f81f516..100bf9412aa 100644 --- a/tools/encode/random_intervals.xml +++ b/tools/encode/random_intervals.xml @@ -1,6 +1,6 @@ create a random set of intervals - random_intervals_no_bits.py $regions $input2 $input1 $out_file1 $input2_chromCol $input2_startCol $input2_endCol $input1_chromCol $input1_startCol $input1_endCol $input1_strandCol $use_mask $strand_overlaps ${GALAXY_DATA_INDEX_DIR} + random_intervals_no_bits.py $regions $input2 $input1 $out_file1 $input2_chromCol $input2_startCol $input2_endCol $input1_chromCol $input1_startCol $input1_endCol $input1_strandCol $use_mask $strand_overlaps ${GALAXY_DATA_INDEX_DIR} diff --git a/tools/encode/random_intervals_no_bits.py b/tools/encode/random_intervals_no_bits.py index 4181e67614c..a2b6ea7e698 100644 --- a/tools/encode/random_intervals_no_bits.py +++ b/tools/encode/random_intervals_no_bits.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python2.4 +#!/usr/bin/env python #Dan Blankenberg #%prog bounding_region_file mask_intervals_file intervals_to_mimic_file out_file mask_chr mask_start mask_end interval_chr interval_start interval_end interval_strand use_mask allow_strand_overlaps import sys, random @@ -10,6 +10,8 @@ import bx.intervals.io import bx.intervals.intersection import psyco_full +assert sys.version_info[:2] >= ( 2, 4 ) + max_iters = 5 def stop_err( msg ): diff --git a/tools/encode/split_by_partitions.py b/tools/encode/split_by_partitions.py index f7ad1870d7e..704123c5e0b 100755 --- a/tools/encode/split_by_partitions.py +++ b/tools/encode/split_by_partitions.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python2.4 +#!/usr/bin/env python #Original script from /home/james/work/encode/feature_partitions/split_by_partitions.py #Usage: python(2.4) split_by_partitions.py partition_index in_file out_file chrCol startCol endCol strandCol @@ -10,6 +10,8 @@ import pkg_resources; pkg_resources.require( "bx-python" ) from bx.bitset import * from bx.bitset_builders import * +assert sys.version_info[:2] >= ( 2, 4 ) + def stop_err( msg ): sys.stderr.write( msg ) sys.exit() diff --git a/tools/extract/extract_GFF_Features.py b/tools/extract/extract_GFF_Features.py index 8164db8e01c..a8bd28b8b77 100644 --- a/tools/extract/extract_GFF_Features.py +++ b/tools/extract/extract_GFF_Features.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python2.4 +#!/usr/bin/env python #Guruprasad Ananda """ Extract features from GFF file. @@ -11,6 +11,8 @@ import sys, os import pkg_resources; pkg_resources.require( "bx-python" ) from bx.cookbook import doc_optparse +assert sys.version_info[:2] >= ( 2, 4 ) + def stop_err( msg ): sys.stderr.write( msg ) sys.exit() diff --git a/tools/extract/extract_GFF_Features.xml b/tools/extract/extract_GFF_Features.xml index b1ff7d4a3be..df996d6f6b5 100644 --- a/tools/extract/extract_GFF_Features.xml +++ b/tools/extract/extract_GFF_Features.xml @@ -1,6 +1,6 @@ from GFF file - extract_GFF_Features.py $input1 $out_file1 ${column_choice.col} ${column_choice.feature} + extract_GFF_Features.py $input1 $out_file1 ${column_choice.col} ${column_choice.feature} diff --git a/tools/extract/extract_genomic_dna.py b/tools/extract/extract_genomic_dna.py index b548073bac6..de663fb7d4a 100644 --- a/tools/extract/extract_genomic_dna.py +++ b/tools/extract/extract_genomic_dna.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python2.4 +#!/usr/bin/env python """ usage: extract_genomic_dna.py $input $out_file1 $input_chromCol $input_startCol $input_endCol $input_strandCol $dbkey $out_format GALAXY_DATA_INDEX_DIR by Wen-Yu Chung @@ -10,6 +10,8 @@ from bx.cookbook import doc_optparse import bx.seq.nib import bx.seq.twobit +assert sys.version_info[:2] >= ( 2, 4 ) + def stop_err( msg ): sys.stderr.write( msg ) sys.exit() diff --git a/tools/extract/liftOver_wrapper.py b/tools/extract/liftOver_wrapper.py index 142f56d932f..a9f88d4af05 100644 --- a/tools/extract/liftOver_wrapper.py +++ b/tools/extract/liftOver_wrapper.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python2.4 +#!/usr/bin/env python #Guruprasad Ananda """ Converts coordinates from one build/assembly to another using liftOver binary and mapping files downloaded from UCSC. @@ -6,6 +6,8 @@ Converts coordinates from one build/assembly to another using liftOver binary an import sys, os, string +assert sys.version_info[:2] >= ( 2, 4 ) + def stop_err(msg): sys.stderr.write(msg) sys.exit() diff --git a/tools/extract/phastOdds/get_scores_galaxy.py b/tools/extract/phastOdds/get_scores_galaxy.py index 6bd384ac45a..500836d0f9d 100755 --- a/tools/extract/phastOdds/get_scores_galaxy.py +++ b/tools/extract/phastOdds/get_scores_galaxy.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python2.4 +#!/usr/bin/env python """ usage: %prog data_file.h5 region_mapping.bed in_file out_file chrom_col start_col end_col [options] @@ -17,6 +17,8 @@ from bx.cookbook import doc_optparse from bx import intervals +assert sys.version_info[:2] >= ( 2, 4 ) + def stop_err( msg ): sys.stderr.write(msg) sys.exit() diff --git a/tools/extract/phastOdds/phastOdds_tool.xml b/tools/extract/phastOdds/phastOdds_tool.xml index 25dc09e9cbc..7a95f6c842b 100644 --- a/tools/extract/phastOdds/phastOdds_tool.xml +++ b/tools/extract/phastOdds/phastOdds_tool.xml @@ -1,6 +1,6 @@ for each interval - get_scores_galaxy.py $per_col ${score_file}.h5 ${score_file}.mapping.bed $input $output $input_chromCol $input_startCol $input_endCol + get_scores_galaxy.py $per_col ${score_file}.h5 ${score_file}.mapping.bed $input $output $input_chromCol $input_startCol $input_endCol diff --git a/tools/fasta_tools/tabular_to_fasta.py b/tools/fasta_tools/tabular_to_fasta.py index d1cfe17abad..5a80fec1c85 100644 --- a/tools/fasta_tools/tabular_to_fasta.py +++ b/tools/fasta_tools/tabular_to_fasta.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python2.4 +#!/usr/bin/env python """ Input: fasta, minimal length, maximal length Output: fasta @@ -6,6 +6,8 @@ Return sequences whose lengths are within the range. """ import sys, os +assert sys.version_info[:2] >= ( 2, 4 ) + def stop_err( msg ): sys.stderr.write( msg ) sys.exit() diff --git a/tools/filters/axt_to_concat_fasta.xml b/tools/filters/axt_to_concat_fasta.xml index cb9db77a911..d365cd82339 100644 --- a/tools/filters/axt_to_concat_fasta.xml +++ b/tools/filters/axt_to_concat_fasta.xml @@ -1,6 +1,6 @@ Converts an AXT formated file to a concatenated FASTA alignment - axt_to_concat_fasta.py $dbkey_1 $dbkey_2 < $axt_input > $out_file1 + axt_to_concat_fasta.py $dbkey_1 $dbkey_2 < $axt_input > $out_file1 diff --git a/tools/filters/axt_to_fasta.xml b/tools/filters/axt_to_fasta.xml index 0370cc692c6..0d87062664f 100644 --- a/tools/filters/axt_to_fasta.xml +++ b/tools/filters/axt_to_fasta.xml @@ -1,6 +1,6 @@ Converts an AXT formated file to FASTA format - axt_to_fasta.py $dbkey_1 $dbkey_2 < $axt_input > $out_file1 + axt_to_fasta.py $dbkey_1 $dbkey_2 < $axt_input > $out_file1 diff --git a/tools/filters/axt_to_lav.xml b/tools/filters/axt_to_lav.xml index 04a9fb4181c..950e7d89aad 100644 --- a/tools/filters/axt_to_lav.xml +++ b/tools/filters/axt_to_lav.xml @@ -1,6 +1,6 @@ Converts an AXT formated file to LAV format - axt_to_lav.py ${GALAXY_DATA_INDEX_DIR}/$dbkey_1/seq/%s.nib:$dbkey_1:./static/ucsc/chrom/${dbkey_1}.len ${GALAXY_DATA_INDEX_DIR}/$dbkey_2/seq/%s.nib:$dbkey_2:./static/ucsc/chrom/${dbkey_2}.len $align_input $lav_file $seq_file1 $seq_file2 + axt_to_lav.py ${GALAXY_DATA_INDEX_DIR}/$dbkey_1/seq/%s.nib:$dbkey_1:./static/ucsc/chrom/${dbkey_1}.len ${GALAXY_DATA_INDEX_DIR}/$dbkey_2/seq/%s.nib:$dbkey_2:./static/ucsc/chrom/${dbkey_2}.len $align_input $lav_file $seq_file1 $seq_file2 diff --git a/tools/filters/bed2gff.xml b/tools/filters/bed2gff.xml index fcc9c08a61f..69070a4b100 100644 --- a/tools/filters/bed2gff.xml +++ b/tools/filters/bed2gff.xml @@ -1,6 +1,6 @@ converter - bed_to_gff_converter.py $input $out_file1 + bed_to_gff_converter.py $input $out_file1 diff --git a/tools/filters/bed_to_gff_converter.py b/tools/filters/bed_to_gff_converter.py index f49151ad95d..34ba2dcf326 100644 --- a/tools/filters/bed_to_gff_converter.py +++ b/tools/filters/bed_to_gff_converter.py @@ -1,7 +1,9 @@ -#!/usr/bin/env python2.4 +#!/usr/bin/env python # This code exists in 2 places: ~/datatypes/converters and ~/tools/filters import sys +assert sys.version_info[:2] >= ( 2, 4 ) + def __main__(): input_name = sys.argv[1] output_name = sys.argv[2] diff --git a/tools/filters/gff2bed.xml b/tools/filters/gff2bed.xml index 59067982948..40a80cc0541 100644 --- a/tools/filters/gff2bed.xml +++ b/tools/filters/gff2bed.xml @@ -1,6 +1,6 @@ converter - gff_to_bed_converter.py $input $out_file1 + gff_to_bed_converter.py $input $out_file1 diff --git a/tools/filters/gff_to_bed_converter.py b/tools/filters/gff_to_bed_converter.py index 51b6fc1ad87..3851d417845 100644 --- a/tools/filters/gff_to_bed_converter.py +++ b/tools/filters/gff_to_bed_converter.py @@ -1,6 +1,8 @@ -#!/usr/bin/env python2.4 +#!/usr/bin/env python import sys +assert sys.version_info[:2] >= ( 2, 4 ) + def __main__(): input_name = sys.argv[1] output_name = sys.argv[2] diff --git a/tools/filters/lav_to_bed.xml b/tools/filters/lav_to_bed.xml index 6328da33304..a3917efec80 100644 --- a/tools/filters/lav_to_bed.xml +++ b/tools/filters/lav_to_bed.xml @@ -1,6 +1,6 @@ Converts a LAV formated file to BED format -lav_to_bed.py $lav_file $bed_file1 $bed_file2 +lav_to_bed.py $lav_file $bed_file1 $bed_file2 diff --git a/tools/hyphy/hyphy_branch_lengths_wrapper.xml b/tools/hyphy/hyphy_branch_lengths_wrapper.xml index 59e3704830c..f4619320abf 100644 --- a/tools/hyphy/hyphy_branch_lengths_wrapper.xml +++ b/tools/hyphy/hyphy_branch_lengths_wrapper.xml @@ -3,7 +3,7 @@ Estimation - hyphy_branch_lengths_wrapper.py $input1 $out_file1 "$tree" "$model" "$base_freq" "Global" + hyphy_branch_lengths_wrapper.py $input1 $out_file1 "$tree" "$model" "$base_freq" "Global" diff --git a/tools/hyphy/hyphy_dnds_wrapper.xml b/tools/hyphy/hyphy_dnds_wrapper.xml index ae4bf8baf1a..f4bd163d372 100644 --- a/tools/hyphy/hyphy_dnds_wrapper.xml +++ b/tools/hyphy/hyphy_dnds_wrapper.xml @@ -3,7 +3,7 @@ Estimation - hyphy_dnds_wrapper.py $input1 $out_file1 "$tree" "$model" $analysis + hyphy_dnds_wrapper.py $input1 $out_file1 "$tree" "$model" $analysis diff --git a/tools/hyphy/hyphy_nj_tree_wrapper.xml b/tools/hyphy/hyphy_nj_tree_wrapper.xml index 0e54a988365..77099e9fe59 100644 --- a/tools/hyphy/hyphy_nj_tree_wrapper.xml +++ b/tools/hyphy/hyphy_nj_tree_wrapper.xml @@ -3,7 +3,7 @@ Builder - hyphy_nj_tree_wrapper.py $input1 $out_file1 $out_file2 $distance_metric + hyphy_nj_tree_wrapper.py $input1 $out_file1 $out_file2 $distance_metric diff --git a/tools/maf/genebed_maf_to_fasta.xml b/tools/maf/genebed_maf_to_fasta.xml index 0fa3f2b55a1..82dd90a5a4f 100644 --- a/tools/maf/genebed_maf_to_fasta.xml +++ b/tools/maf/genebed_maf_to_fasta.xml @@ -1,6 +1,6 @@ given a set of coding exon intervals - #if $maf_source_type.maf_source == "user":#interval_maf_to_merged_fasta.py --dbkey=$dbkey --species=$maf_source_type.species --mafSource=$maf_source_type.maf_file --interval_file=$input1 --output_file=$out_file1 --mafSourceType=$maf_source_type.maf_source --geneBED --mafIndexFileDir=${GALAXY_DATA_INDEX_DIR} + #if $maf_source_type.maf_source == "user":#interval_maf_to_merged_fasta.py --dbkey=$dbkey --species=$maf_source_type.species --mafSource=$maf_source_type.maf_file --interval_file=$input1 --output_file=$out_file1 --mafSourceType=$maf_source_type.maf_source --geneBED --mafIndexFileDir=${GALAXY_DATA_INDEX_DIR} #else:#interval_maf_to_merged_fasta.py --dbkey=$dbkey --species=$maf_source_type.species --mafSource=$maf_source_type.maf_identifier --interval_file=$input1 --output_file=$out_file1 --mafSourceType=$maf_source_type.maf_source --geneBED --mafIndexFileDir=${GALAXY_DATA_INDEX_DIR} #end if diff --git a/tools/maf/interval2maf.py b/tools/maf/interval2maf.py index 263e55a7d92..cbdacd359dc 100755 --- a/tools/maf/interval2maf.py +++ b/tools/maf/interval2maf.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python2.4 +#!/usr/bin/env python """ Reads a list of intervals and a maf. Produces a new maf containing the @@ -31,6 +31,8 @@ import bx.intervals.io from galaxy.tools.util import maf_utilities import sys +assert sys.version_info[:2] >= ( 2, 4 ) + def __main__(): index = index_filename = None mincols = 0 diff --git a/tools/maf/interval2maf.xml b/tools/maf/interval2maf.xml index b0233d21c15..8e6409fe6f2 100644 --- a/tools/maf/interval2maf.xml +++ b/tools/maf/interval2maf.xml @@ -1,6 +1,6 @@ given a set of genomic intervals - + #if $maf_source_type.maf_source == "user":#interval2maf.py --dbkey=$input1_dbkey --chromCol=$input1_chromCol --startCol=$input1_startCol --endCol=$input1_endCol --strandCol=$input1_strandCol --mafFile=$maf_source_type.mafFile --interval_file=$input1 --output_file=$out_file1 --mafIndexFile=${GALAXY_DATA_INDEX_DIR}/maf_index.loc #else:#interval2maf.py --dbkey=$input1_dbkey --chromCol=$input1_chromCol --startCol=$input1_startCol --endCol=$input1_endCol --strandCol=$input1_strandCol --mafType=$maf_source_type.mafType --interval_file=$input1 --output_file=$out_file1 --mafIndexFile=${GALAXY_DATA_INDEX_DIR}/maf_index.loc #end if diff --git a/tools/maf/interval2maf_pairwise.xml b/tools/maf/interval2maf_pairwise.xml index d46c4c01e6c..aea30d4d9e0 100644 --- a/tools/maf/interval2maf_pairwise.xml +++ b/tools/maf/interval2maf_pairwise.xml @@ -1,6 +1,6 @@ given a set of genomic intervals - interval2maf.py --dbkey=$input1_dbkey --chromCol=$input1_chromCol --startCol=$input1_startCol --endCol=$input1_endCol --strandCol=$input1_strandCol --mafType=$mafType --interval_file=$input1 --output_file=$out_file1 --indexLocation=${GALAXY_DATA_INDEX_DIR}/maf_pairwise.loc + interval2maf.py --dbkey=$input1_dbkey --chromCol=$input1_chromCol --startCol=$input1_startCol --endCol=$input1_endCol --strandCol=$input1_strandCol --mafType=$mafType --interval_file=$input1 --output_file=$out_file1 --indexLocation=${GALAXY_DATA_INDEX_DIR}/maf_pairwise.loc diff --git a/tools/maf/interval_maf_to_merged_fasta.py b/tools/maf/interval_maf_to_merged_fasta.py index eaa5afe74c2..686c7476691 100644 --- a/tools/maf/interval_maf_to_merged_fasta.py +++ b/tools/maf/interval_maf_to_merged_fasta.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python2.4 +#!/usr/bin/env python """ Reads an interval or gene BED and a MAF Source. @@ -30,6 +30,8 @@ from bx.cookbook import doc_optparse import bx.intervals.io import sys +assert sys.version_info[:2] >= ( 2, 4 ) + def __main__(): #Parse Command Line diff --git a/tools/maf/interval_maf_to_merged_fasta.xml b/tools/maf/interval_maf_to_merged_fasta.xml index 3c74a01269e..2f79708e309 100644 --- a/tools/maf/interval_maf_to_merged_fasta.xml +++ b/tools/maf/interval_maf_to_merged_fasta.xml @@ -1,6 +1,6 @@ given a set of genomic intervals - #if $maf_source_type.maf_source == "user":#interval_maf_to_merged_fasta.py --dbkey=$dbkey --species=$maf_source_type.species --mafSource=$maf_source_type.maf_file --interval_file=$input1 --output_file=$out_file1 --chromCol=$input1_chromCol --startCol=$input1_startCol --endCol=$input1_endCol --strandCol=$input1_strandCol --mafSourceType=$maf_source_type.maf_source --mafIndexFileDir=${GALAXY_DATA_INDEX_DIR} + #if $maf_source_type.maf_source == "user":#interval_maf_to_merged_fasta.py --dbkey=$dbkey --species=$maf_source_type.species --mafSource=$maf_source_type.maf_file --interval_file=$input1 --output_file=$out_file1 --chromCol=$input1_chromCol --startCol=$input1_startCol --endCol=$input1_endCol --strandCol=$input1_strandCol --mafSourceType=$maf_source_type.maf_source --mafIndexFileDir=${GALAXY_DATA_INDEX_DIR} #else:#interval_maf_to_merged_fasta.py --dbkey=$dbkey --species=$maf_source_type.species --mafSource=$maf_source_type.maf_identifier --interval_file=$input1 --output_file=$out_file1 --chromCol=$input1_chromCol --startCol=$input1_startCol --endCol=$input1_endCol --strandCol=$input1_strandCol --mafSourceType=$maf_source_type.maf_source --mafIndexFileDir=${GALAXY_DATA_INDEX_DIR} #end if diff --git a/tools/maf/maf_by_block_number.py b/tools/maf/maf_by_block_number.py index a5a386b8208..08e5cb9e168 100644 --- a/tools/maf/maf_by_block_number.py +++ b/tools/maf/maf_by_block_number.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python2.4 +#!/usr/bin/env python #Dan Blankenberg """ Reads a list of block numbers and a maf. Produces a new maf containing the @@ -9,6 +9,8 @@ import sys import pkg_resources; pkg_resources.require( "bx-python" ) import bx.align.maf +assert sys.version_info[:2] >= ( 2, 4 ) + def __main__(): input_block_filename = sys.argv[1].strip() diff --git a/tools/maf/maf_by_block_number.xml b/tools/maf/maf_by_block_number.xml index 0ee2e9c161b..abdf8c92271 100644 --- a/tools/maf/maf_by_block_number.xml +++ b/tools/maf/maf_by_block_number.xml @@ -1,6 +1,6 @@ given a set of block numbers and a MAF file - maf_by_block_number.py $input1 $input2 $out_file1 $block_col + maf_by_block_number.py $input1 $input2 $out_file1 $block_col diff --git a/tools/maf/maf_limit_size.py b/tools/maf/maf_limit_size.py index 9f436770f7c..4d9ddb6da67 100644 --- a/tools/maf/maf_limit_size.py +++ b/tools/maf/maf_limit_size.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python2.4 +#!/usr/bin/env python #Dan Blankenberg """ Removes blocks that fall outside of specified size range. @@ -8,6 +8,8 @@ import sys import pkg_resources; pkg_resources.require( "bx-python" ) import bx.align.maf +assert sys.version_info[:2] >= ( 2, 4 ) + def __main__(): input_maf_filename = sys.argv[1].strip() diff --git a/tools/maf/maf_limit_size.xml b/tools/maf/maf_limit_size.xml index 084492ec3a6..e2d36cab1db 100644 --- a/tools/maf/maf_limit_size.xml +++ b/tools/maf/maf_limit_size.xml @@ -1,6 +1,6 @@ by Size - maf_limit_size.py $input1 $out_file1 $min_size $max_size + maf_limit_size.py $input1 $out_file1 $min_size $max_size diff --git a/tools/maf/maf_limit_to_species.xml b/tools/maf/maf_limit_to_species.xml index 42341d02a58..1d7b8b502b2 100644 --- a/tools/maf/maf_limit_to_species.xml +++ b/tools/maf/maf_limit_to_species.xml @@ -1,6 +1,6 @@ by Species - maf_limit_to_species.py $species $input1 $out_file1 $allow_partial $min_species + maf_limit_to_species.py $species $input1 $out_file1 $allow_partial $min_species diff --git a/tools/maf/maf_reverse_complement.py b/tools/maf/maf_reverse_complement.py index e3866ca09fc..c02e62d0d19 100644 --- a/tools/maf/maf_reverse_complement.py +++ b/tools/maf/maf_reverse_complement.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python2.4 +#!/usr/bin/env python """ Reads a MAF file. Produces a MAF file containing @@ -11,6 +11,8 @@ import pkg_resources; pkg_resources.require( "bx-python" ) import bx.align.maf import sys +assert sys.version_info[:2] >= ( 2, 4 ) + def __main__(): #Parse Command Line input_file = sys.argv.pop( 1 ) diff --git a/tools/maf/maf_reverse_complement.xml b/tools/maf/maf_reverse_complement.xml index 4215dba1130..8ebb29d3998 100644 --- a/tools/maf/maf_reverse_complement.xml +++ b/tools/maf/maf_reverse_complement.xml @@ -1,6 +1,6 @@ a MAF file - maf_reverse_complement.py $input1 $out_file1 + maf_reverse_complement.py $input1 $out_file1 diff --git a/tools/maf/maf_stats.py b/tools/maf/maf_stats.py index b477814dd40..d960474a13f 100644 --- a/tools/maf/maf_stats.py +++ b/tools/maf/maf_stats.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python2.4 +#!/usr/bin/env python #Dan Blankenberg """ Reads a list of intervals and a maf. Outputs a new set of intervals with statistics appended. @@ -10,6 +10,8 @@ import bx.intervals.io from numpy import zeros from galaxy.tools.util import maf_utilities +assert sys.version_info[:2] >= ( 2, 4 ) + def __main__(): maf_source_type = sys.argv.pop( 1 ) input_maf_filename = sys.argv[1].strip() diff --git a/tools/maf/maf_stats.xml b/tools/maf/maf_stats.xml index ab15d99d3d4..024646463e1 100644 --- a/tools/maf/maf_stats.xml +++ b/tools/maf/maf_stats.xml @@ -1,6 +1,6 @@ Alignment coverage information - + maf_stats.py #if $maf_source_type.maf_source == "user": $maf_source_type.maf_source $input2 $input1 $out_file1 $dbkey $input1_chromCol $input1_startCol $input1_endCol $summary diff --git a/tools/maf/maf_thread_for_species.xml b/tools/maf/maf_thread_for_species.xml index fbd41448cfc..b0895be9a2a 100644 --- a/tools/maf/maf_thread_for_species.xml +++ b/tools/maf/maf_thread_for_species.xml @@ -1,6 +1,6 @@ by Species - maf_thread_for_species.py $input1 $out_file1 $species + maf_thread_for_species.py $input1 $out_file1 $species diff --git a/tools/maf/maf_to_bed.xml b/tools/maf/maf_to_bed.xml index 1c164ab256b..e9b464dd6c7 100644 --- a/tools/maf/maf_to_bed.xml +++ b/tools/maf/maf_to_bed.xml @@ -1,6 +1,6 @@ Converts a MAF formated file to the BED format - maf_to_bed.py $input1 $out_file1 $species $complete_blocks + maf_to_bed.py $input1 $out_file1 $species $complete_blocks diff --git a/tools/maf/maf_to_fasta.xml b/tools/maf/maf_to_fasta.xml index f9ed335f102..09af95e87c0 100644 --- a/tools/maf/maf_to_fasta.xml +++ b/tools/maf/maf_to_fasta.xml @@ -1,6 +1,6 @@ Converts a MAF formated file to FASTA format - + #if $fasta_target_type.fasta_type == "multiple":#maf_to_fasta_multiple_sets.py $input1 $out_file1 $fasta_target_type.species $fasta_target_type.complete_blocks #else:#maf_to_fasta_concat.py $fasta_target_type.species $input1 $out_file1 #end if diff --git a/tools/metag_tools/megablast_xml_parser.xml b/tools/metag_tools/megablast_xml_parser.xml index 4f44419dd4b..c926d408b3c 100644 --- a/tools/metag_tools/megablast_xml_parser.xml +++ b/tools/metag_tools/megablast_xml_parser.xml @@ -1,6 +1,6 @@ -megablast_xml_parser.py $input1 $output1 +megablast_xml_parser.py $input1 $output1 diff --git a/tools/new_operations/basecoverage.xml b/tools/new_operations/basecoverage.xml index 3cff9258a7b..8e67580d97f 100644 --- a/tools/new_operations/basecoverage.xml +++ b/tools/new_operations/basecoverage.xml @@ -1,6 +1,6 @@ of all intervals - gops_basecoverage.py $input1 $output -1 $input1_chromCol,$input1_startCol,$input1_endCol,$input1_strandCol + gops_basecoverage.py $input1 $output -1 $input1_chromCol,$input1_startCol,$input1_endCol,$input1_strandCol diff --git a/tools/new_operations/cluster.xml b/tools/new_operations/cluster.xml index 03020674f05..fcc10c5fea2 100644 --- a/tools/new_operations/cluster.xml +++ b/tools/new_operations/cluster.xml @@ -1,6 +1,6 @@ the intervals of a query - gops_cluster.py $input1 $output -1 $input1_chromCol,$input1_startCol,$input1_endCol,$input1_strandCol -d $distance -m $minregions -o $returntype + gops_cluster.py $input1 $output -1 $input1_chromCol,$input1_startCol,$input1_endCol,$input1_strandCol -d $distance -m $minregions -o $returntype diff --git a/tools/new_operations/complement.xml b/tools/new_operations/complement.xml index cd5350a0d04..4c5790b945a 100644 --- a/tools/new_operations/complement.xml +++ b/tools/new_operations/complement.xml @@ -1,6 +1,6 @@ intervals of a query - gops_complement.py $input1 $output -1 $input1_chromCol,$input1_startCol,$input1_endCol,$input1_strandCol -d $dbkey $allchroms + gops_complement.py $input1 $output -1 $input1_chromCol,$input1_startCol,$input1_endCol,$input1_strandCol -d $dbkey $allchroms diff --git a/tools/new_operations/concat.xml b/tools/new_operations/concat.xml index e859117522d..4c67358e85d 100644 --- a/tools/new_operations/concat.xml +++ b/tools/new_operations/concat.xml @@ -1,6 +1,6 @@ two queries into one query - gops_concat.py $input1 $input2 $output -1 $input1_chromCol,$input1_startCol,$input1_endCol,$input1_strandCol -2 $input2_chromCol,$input2_startCol,$input2_endCol,$input2_strandCol $sameformat + gops_concat.py $input1 $input2 $output -1 $input1_chromCol,$input1_startCol,$input1_endCol,$input1_strandCol -2 $input2_chromCol,$input2_startCol,$input2_endCol,$input2_strandCol $sameformat diff --git a/tools/new_operations/coverage.xml b/tools/new_operations/coverage.xml index 3c72c99c357..19b453f8577 100644 --- a/tools/new_operations/coverage.xml +++ b/tools/new_operations/coverage.xml @@ -1,6 +1,6 @@ of a set of intervals on second set of intervals - gops_coverage.py $input1 $input2 $output -1 $input1_chromCol,$input1_startCol,$input1_endCol,$input1_strandCol -2 $input2_chromCol,$input2_startCol,$input2_endCol,$input2_strandCol + gops_coverage.py $input1 $input2 $output -1 $input1_chromCol,$input1_startCol,$input1_endCol,$input1_strandCol -2 $input2_chromCol,$input2_startCol,$input2_endCol,$input2_strandCol diff --git a/tools/new_operations/flanking_features.xml b/tools/new_operations/flanking_features.xml index 9a0c0a95efa..19c21031641 100644 --- a/tools/new_operations/flanking_features.xml +++ b/tools/new_operations/flanking_features.xml @@ -1,6 +1,6 @@ for every interval - flanking_features.py $input1 $input2 $out_file1 $direction -1 $input1_chromCol,$input1_startCol,$input1_endCol,$input1_strandCol -2 $input2_chromCol,$input2_startCol,$input2_endCol,$input2_strandCol + flanking_features.py $input1 $input2 $out_file1 $direction -1 $input1_chromCol,$input1_startCol,$input1_endCol,$input1_strandCol -2 $input2_chromCol,$input2_startCol,$input2_endCol,$input2_strandCol diff --git a/tools/new_operations/get_flanks.xml b/tools/new_operations/get_flanks.xml index 6536a2370cb..bf92c259093 100644 --- a/tools/new_operations/get_flanks.xml +++ b/tools/new_operations/get_flanks.xml @@ -1,6 +1,6 @@ returns flanking region/s for every gene - get_flanks.py $input $out_file1 $size $direction $region -o $offset -l $input_chromCol,$input_startCol,$input_endCol,$input_strandCol + get_flanks.py $input $out_file1 $size $direction $region -o $offset -l $input_chromCol,$input_startCol,$input_endCol,$input_strandCol diff --git a/tools/new_operations/gops_basecoverage.py b/tools/new_operations/gops_basecoverage.py index a706f1d6eeb..45463ea465c 100644 --- a/tools/new_operations/gops_basecoverage.py +++ b/tools/new_operations/gops_basecoverage.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python2.4 +#!/usr/bin/env python """ Count total base coverage. @@ -22,6 +22,8 @@ from bx.cookbook import doc_optparse from galaxy.tools.util.galaxyops import * +assert sys.version_info[:2] >= ( 2, 4 ) + def main(): upstream_pad = 0 diff --git a/tools/new_operations/intersect.xml b/tools/new_operations/intersect.xml index 4a012f03443..d6ed4a835ea 100644 --- a/tools/new_operations/intersect.xml +++ b/tools/new_operations/intersect.xml @@ -1,6 +1,6 @@ the intervals of two queries - gops_intersect.py $input1 $input2 $output -1 $input1_chromCol,$input1_startCol,$input1_endCol,$input1_strandCol -2 $input2_chromCol,$input2_startCol,$input2_endCol,$input2_strandCol -m $min $returntype + gops_intersect.py $input1 $input2 $output -1 $input1_chromCol,$input1_startCol,$input1_endCol,$input1_strandCol -2 $input2_chromCol,$input2_startCol,$input2_endCol,$input2_strandCol -m $min $returntype diff --git a/tools/new_operations/join.xml b/tools/new_operations/join.xml index c801b20ca7e..898c9292f64 100644 --- a/tools/new_operations/join.xml +++ b/tools/new_operations/join.xml @@ -1,6 +1,6 @@ the intervals of two queries side-by-side - gops_join.py $input1 $input2 $output -1 $input1_chromCol,$input1_startCol,$input1_endCol,$input1_strandCol -2 $input2_chromCol,$input2_startCol,$input2_endCol,$input2_strandCol -m $min -f $fill + gops_join.py $input1 $input2 $output -1 $input1_chromCol,$input1_startCol,$input1_endCol,$input1_strandCol -2 $input2_chromCol,$input2_startCol,$input2_endCol,$input2_strandCol -m $min -f $fill diff --git a/tools/new_operations/merge.xml b/tools/new_operations/merge.xml index b842d10ecfd..8111716d6dd 100644 --- a/tools/new_operations/merge.xml +++ b/tools/new_operations/merge.xml @@ -1,6 +1,6 @@ the overlapping intervals of a query - gops_merge.py $input1 $output -1 $input1_chromCol,$input1_startCol,$input1_endCol,$input1_strandCol $returntype + gops_merge.py $input1 $output -1 $input1_chromCol,$input1_startCol,$input1_endCol,$input1_strandCol $returntype diff --git a/tools/new_operations/subtract.xml b/tools/new_operations/subtract.xml index dd12648738c..bc83a26ce23 100644 --- a/tools/new_operations/subtract.xml +++ b/tools/new_operations/subtract.xml @@ -1,6 +1,6 @@ the intervals of two queries - gops_subtract.py $input1 $input2 $output -1 $input1_chromCol,$input1_startCol,$input1_endCol,$input1_strandCol -2 $input2_chromCol,$input2_startCol,$input2_endCol,$input2_strandCol -m $min $returntype + gops_subtract.py $input1 $input2 $output -1 $input1_chromCol,$input1_startCol,$input1_endCol,$input1_strandCol -2 $input2_chromCol,$input2_startCol,$input2_endCol,$input2_strandCol -m $min $returntype diff --git a/tools/new_operations/subtract_query.py b/tools/new_operations/subtract_query.py index 939d7f49ed4..2571b34f6ff 100644 --- a/tools/new_operations/subtract_query.py +++ b/tools/new_operations/subtract_query.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python2.4 +#!/usr/bin/env python # Greg Von Kuster """ @@ -11,6 +11,8 @@ import sys, sets, re import pkg_resources; pkg_resources.require( "bx-python" ) from bx.cookbook import doc_optparse +assert sys.version_info[:2] >= ( 2, 4 ) + def get_lines(fname, begin_col='', end_col=''): lines = set([]) i = 0 diff --git a/tools/new_operations/subtract_query.xml b/tools/new_operations/subtract_query.xml index 20438ff4158..c1eb9112bb4 100644 --- a/tools/new_operations/subtract_query.xml +++ b/tools/new_operations/subtract_query.xml @@ -1,6 +1,6 @@ from another query - subtract_query.py $input1 $input2 $begin_col $end_col $output + subtract_query.py $input1 $input2 $begin_col $end_col $output diff --git a/tools/patmat/findcluster_mysql.py b/tools/patmat/findcluster_mysql.py index 41066304055..72f5c917fd4 100755 --- a/tools/patmat/findcluster_mysql.py +++ b/tools/patmat/findcluster_mysql.py @@ -1,10 +1,11 @@ -#!/usr/bin/env python2.4 +#!/usr/bin/env python import urllib, sys, os, sets, findcluster_mysql_subs from time import time, localtime, strftime import pkg_resources pkg_resources.require( "sqlalchemy>=0.2" ) from sqlalchemy import * +assert sys.version_info[:2] >= ( 2, 4 ) if __name__ == '__main__': nargv = len(sys.argv) diff --git a/tools/patmat/findcluster_mysql.xml b/tools/patmat/findcluster_mysql.xml index 63978ee02a0..bc65f3f1083 100644 --- a/tools/patmat/findcluster_mysql.xml +++ b/tools/patmat/findcluster_mysql.xml @@ -1,6 +1,6 @@ search for clusters(specific combination of patterns in a window size) on a genome - findcluster_mysql.py -g $dbkey -x $flag -c $chroms -f $positions -b $input1 -r $range -p $patterns -w $wsize -o $out_file1 -i $out_file2 -l $out_file3 + findcluster_mysql.py -g $dbkey -x $flag -c $chroms -f $positions -b $input1 -r $range -p $patterns -w $wsize -o $out_file1 -i $out_file2 -l $out_file3 diff --git a/tools/patmat/findcluster_mysql_subs.py b/tools/patmat/findcluster_mysql_subs.py index ea947e98e80..7149ab87263 100644 --- a/tools/patmat/findcluster_mysql_subs.py +++ b/tools/patmat/findcluster_mysql_subs.py @@ -1,10 +1,12 @@ -#!/usr/bin/env python2.4 +#!/usr/bin/env python import sys, os, sets -#import pg from time import time, localtime, strftime import pkg_resources pkg_resources.require( "sqlalchemy>=0.2" ) from sqlalchemy import * + +assert sys.version_info[:2] >= ( 2, 4 ) + STDERR = sys.stderr diff --git a/tools/plotting/bar_chart.py b/tools/plotting/bar_chart.py index 62636fe2d82..9b533430391 100644 --- a/tools/plotting/bar_chart.py +++ b/tools/plotting/bar_chart.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python2.4 +#!/usr/bin/env python """ @@ -23,11 +23,12 @@ anton nekrutenko | anton@bx.psu.edu """ - from Numeric import * import Gnuplot, Gnuplot.funcutils import sys, string, tempfile, os +assert sys.version_info[:2] >= ( 2, 4 ) + def stop_err(msg): sys.stderr.write(msg) sys.exit() diff --git a/tools/plotting/bar_chart.xml b/tools/plotting/bar_chart.xml index 17e1f03aa4f..4c663eed670 100644 --- a/tools/plotting/bar_chart.xml +++ b/tools/plotting/bar_chart.xml @@ -1,6 +1,6 @@ for multiple columns - + #if $xtic.userSpecified == "Yes": #bar_chart.py $input $xtic.xticColumn $colList "$title" "$ylabel" $ymin $ymax $out_file1 "$pdf_size" #else: #bar_chart.py $input 0 $colList "$title" "$ylabel" $ymin $ymax $out_file1 "$pdf_size" #end if diff --git a/tools/plotting/histogram.py b/tools/plotting/histogram.py index f6224ad1096..dc46eee930a 100644 --- a/tools/plotting/histogram.py +++ b/tools/plotting/histogram.py @@ -1,9 +1,11 @@ -#!/usr/bin/env python2.4 +#!/usr/bin/env python #Greg Von Kuster import sys from rpy import * +assert sys.version_info[:2] >= ( 2, 4 ) + def stop_err(msg): sys.stderr.write(msg) sys.exit() diff --git a/tools/plotting/plotter.py b/tools/plotting/plotter.py index 77b7cc84231..b20100a381c 100644 --- a/tools/plotting/plotter.py +++ b/tools/plotting/plotter.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python2.4 +#!/usr/bin/env python # python histogram input_file output_file column bins import sys, os @@ -6,6 +6,8 @@ import matplotlib; matplotlib.use('Agg') from pylab import * +assert sys.version_info[:2] >= ( 2, 4 ) + def stop_err(msg): sys.stderr.write(msg) sys.exit() diff --git a/tools/regVariation/featureCounter.xml b/tools/regVariation/featureCounter.xml index 79cece7aabc..841e925f8e7 100644 --- a/tools/regVariation/featureCounter.xml +++ b/tools/regVariation/featureCounter.xml @@ -1,6 +1,6 @@ - featureCounter.py $input1 $input2 $output -1 $input1_chromCol,$input1_startCol,$input1_endCol,$input1_strandCol -2 $input2_chromCol,$input2_startCol,$input2_endCol,$input2_strandCol + featureCounter.py $input1 $input2 $output -1 $input1_chromCol,$input1_startCol,$input1_endCol,$input1_strandCol -2 $input2_chromCol,$input2_startCol,$input2_endCol,$input2_strandCol diff --git a/tools/regVariation/getIndelRates_3way.py b/tools/regVariation/getIndelRates_3way.py index 021b6612619..3da5241283c 100755 --- a/tools/regVariation/getIndelRates_3way.py +++ b/tools/regVariation/getIndelRates_3way.py @@ -1,8 +1,10 @@ -#!/usr/bin/env python2.4 +#!/usr/bin/env python #Guruprasad Ananda import sys, os, tempfile, string +assert sys.version_info[:2] >= ( 2, 4 ) + fout = open(sys.argv[2],'w') winsize = int(sys.argv[3]) species_ind = int(sys.argv[4]) diff --git a/tools/regVariation/getIndels.py b/tools/regVariation/getIndels.py index bfd05d57067..d8b230013a0 100644 --- a/tools/regVariation/getIndels.py +++ b/tools/regVariation/getIndels.py @@ -1,4 +1,4 @@ -#!/usr/bin/python2.4 +#!/usr/bin/python """ Estimate INDELs for pait-wise alignments. @@ -29,6 +29,8 @@ from bx.cookbook import doc_optparse from galaxy.tools.exception_handling import * import bx.align.maf +assert sys.version_info[:2] >= ( 2, 4 ) + def main(): # Parsing Command Line here options, args = doc_optparse.parse( __doc__ ) diff --git a/tools/regVariation/maf_cpg_filter.py b/tools/regVariation/maf_cpg_filter.py index 8699961e2be..d9c7e5e7923 100644 --- a/tools/regVariation/maf_cpg_filter.py +++ b/tools/regVariation/maf_cpg_filter.py @@ -1,4 +1,4 @@ -#!/usr/bin/python2.4 +#!/usr/bin/python #Adapted from bx/scripts/maf_mask_cpg.py """ @@ -21,6 +21,8 @@ from bx.cookbook import doc_optparse import sys import bx.align.sitemask.cpg +assert sys.version_info[:2] >= ( 2, 4 ) + def main(): options, args = doc_optparse.parse( __doc__ ) try: diff --git a/tools/regVariation/maf_cpg_filter.xml b/tools/regVariation/maf_cpg_filter.xml index ec9df1bdeb9..5ee53488c4f 100644 --- a/tools/regVariation/maf_cpg_filter.xml +++ b/tools/regVariation/maf_cpg_filter.xml @@ -1,6 +1,6 @@ from MAF file - + maf_cpg_filter.py $input $out_file1 diff --git a/tools/regVariation/quality_filter.xml b/tools/regVariation/quality_filter.xml index b0401dbc91f..67226cb78ca 100644 --- a/tools/regVariation/quality_filter.xml +++ b/tools/regVariation/quality_filter.xml @@ -1,6 +1,6 @@ based on quality scores - + quality_filter.py $input $out_file1 diff --git a/tools/regVariation/qv_to_bqv.xml b/tools/regVariation/qv_to_bqv.xml index f59c00f8510..d899a8d5fc2 100644 --- a/tools/regVariation/qv_to_bqv.xml +++ b/tools/regVariation/qv_to_bqv.xml @@ -1,6 +1,6 @@ - qv_to_bqv.py "$input1" $output + qv_to_bqv.py "$input1" $output diff --git a/tools/regVariation/windowSplitter.xml b/tools/regVariation/windowSplitter.xml index 60aa7a51024..fd040b421fe 100644 --- a/tools/regVariation/windowSplitter.xml +++ b/tools/regVariation/windowSplitter.xml @@ -1,6 +1,6 @@ - windowSplitter.py $input $size $out_file1 ${wintype.choice} ${wintype.offset} -l $input_chromCol,$input_startCol,$input_endCol,$input_strandCol + windowSplitter.py $input $size $out_file1 ${wintype.choice} ${wintype.offset} -l $input_chromCol,$input_startCol,$input_endCol,$input_strandCol diff --git a/tools/stats/aggregate_binned_scores_in_intervals.xml b/tools/stats/aggregate_binned_scores_in_intervals.xml index 8761b477828..e5468b180f8 100644 --- a/tools/stats/aggregate_binned_scores_in_intervals.xml +++ b/tools/stats/aggregate_binned_scores_in_intervals.xml @@ -1,6 +1,6 @@ Appends the average, min, max of datapoints per interval - + #if $score_source_type.score_source == "user":#aggregate_scores_in_intervals.py $score_source_type.input2 $input1 $input1_chromCol $input1_startCol $input1_endCol $out_file1 #else:#aggregate_scores_in_intervals.py $score_source_type.datasets $input1 $input1_chromCol $input1_startCol $input1_endCol $out_file1 -b #end if diff --git a/tools/stats/aggregate_scores_in_intervals.py b/tools/stats/aggregate_scores_in_intervals.py index faaa7935d25..818d963ae79 100755 --- a/tools/stats/aggregate_scores_in_intervals.py +++ b/tools/stats/aggregate_scores_in_intervals.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python2.4 +#!/usr/bin/env python # Greg Von Kuster """ usage: %prog score_file interval_file chrom start stop [out_file] [options] @@ -27,6 +27,8 @@ from fpconst import isNaN from bx.cookbook import doc_optparse from galaxy.tools.exception_handling import * +assert sys.version_info[:2] >= ( 2, 4 ) + class FileBinnedArrayDir( DictMixin ): """ Adapter that makes a directory of FileBinnedArray files look like diff --git a/tools/stats/column_maker.xml b/tools/stats/column_maker.xml index c0a17219c4d..9d23530386f 100644 --- a/tools/stats/column_maker.xml +++ b/tools/stats/column_maker.xml @@ -1,6 +1,6 @@ an expression on every row - + column_maker.py $input $out_file1 "$cond" $round diff --git a/tools/stats/filtering.xml b/tools/stats/filtering.xml index f473f6b4f95..6f0b2306c2d 100644 --- a/tools/stats/filtering.xml +++ b/tools/stats/filtering.xml @@ -1,6 +1,6 @@ data on any column using simple expressions - + filtering.py $input $out_file1 "$cond" diff --git a/tools/stats/grouping.xml b/tools/stats/grouping.xml index 546b99fdf39..5f53131d36f 100644 --- a/tools/stats/grouping.xml +++ b/tools/stats/grouping.xml @@ -1,6 +1,6 @@ data by a column and perform aggregate operation on other columns. - + grouping.py $out_file1 $input1 diff --git a/tools/stats/wiggle_to_simple.xml b/tools/stats/wiggle_to_simple.xml index 051df68507d..fe0d07a68c9 100644 --- a/tools/stats/wiggle_to_simple.xml +++ b/tools/stats/wiggle_to_simple.xml @@ -1,6 +1,6 @@ converter - wiggle_to_simple.py $input $out_file1 + wiggle_to_simple.py $input $out_file1 diff --git a/tools/validation/fix_errors.xml b/tools/validation/fix_errors.xml index ed1d60280db..5da2ec06e2e 100644 --- a/tools/validation/fix_errors.xml +++ b/tools/validation/fix_errors.xml @@ -3,7 +3,7 @@ in data validation - + fix_errors.py $input $errorsfile $output -x $ext --methods=$methods diff --git a/tools/visualization/GMAJ.py b/tools/visualization/GMAJ.py index 59406e93bcd..205e08ac6da 100644 --- a/tools/visualization/GMAJ.py +++ b/tools/visualization/GMAJ.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python2.4 +#!/usr/bin/env python """ Script that Creates a zip file for use by GMAJ @@ -7,6 +7,8 @@ import os, sys, zipfile import pkg_resources; pkg_resources.require( "bx-python" ) from bx.align import maf +assert sys.version_info[:2] >= ( 2, 4 ) + out_file = sys.argv[1] maf_file = sys.argv[2] dbkey = sys.argv[3] diff --git a/tools/visualization/GMAJ.xml b/tools/visualization/GMAJ.xml index b410ae83cf5..4471d148816 100644 --- a/tools/visualization/GMAJ.xml +++ b/tools/visualization/GMAJ.xml @@ -1,6 +1,6 @@ Multiple Alignment Viewer - GMAJ.py $out_file1 $maf_input $dbkey $exons_file $highlights_file $underlays_file $repeats_file $links_file + GMAJ.py $out_file1 $maf_input $dbkey $exons_file $highlights_file $underlays_file $repeats_file $links_file diff --git a/tools/visualization/LAJ.py b/tools/visualization/LAJ.py index 541c8cc6f64..800f87621fc 100644 --- a/tools/visualization/LAJ.py +++ b/tools/visualization/LAJ.py @@ -1,7 +1,10 @@ -#!/usr/bin/env python2.4 +#!/usr/bin/env python """ Copies LAV file over to new file for use with LAJ """ import sys, shutil + +assert sys.version_info[:2] >= ( 2, 4 ) + shutil.copyfile(sys.argv[1],sys.argv[2]) diff --git a/tools/visualization/LAJ.xml b/tools/visualization/LAJ.xml index ffbb4b29bca..46644c1cb07 100644 --- a/tools/visualization/LAJ.xml +++ b/tools/visualization/LAJ.xml @@ -1,6 +1,6 @@ Pairwise Alignment Viewer - LAJ.py $maf_input $out_file1 + LAJ.py $maf_input $out_file1 diff --git a/tools/visualization/build_ucsc_custom_track.py b/tools/visualization/build_ucsc_custom_track.py index be602ac9afb..237f87a563f 100755 --- a/tools/visualization/build_ucsc_custom_track.py +++ b/tools/visualization/build_ucsc_custom_track.py @@ -1,10 +1,12 @@ -#!/usr/bin/env python2.4 +#!/usr/bin/env python """ Build a UCSC genome browser custom track file """ import sys, os +assert sys.version_info[:2] >= ( 2, 4 ) + def stop_err( msg ): sys.stderr.write( msg ) sys.exit() diff --git a/tools/visualization/build_ucsc_custom_track.xml b/tools/visualization/build_ucsc_custom_track.xml index aadba8397b5..facf1655297 100644 --- a/tools/visualization/build_ucsc_custom_track.xml +++ b/tools/visualization/build_ucsc_custom_track.xml @@ -1,6 +1,6 @@ for UCSC genome browser - + build_ucsc_custom_track.py "$out_file1" #for $t in $tracks diff --git a/update_metadata.sh b/update_metadata.sh index 1e5b1bd5007..5f449763c48 100644 --- a/update_metadata.sh +++ b/update_metadata.sh @@ -1,5 +1,6 @@ #!/bin/sh -source setup_paths.sh +. ./scripts/get_python.sh +. ./setup_paths.sh -python2.4 ./scripts/update_metadata.py universe_wsgi.ini $@ +$GALAXY_PYTHON ./scripts/update_metadata.py universe_wsgi.ini $@