Skip to content

Commit 8c4cdf3

Browse files
committed
removed six imports, __future__ imports, added Apache license headers where missing
1 parent c5bf119 commit 8c4cdf3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+92
-125
lines changed

setup.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
# See the License for the specific language governing permissions and
1212
# limitations under the License.
1313

14-
from __future__ import print_function
1514
import os
1615
import re
1716

tests/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# Copyright (c) 2016. Mount Sinai School of Medicine
2-
#
31
# Licensed under the Apache License, Version 2.0 (the "License");
42
# you may not use this file except in compliance with the License.
53
# You may obtain a copy of the License at

tests/benchmark_vcf_load.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
# Licensed under the Apache License, Version 2.0 (the "License");
2+
# you may not use this file except in compliance with the License.
3+
# You may obtain a copy of the License at
4+
#
5+
# http://www.apache.org/licenses/LICENSE-2.0
6+
#
7+
# Unless required by applicable law or agreed to in writing, software
8+
# distributed under the License is distributed on an "AS IS" BASIS,
9+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10+
# See the License for the specific language governing permissions and
11+
# limitations under the License.
12+
113
"""
214
Time how long it takes to open a VCF.
315

tests/common.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# Copyright (c) 2016. Mount Sinai School of Medicine
2-
#
31
# Licensed under the Apache License, Version 2.0 (the "License");
42
# you may not use this file except in compliance with the License.
53
# You may obtain a copy of the License at

tests/data.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# Copyright (c) 2015. Mount Sinai School of Medicine
2-
#
31
# Licensed under the Apache License, Version 2.0 (the "License");
42
# you may not use this file except in compliance with the License.
53
# You may obtain a copy of the License at

tests/test_cli_effects.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
# Licensed under the Apache License, Version 2.0 (the "License");
2+
# you may not use this file except in compliance with the License.
3+
# You may obtain a copy of the License at
4+
#
5+
# http://www.apache.org/licenses/LICENSE-2.0
6+
#
7+
# Unless required by applicable law or agreed to in writing, software
8+
# distributed under the License is distributed on an "AS IS" BASIS,
9+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10+
# See the License for the specific language governing permissions and
11+
# limitations under the License.
12+
113
from tempfile import NamedTemporaryFile
214
import pandas as pd
315

tests/test_cli_genes.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
# Licensed under the Apache License, Version 2.0 (the "License");
2+
# you may not use this file except in compliance with the License.
3+
# You may obtain a copy of the License at
4+
#
5+
# http://www.apache.org/licenses/LICENSE-2.0
6+
#
7+
# Unless required by applicable law or agreed to in writing, software
8+
# distributed under the License is distributed on an "AS IS" BASIS,
9+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10+
# See the License for the specific language governing permissions and
11+
# limitations under the License.
12+
113
from varcode.cli.genes_script import main as run_script
214
from .data import ov_wustle_variants, db_snp_variants
315

tests/test_collection_filtering.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
# See the License for the specific language governing permissions and
1111
# limitations under the License.
1212

13-
from nose.tools import eq_
14-
from varcode import VariantCollection
1513

14+
from varcode import VariantCollection
15+
from .common import eq_
1616
from .data import (
1717
snp_rs4244285,
1818
snp_rs1537415

tests/test_common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
# See the License for the specific language governing permissions and
1111
# limitations under the License.
1212

13-
from nose.tools import eq_
1413
import varcode
14+
from .common import eq_
1515

1616
def test_memoize():
1717
class State(object):

tests/test_effect_collection.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# Copyright (c) 2016. Mount Sinai School of Medicine
2-
#
31
# Licensed under the Apache License, Version 2.0 (the "License");
42
# you may not use this file except in compliance with the License.
53
# You may obtain a copy of the License at

tests/test_effect_collection_serialization.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,16 @@
11

2+
# Licensed under the Apache License, Version 2.0 (the "License");
3+
# you may not use this file except in compliance with the License.
4+
# You may obtain a copy of the License at
5+
#
6+
# http://www.apache.org/licenses/LICENSE-2.0
7+
#
8+
# Unless required by applicable law or agreed to in writing, software
9+
# distributed under the License is distributed on an "AS IS" BASIS,
10+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
# See the License for the specific language governing permissions and
12+
# limitations under the License.
13+
214
import pickle
315

416
from varcode import EffectCollection

tests/test_exonic_splice_site.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# Copyright (c) 2018. Mount Sinai School of Medicine
2-
#
31
# Licensed under the Apache License, Version 2.0 (the "License");
42
# you may not use this file except in compliance with the License.
53
# You may obtain a copy of the License at

tests/test_frameshift_helpers.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
# Licensed under the Apache License, Version 2.0 (the "License");
2+
# you may not use this file except in compliance with the License.
3+
# You may obtain a copy of the License at
4+
#
5+
# http://www.apache.org/licenses/LICENSE-2.0
6+
#
7+
# Unless required by applicable law or agreed to in writing, software
8+
# distributed under the License is distributed on an "AS IS" BASIS,
9+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10+
# See the License for the specific language governing permissions and
11+
# limitations under the License.
12+
113
from varcode.effects.effect_prediction_coding_frameshift import (
214
cdna_codon_sequence_after_insertion_frameshift,
315
cdna_codon_sequence_after_deletion_or_substitution_frameshift,

tests/test_mm10_klf6_frameshift.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
# Licensed under the Apache License, Version 2.0 (the "License");
2+
# you may not use this file except in compliance with the License.
3+
# You may obtain a copy of the License at
4+
#
5+
# http://www.apache.org/licenses/LICENSE-2.0
6+
#
7+
# Unless required by applicable law or agreed to in writing, software
8+
# distributed under the License is distributed on an "AS IS" BASIS,
9+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10+
# See the License for the specific language governing permissions and
11+
# limitations under the License.
12+
113
from varcode import Variant
214
from varcode.effects import FrameShift
315
from varcode.effects.effect_prediction_coding_frameshift import (

tests/test_mouse.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
1-
from __future__ import absolute_import
1+
# Licensed under the Apache License, Version 2.0 (the "License");
2+
# you may not use this file except in compliance with the License.
3+
# You may obtain a copy of the License at
4+
#
5+
# http://www.apache.org/licenses/LICENSE-2.0
6+
#
7+
# Unless required by applicable law or agreed to in writing, software
8+
# distributed under the License is distributed on an "AS IS" BASIS,
9+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10+
# See the License for the specific language governing permissions and
11+
# limitations under the License.
212

313
from .common import eq_
414

tests/test_mutate.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# Copyright (c) 2015. Mount Sinai School of Medicine
2-
#
31
# Licensed under the Apache License, Version 2.0 (the "License");
42
# you may not use this file except in compliance with the License.
53
# You may obtain a copy of the License at

tests/test_no_duplicate_variants.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# Copyright (c) 2015. Mount Sinai School of Medicine
2-
#
31
# Licensed under the Apache License, Version 2.0 (the "License");
42
# you may not use this file except in compliance with the License.
53
# You may obtain a copy of the License at

tests/test_string_helpers.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# Copyright (c) 2015. Mount Sinai School of Medicine
2-
#
31
# Licensed under the Apache License, Version 2.0 (the "License");
42
# you may not use this file except in compliance with the License.
53
# You may obtain a copy of the License at

tests/test_timings.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# Copyright (c) 2015. Mount Sinai School of Medicine
2-
#
31
# Licensed under the Apache License, Version 2.0 (the "License");
42
# you may not use this file except in compliance with the License.
53
# You may obtain a copy of the License at

tests/test_variant.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# Copyright (c) 2015. Mount Sinai School of Medicine
2-
#
31
# Licensed under the Apache License, Version 2.0 (the "License");
42
# you may not use this file except in compliance with the License.
53
# You may obtain a copy of the License at

tests/test_variant_collection.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# Copyright (c) 2015. Mount Sinai School of Medicine
2-
#
31
# Licensed under the Apache License, Version 2.0 (the "License");
42
# you may not use this file except in compliance with the License.
53
# You may obtain a copy of the License at

varcode/cli/__init__.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# Copyright (c) 2016. Mount Sinai School of Medicine
2-
#
31
# Licensed under the Apache License, Version 2.0 (the "License");
42
# you may not use this file except in compliance with the License.
53
# You may obtain a copy of the License at
@@ -12,8 +10,6 @@
1210
# See the License for the specific language governing permissions and
1311
# limitations under the License.
1412

15-
from __future__ import print_function, division, absolute_import
16-
1713
from .variant_args import (
1814
add_variant_args,
1915
make_variants_parser,

varcode/cli/effects_script.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# Copyright (c) 2016-2019. Mount Sinai School of Medicine
2-
#
31
# Licensed under the Apache License, Version 2.0 (the "License");
42
# you may not use this file except in compliance with the License.
53
# You may obtain a copy of the License at
@@ -12,8 +10,6 @@
1210
# See the License for the specific language governing permissions and
1311
# limitations under the License.
1412

15-
from __future__ import division, absolute_import
16-
1713
import logging.config
1814
import pkg_resources
1915
import sys

varcode/cli/genes_script.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# Copyright (c) 2016-2019. Mount Sinai School of Medicine
2-
#
31
# Licensed under the Apache License, Version 2.0 (the "License");
42
# you may not use this file except in compliance with the License.
53
# You may obtain a copy of the License at
@@ -12,7 +10,6 @@
1210
# See the License for the specific language governing permissions and
1311
# limitations under the License.
1412

15-
from __future__ import division, absolute_import
1613
import logging
1714
import logging.config
1815
import pkg_resources

varcode/cli/variant_args.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# Copyright (c) 2016-2019. Mount Sinai School of Medicine
2-
#
31
# Licensed under the Apache License, Version 2.0 (the "License");
42
# you may not use this file except in compliance with the License.
53
# You may obtain a copy of the License at
@@ -12,7 +10,6 @@
1210
# See the License for the specific language governing permissions and
1311
# limitations under the License.
1412

15-
from __future__ import print_function, division, absolute_import
1613
from argparse import ArgumentParser
1714

1815
from ..vcf import load_vcf

varcode/cli/version_info.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# Copyright (c) 2016-2018. Mount Sinai School of Medicine
2-
#
31
# Licensed under the Apache License, Version 2.0 (the "License");
42
# you may not use this file except in compliance with the License.
53
# You may obtain a copy of the License at
@@ -12,8 +10,6 @@
1210
# See the License for the specific language governing permissions and
1311
# limitations under the License.
1412

15-
from __future__ import print_function, division, absolute_import
16-
1713
from collections import OrderedDict
1814
from os.path import dirname
1915
from .. import __file__ as package_init_file_path

varcode/common.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# Copyright (c) 2016-2019. Mount Sinai School of Medicine
2-
#
31
# Licensed under the Apache License, Version 2.0 (the "License");
42
# you may not use this file except in compliance with the License.
53
# You may obtain a copy of the License at
@@ -12,7 +10,6 @@
1210
# See the License for the specific language governing permissions and
1311
# limitations under the License.
1412

15-
from __future__ import print_function, division, absolute_import
1613
from collections import defaultdict
1714

1815
from functools import wraps

varcode/effects/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# Copyright (c) 2016. Mount Sinai School of Medicine
2-
#
31
# Licensed under the Apache License, Version 2.0 (the "License");
42
# you may not use this file except in compliance with the License.
53
# You may obtain a copy of the License at

varcode/effects/common.py

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# Copyright (c) 2016. Mount Sinai School of Medicine
2-
#
31
# Licensed under the Apache License, Version 2.0 (the "License");
42
# you may not use this file except in compliance with the License.
53
# You may obtain a copy of the License at
@@ -12,15 +10,13 @@
1210
# See the License for the specific language governing permissions and
1311
# limitations under the License.
1412

15-
from __future__ import print_function, division, absolute_import
16-
1713
from Bio.Seq import Seq
18-
from six import string_types, text_type
14+
1915

2016

2117
def bio_seq_to_str(seq):
22-
if isinstance(seq, Seq):
23-
return str(seq)
24-
elif isinstance(seq, string_types):
25-
return text_type(seq)
26-
return seq
18+
if type(seq) is str:
19+
return seq
20+
else:
21+
return str(seq)
22+

varcode/effects/effect_classes.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# Copyright (c) 2016-2018. Mount Sinai School of Medicine
2-
#
31
# Licensed under the Apache License, Version 2.0 (the "License");
42
# you may not use this file except in compliance with the License.
53
# You may obtain a copy of the License at
@@ -12,7 +10,6 @@
1210
# See the License for the specific language governing permissions and
1311
# limitations under the License.
1412

15-
from __future__ import print_function, division, absolute_import
1613

1714
from memoized_property import memoized_property
1815
from serializable import Serializable

varcode/effects/effect_collection.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# Copyright (c) 2016. Mount Sinai School of Medicine
2-
#
31
# Licensed under the Apache License, Version 2.0 (the "License");
42
# you may not use this file except in compliance with the License.
53
# You may obtain a copy of the License at
@@ -12,7 +10,6 @@
1210
# See the License for the specific language governing permissions and
1311
# limitations under the License.
1412

15-
from __future__ import print_function, division, absolute_import
1613
from collections import OrderedDict
1714

1815
import pandas as pd

varcode/effects/effect_helpers.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# Copyright (c) 2016. Mount Sinai School of Medicine
2-
#
31
# Licensed under the Apache License, Version 2.0 (the "License");
42
# you may not use this file except in compliance with the License.
53
# You may obtain a copy of the License at
@@ -16,7 +14,6 @@
1614
Helper functions for determine effect annotation for a variant
1715
"""
1816

19-
from __future__ import print_function, division, absolute_import
2017

2118
from ..nucleotides import PURINE_NUCLEOTIDES, AMINO_NUCLEOTIDES
2219

varcode/effects/effect_ordering.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# Copyright (c) 2016. Mount Sinai School of Medicine
2-
#
31
# Licensed under the Apache License, Version 2.0 (the "License");
42
# you may not use this file except in compliance with the License.
53
# You may obtain a copy of the License at
@@ -12,8 +10,6 @@
1210
# See the License for the specific language governing permissions and
1311
# limitations under the License.
1412

15-
from __future__ import print_function, division, absolute_import
16-
1713
from .effect_classes import (
1814
Failure,
1915
IncompleteTranscript,

0 commit comments

Comments
 (0)