From 8e7c7915ba9d4e9a881312bcd5da26c87f172a8b Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Wed, 19 Feb 2020 10:53:01 +0100 Subject: [PATCH] Adjust bx-python imports for https://github.com/bxlab/bx-python/commit/fd08da3b49e89e0accd2c372d4a99427628ce432 --- lib/galaxy/datatypes/util/maf_utilities.py | 2 +- tools/maf/maf_to_bed.py | 5 +++-- tools/maf/maf_to_bed.xml | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/galaxy/datatypes/util/maf_utilities.py b/lib/galaxy/datatypes/util/maf_utilities.py index c013dc215da..4df2450aa28 100644 --- a/lib/galaxy/datatypes/util/maf_utilities.py +++ b/lib/galaxy/datatypes/util/maf_utilities.py @@ -45,7 +45,7 @@ def src_split(src): def src_merge(spec, chrom, contig=None): if None in [spec, chrom]: spec = chrom = spec or chrom - return bx.align.maf.src_merge(spec, chrom, contig) + return bx.align.src_merge(spec, chrom, contig) def get_species_in_block(block): diff --git a/tools/maf/maf_to_bed.py b/tools/maf/maf_to_bed.py index fdb59219886..e6116f2d864 100644 --- a/tools/maf/maf_to_bed.py +++ b/tools/maf/maf_to_bed.py @@ -9,6 +9,7 @@ import sys from collections import OrderedDict from bx.align import maf +from bx.align.core import src_split def __main__(): @@ -28,7 +29,7 @@ def __main__(): try: for i, m in enumerate(maf.Reader(open(input_filename, 'r'))): for c in m.components: - spec, chrom = maf.src_split(c.src) + spec, chrom = src_split(c.src) if not spec or not chrom: spec = c.src species[spec] = None @@ -64,7 +65,7 @@ def __main__(): if len(l) < num_species and partial == "partial_disallowed": continue for c in l: - spec, chrom = maf.src_split(c.src) + spec, chrom = src_split(c.src) if not spec or not chrom: spec = chrom = c.src if spec not in out_files.keys(): diff --git a/tools/maf/maf_to_bed.xml b/tools/maf/maf_to_bed.xml index e7e56b6d32d..423a44412e0 100644 --- a/tools/maf/maf_to_bed.xml +++ b/tools/maf/maf_to_bed.xml @@ -1,4 +1,4 @@ - + Converts a MAF formatted file to the BED format macros.xml