Skip to content
Merged
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
5 changes: 2 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,11 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down
4 changes: 1 addition & 3 deletions isovar/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from __future__ import print_function, division, absolute_import

__version__ = "1.3.0"
__version__ = "1.4.0"


from .allele_read import AlleleRead
Expand Down
3 changes: 0 additions & 3 deletions isovar/alignment_score.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@
Sequence alignment helpers
"""

from __future__ import print_function, division, absolute_import


def alignment_score(a, b, min_subsequence_length=1):
"""
Number of mismatches between all two input sequences, allows
Expand Down
1 change: 0 additions & 1 deletion isovar/allele_read.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
allele (ref, alt, or otherwise), and suffix portions
"""

from __future__ import print_function, division, absolute_import
import logging

from .string_helpers import convert_from_bytes_if_necessary, trim_N_nucleotides
Expand Down
4 changes: 0 additions & 4 deletions isovar/assembly.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from __future__ import print_function, division, absolute_import

from collections import defaultdict

from six.moves import range

from .default_parameters import MIN_VARIANT_SEQUENCE_ASSEMBLY_OVERLAP_SIZE
from .logging import get_logger

Expand Down
2 changes: 0 additions & 2 deletions isovar/cli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
# limitations under the License.


from __future__ import print_function, division, absolute_import

from .main_args import make_isovar_arg_parser, run_isovar_from_parsed_args
from .protein_sequence_args import protein_sequence_creator_from_args
from .rna_args import read_collector_from_args
Expand Down
2 changes: 0 additions & 2 deletions isovar/cli/filter_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
Common command-line arguments for filtering Isovar results
"""

from __future__ import print_function, division, absolute_import

from collections import OrderedDict

from ..default_parameters import (
Expand Down
1 change: 0 additions & 1 deletion isovar/cli/isovar_allele_counts.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
Prints number of reads supporting ref, alt, and other alleles at variant loci.
"""

from __future__ import print_function, division, absolute_import
import sys

from ..logging import get_logger
Expand Down
1 change: 0 additions & 1 deletion isovar/cli/isovar_allele_reads.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
Prints names and sequences of reads overlapping a given set of variants.
"""

from __future__ import print_function, division, absolute_import
import sys

from ..logging import get_logger
Expand Down
2 changes: 0 additions & 2 deletions isovar/cli/isovar_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
the RNA reads which overlap and protein sequences which can be constructed
from reads that support the variant.
"""
from __future__ import print_function, division, absolute_import

import sys


Expand Down
1 change: 0 additions & 1 deletion isovar/cli/isovar_protein_sequences.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
a read count to each protein sequence.
"""

from __future__ import print_function, division, absolute_import
import sys


Expand Down
2 changes: 0 additions & 2 deletions isovar/cli/isovar_reference_contexts.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from __future__ import print_function, division, absolute_import

import sys

from ..logging import get_logger
Expand Down
1 change: 0 additions & 1 deletion isovar/cli/isovar_translations.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
sequences using an RNAseq BAM from the same tissuie.
"""

from __future__ import print_function, division, absolute_import
import sys

from ..logging import get_logger
Expand Down
1 change: 0 additions & 1 deletion isovar/cli/isovar_variant_reads.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
Prints names and sequences of reads supporting a given set of variants.
"""

from __future__ import print_function, division, absolute_import
import sys

from ..logging import get_logger
Expand Down
2 changes: 0 additions & 2 deletions isovar/cli/isovar_variant_sequences.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from __future__ import print_function, division, absolute_import

import sys

from ..logging import get_logger
Expand Down
2 changes: 0 additions & 2 deletions isovar/cli/main_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
Create parser and run Isovar from parsed args
"""

from __future__ import print_function, division, absolute_import

from varcode.cli import variant_collection_from_args

from ..main import run_isovar
Expand Down
3 changes: 0 additions & 3 deletions isovar/cli/output_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@
the CLI commands
"""

from __future__ import print_function, division, absolute_import


def add_output_args(
parser,
filename="output.csv",
Expand Down
2 changes: 0 additions & 2 deletions isovar/cli/protein_sequence_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
# limitations under the License.


from __future__ import print_function, division, absolute_import

from ..default_parameters import MAX_PROTEIN_SEQUENCES_PER_VARIANT
from ..main import ProteinSequenceCreator
from ..dataframe_helpers import protein_sequences_generator_to_dataframe
Expand Down
2 changes: 0 additions & 2 deletions isovar/cli/reference_context_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from __future__ import print_function, division, absolute_import

from varcode.cli.variant_args import (
make_variants_parser,
variant_collection_from_args
Expand Down
2 changes: 0 additions & 2 deletions isovar/cli/rna_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
Common command-line arguments for all Isovar commands which use RNA
"""

from __future__ import print_function, division, absolute_import

from pysam import AlignmentFile

from varcode.cli import make_variants_parser, variant_collection_from_args
Expand Down
2 changes: 0 additions & 2 deletions isovar/cli/translation_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
cDNA into protein sequences.
"""

from __future__ import print_function, division, absolute_import

from ..default_parameters import (
MIN_TRANSCRIPT_PREFIX_LENGTH,
MAX_REFERENCE_TRANSCRIPT_MISMATCHES,
Expand Down
2 changes: 0 additions & 2 deletions isovar/cli/variant_sequences_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
# limitations under the License.


from __future__ import print_function, division, absolute_import

from ..default_parameters import (
MIN_VARIANT_SEQUENCE_COVERAGE,
VARIANT_SEQUENCE_LENGTH,
Expand Down
2 changes: 0 additions & 2 deletions isovar/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from __future__ import print_function, division, absolute_import

from collections import defaultdict
import numpy as np

Expand Down
4 changes: 1 addition & 3 deletions isovar/dataframe_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from __future__ import print_function, division, absolute_import
from collections import OrderedDict
from six import integer_types, text_type, binary_type

from varcode import Variant
import pandas as pd

VALID_ELEMENT_TYPES = integer_types + (text_type, binary_type, float, bool)
VALID_ELEMENT_TYPES = (int, str, bytes, float, bool)

# values of these types are automatically converted to their size or length
# unless some other conversion function is provided
Expand Down
2 changes: 0 additions & 2 deletions isovar/dataframe_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from __future__ import print_function, division, absolute_import

import pandas as pd

from .allele_read import AlleleRead
Expand Down
2 changes: 0 additions & 2 deletions isovar/default_parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from __future__ import print_function, division, absolute_import

"""
Gathered all the default function parameters in a single module, so that these
values can be easily shared between modules and also between commandline
Expand Down
2 changes: 0 additions & 2 deletions isovar/dna.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from __future__ import print_function, division, absolute_import

"""
This module implements basic DNA functionality in Python strings to
to avoid having to depend on a bigger library such as BioPython.
Expand Down
2 changes: 0 additions & 2 deletions isovar/effect_prediction.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from __future__ import print_function, division, absolute_import

from varcode.effects.effect_classes import ExonicSpliceSite, CodingMutation

from .logging import get_logger
Expand Down
2 changes: 0 additions & 2 deletions isovar/filtering.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
Functions used to annotate IsovarResult objects with filters.
"""

from __future__ import print_function, division, absolute_import

from collections import OrderedDict
import operator

Expand Down
2 changes: 0 additions & 2 deletions isovar/genetic_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from __future__ import print_function, division, absolute_import

"""
GeneticCode objects contain the rules for translating cDNA into a protein
sequence: the set of valid start and stop codons, as well as which
Expand Down
4 changes: 1 addition & 3 deletions isovar/isovar_result.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,9 @@
and any protein sequences which were successfully translated for it.
"""

from __future__ import print_function, division, absolute_import

from collections import OrderedDict

from cached_property import cached_property
from functools import cached_property

from .common import safediv
from .alignment_score import alignment_score
Expand Down
2 changes: 0 additions & 2 deletions isovar/locus_read.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
for extracting variant nucleotides.
"""

from __future__ import print_function, division, absolute_import

from .value_object import ValueObject


Expand Down
2 changes: 0 additions & 2 deletions isovar/logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
# limitations under the License.


from __future__ import print_function, division, absolute_import

import logging
import logging.config
import pkg_resources
Expand Down
7 changes: 2 additions & 5 deletions isovar/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@
# limitations under the License.


from __future__ import print_function, division, absolute_import

from six import string_types
from varcode import load_vcf
from pysam import AlignmentFile
from collections import OrderedDict
Expand Down Expand Up @@ -133,10 +130,10 @@ def run_isovar(
`protein_sequences` field of the IsovarVar result will be empty
if no sequences could be determined.
"""
if isinstance(variants, string_types):
if isinstance(variants, str):
variants = load_vcf(variants)

if isinstance(alignment_file, string_types):
if isinstance(alignment_file, str):
alignment_file = AlignmentFile(
alignment_file,
threads=decompression_threads)
Expand Down
2 changes: 0 additions & 2 deletions isovar/phasing.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from __future__ import print_function, division, absolute_import

from collections import defaultdict, Counter

from .default_parameters import MIN_SHARED_FRAGMENTS_FOR_PHASING
Expand Down
2 changes: 0 additions & 2 deletions isovar/protein_sequence.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
associated with its supporting (and non-supporting but overlapping) RNA reads.
"""

from __future__ import print_function, division, absolute_import

from .common import normalize_base0_range_indices
from .translation_key import TranslationKey
from .translation import Translation
Expand Down
2 changes: 0 additions & 2 deletions isovar/protein_sequence_creator.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
# limitations under the License.


from __future__ import print_function, division, absolute_import

from .default_parameters import (
MIN_TRANSCRIPT_PREFIX_LENGTH,
MAX_REFERENCE_TRANSCRIPT_MISMATCHES,
Expand Down
2 changes: 0 additions & 2 deletions isovar/protein_sequence_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
ProteinSequence.
"""

from __future__ import print_function, division, absolute_import

from .common import groupby
from .logging import get_logger
from .protein_sequence import ProteinSequence
Expand Down
4 changes: 0 additions & 4 deletions isovar/read_collector.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from __future__ import print_function, division, absolute_import

from six import integer_types

from .default_parameters import (
USE_SECONDARY_ALIGNMENTS,
USE_DUPLICATE_READS,
Expand Down
2 changes: 0 additions & 2 deletions isovar/read_evidence.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
they support the reference, somatic allele, or some other allele.
"""

from __future__ import print_function, division, absolute_import

from .allele_read_helpers import split_reads_into_ref_alt_other
from .variant_helpers import trim_variant
from .value_object import ValueObject
Expand Down
Loading
Loading