Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

trim six usage #731

Open
wants to merge 1 commit into
base: flye
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion flye/assembly/assemble.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
Runs assemble binary
"""

from __future__ import absolute_import
import subprocess
import logging
import os
Expand Down
1 change: 0 additions & 1 deletion flye/assembly/repeat_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
Runs repeat/contigger binary
"""

from __future__ import absolute_import
import subprocess
import logging
import os
Expand Down
2 changes: 0 additions & 2 deletions flye/assembly/scaffolder.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
Final output generator
"""

from __future__ import absolute_import
from __future__ import division
import logging

import flye.utils.fasta_parser as fp
Expand Down
2 changes: 0 additions & 2 deletions flye/config/configurator.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
Sets up some parameters for the run based on input
"""

from __future__ import absolute_import
from __future__ import division
import logging

import flye.utils.fasta_parser as fp
Expand Down
1 change: 0 additions & 1 deletion flye/config/py_cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
Configuration file for the Python part of the pipeline
"""

from __future__ import absolute_import
import os

vals = {
Expand Down
3 changes: 0 additions & 3 deletions flye/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
Main logic of the package
"""

from __future__ import print_function
from __future__ import absolute_import
import sys
import os
import logging
Expand All @@ -33,7 +31,6 @@
#import flye.trestle.trestle as tres
#import flye.trestle.graph_resolver as tres_graph
from flye.repeat_graph.repeat_graph import RepeatGraph
from flye.six.moves import range

if sys.version_info[0] == 2:
raise Exception("Python 2 is unsupported")
Expand Down
3 changes: 0 additions & 3 deletions flye/polishing/alignment.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
Runs Minimap2 and parses its output
"""

from __future__ import absolute_import
from __future__ import division
import os
from collections import namedtuple
import subprocess
Expand All @@ -19,7 +17,6 @@
from flye.utils.utils import which, get_median
from flye.utils.sam_parser import AlignmentException
from flye.six import iteritems
from flye.six.moves import range


logger = logging.getLogger()
Expand Down
4 changes: 0 additions & 4 deletions flye/polishing/bubbles.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,8 @@
Separates alignment into small bubbles for further correction
"""

from __future__ import absolute_import
from __future__ import division
import logging
from bisect import bisect
from flye.six.moves import range
from collections import defaultdict
from queue import Queue

Expand All @@ -22,7 +19,6 @@
from flye.polishing.alignment import shift_gaps, get_uniform_alignments
from flye.utils.sam_parser import SynchronizedSamReader, SynchonizedChunkManager
from flye.utils.utils import process_in_parallel, get_median
from flye.six.moves import zip


logger = logging.getLogger()
Expand Down
4 changes: 0 additions & 4 deletions flye/polishing/consensus.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,8 @@
Quick and dirty alignment consensus
"""

from __future__ import absolute_import
from __future__ import division
import logging
from collections import defaultdict
from flye.six.moves import range
from flye.six import itervalues

import multiprocessing
Expand All @@ -21,7 +18,6 @@
import flye.config.py_cfg as cfg
import flye.utils.fasta_parser as fp
from flye.utils.utils import process_in_parallel
from flye.six.moves import zip

logger = logging.getLogger()

Expand Down
3 changes: 0 additions & 3 deletions flye/polishing/polish.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
Runs polishing binary in parallel and concatentes output
"""

from __future__ import absolute_import
from __future__ import division
import logging
import subprocess, multiprocessing
import os
Expand All @@ -22,7 +20,6 @@
from flye.utils.utils import which
import flye.config.py_cfg as cfg
from flye.six import iteritems
from flye.six.moves import range


POLISH_BIN = "flye-modules"
Expand Down
1 change: 0 additions & 1 deletion flye/repeat_graph/graph_alignment.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
"""


from __future__ import division
class OverlapRange(object):
__slots__ = ("cur_id", "cur_len", "cur_start", "cur_end",
"ext_id", "ext_len", "ext_start", "ext_end",
Expand Down
1 change: 0 additions & 1 deletion flye/repeat_graph/repeat_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
as well as some basic operations
"""

from __future__ import division
class RgEdge(object):
__slots__ = ("node_left", "node_right", "edge_id", "repetitive",
"self_complement", "resolved", "mean_coverage",
Expand Down
2 changes: 0 additions & 2 deletions flye/short_plasmids/circular_sequences.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,12 @@
#Released under the BSD license (see LICENSE file)


from __future__ import absolute_import
import flye.short_plasmids.utils as utils
import flye.short_plasmids.unmapped_reads as unmapped
import flye.utils.fasta_parser as fp
from flye.utils.sam_parser import read_paf, read_paf_grouped
import logging
from flye.six import iteritems
from flye.six.moves import range

logger = logging.getLogger()

Expand Down
1 change: 0 additions & 1 deletion flye/short_plasmids/plasmids.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#This file is a part of Flye program.
#Released under the BSD license (see LICENSE file)

from __future__ import absolute_import
import os
import logging

Expand Down
3 changes: 0 additions & 3 deletions flye/short_plasmids/unmapped_reads.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,11 @@
#Released under the BSD license (see LICENSE file)


from __future__ import absolute_import
from __future__ import division
import flye.utils.fasta_parser as fp
from flye.utils.sam_parser import read_paf_grouped
import logging
from collections import defaultdict
from flye.six import iteritems
from flye.six.moves import range

logger = logging.getLogger()

Expand Down
2 changes: 0 additions & 2 deletions flye/short_plasmids/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
#This file is a part of Flye program.
#Released under the BSD license (see LICENSE file)

from flye.six.moves import range

def find_connected_components(graph):
def dfs(start_vertex, connected_components_counter):
dfs_stack = [start_vertex]
Expand Down
2 changes: 0 additions & 2 deletions flye/six.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@

"""Utilities for writing code that runs on Python 2 and 3"""

from __future__ import absolute_import

import functools
import itertools
import operator
Expand Down
3 changes: 0 additions & 3 deletions flye/tests/test_toy.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@
Runs simple toy test
"""


from __future__ import print_function

import os
import sys
import subprocess
Expand Down
4 changes: 0 additions & 4 deletions flye/trestle/divergence.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,8 @@
@author: jeffrey_yuan
"""

from __future__ import absolute_import
from __future__ import division
import logging
from collections import defaultdict
from flye.six.moves import range

import multiprocessing
import os.path
Expand All @@ -22,7 +19,6 @@
import flye.utils.fasta_parser as fp
from flye.utils.utils import process_in_parallel
import flye.config.py_cfg as config
from flye.six.moves import zip

logger = logging.getLogger()

Expand Down
2 changes: 0 additions & 2 deletions flye/trestle/graph_resolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,13 @@
Modifies repeat graph using the Tresle output
"""

from __future__ import absolute_import
import logging
from itertools import chain
from collections import defaultdict

import flye.utils.fasta_parser as fp
from flye.repeat_graph.graph_alignment import iter_alignments
from flye.six import iteritems
from flye.six.moves import zip

logger = logging.getLogger()

Expand Down
4 changes: 0 additions & 4 deletions flye/trestle/trestle.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
@author: jeffrey_yuan
"""

from __future__ import absolute_import
from __future__ import division
import os
import logging
from itertools import combinations, product
Expand All @@ -25,8 +23,6 @@

import flye.trestle.divergence as div
import flye.trestle.trestle_config as trestle_config
from flye.six.moves import range
from flye.six.moves import zip

logger = logging.getLogger()

Expand Down
1 change: 0 additions & 1 deletion flye/utils/bytes2human.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
"""

# see: http://goo.gl/kTQMs
from __future__ import division
SYMBOLS = {
'customary' : ('B', 'K', 'M', 'G', 'T', 'P', 'E', 'Z', 'Y'),
'customary_ext' : ('byte', 'kilo', 'mega', 'giga', 'tera', 'peta', 'exa',
Expand Down
3 changes: 0 additions & 3 deletions flye/utils/fasta_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
This module provides some basic FASTA I/O
"""

from __future__ import absolute_import
import logging
import gzip
import io
Expand All @@ -23,8 +22,6 @@
_STR = bytes.decode
_BYTES = str.encode

from flye.six.moves import range


logger = logging.getLogger()

Expand Down
4 changes: 0 additions & 4 deletions flye/utils/sam_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
Provides multithreaded parser for SAM files
"""

from __future__ import absolute_import
from __future__ import division

import os
import re
import sys
Expand All @@ -32,7 +29,6 @@
_STR = bytes.decode
_BYTES = str.encode

from flye.six.moves import range
from flye.six import iteritems

import flye.utils.fasta_parser as fp
Expand Down
1 change: 0 additions & 1 deletion flye/utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#This file is a part of ABruijn program.
#Released under the BSD license (see LICENSE file)

from __future__ import absolute_import
import os
import signal
import multiprocessing
Expand Down
2 changes: 0 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
#This file is a part of the Flye package
#Released under the BSD license (see LICENSE file)

from __future__ import print_function

import os
import sys
import subprocess
Expand Down