Skip to content

Commit 56a0e11

Browse files
authored
refmt with newest black
1 parent d50e1db commit 56a0e11

File tree

10 files changed

+6
-18
lines changed

10 files changed

+6
-18
lines changed

haptools/data/breakpoints.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212

1313
from .data import Data
1414

15-
1615
# A haplotype block consists of
1716
# 1) pop - A population label (str), like 'YRI'
1817
# 2) chrom - A chromosome name (str), like 'chr19' or simply '19'

haptools/data/genotypes.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -515,8 +515,7 @@ def check_biallelic(self, discard_also=False):
515515
self._var_idx = None
516516
else:
517517
raise ValueError(
518-
"Variant with ID {} at POS {}:{} is multiallelic for sample {}"
519-
.format(
518+
"Variant with ID {} at POS {}:{} is multiallelic for sample {}".format(
520519
*tuple(self.variants[variant_idx[0]])[:3],
521520
self.samples[samp_idx[0]],
522521
)

haptools/data/haplotypes.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
from .data import Data
1313
from .genotypes import GenotypesVCF
1414

15-
1615
# the current version of the hap format spec
1716
HAP_VERSION = "0.2.0"
1817

haptools/data/tr_harmonizer.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
Utilities for harmonizing tandem repeat VCF records.
33
Handles VCFs generated by various TR genotyping tools
44
"""
5+
56
import re
67
import math
78
import enum
@@ -462,8 +463,7 @@ def _HarmonizeHipSTRRecord(vcfrecord: cyvcf2.Variant):
462463
):
463464
raise TypeError(
464465
"Record at {}:{} is missing one of the mandatory HipSTR info fields START,"
465-
" END, PERIOD. ".format(vcfrecord.CHROM, vcfrecord.POS)
466-
+ _beagle_error
466+
" END, PERIOD. ".format(vcfrecord.CHROM, vcfrecord.POS) + _beagle_error
467467
)
468468
# determine full alleles and trimmed alleles
469469
pos = int(vcfrecord.POS)
@@ -536,8 +536,7 @@ def _HarmonizeAdVNTRRecord(vcfrecord: cyvcf2.Variant):
536536
if vcfrecord.INFO.get("RU") is None or vcfrecord.INFO.get("VID") is None:
537537
raise TypeError(
538538
"Record at {}:{} is missing one of the mandatory ADVNTR info fields RU,"
539-
" VID. ".format(vcfrecord.CHROM, vcfrecord.POS)
540-
+ _beagle_error
539+
" VID. ".format(vcfrecord.CHROM, vcfrecord.POS) + _beagle_error
541540
)
542541
ref_allele = vcfrecord.REF.upper()
543542
if vcfrecord.ALT:
@@ -651,8 +650,7 @@ def _HarmonizeEHRecord(vcfrecord: cyvcf2.Variant):
651650
if vcfrecord.INFO.get("VARID") is None or vcfrecord.INFO.get("RU") is None:
652651
raise TypeError(
653652
"Record at {}:{} is missing one of the mandatory ExpansionHunter info"
654-
" fields VARID, RU. ".format(vcfrecord.CHROM, vcfrecord.POS)
655-
+ _beagle_error
653+
" fields VARID, RU. ".format(vcfrecord.CHROM, vcfrecord.POS) + _beagle_error
656654
)
657655
record_id = vcfrecord.INFO["VARID"]
658656
motif = vcfrecord.INFO["RU"].upper()

tests/bench_genotypes.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
GenotypesPLINKTR,
2525
)
2626

27-
2827
# COMMAND FOR GENERATING UKB PLOT:
2928
# tests/bench_genotypes.py \
3029
# --default-variants 18472 --default-samples 487409 --intervals-variants 1 80 4 \

tests/bench_transform.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
from haptools.logging import getLogger
1818
from haptools.data import GenotypesVCF, Haplotypes, Haplotype, Variant
1919

20-
2120
# ---------------USAGE----------------
2221
# COMMAND FOR GENERATING THE MAIN PLOT:
2322
# tests/bench_transform.py --name 'hap-loop' --reps 5 --archive archive.pickle \

tests/test_data.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
GenotypesPLINKTR,
2525
)
2626

27-
2827
DATADIR = Path(__file__).parent.joinpath("data")
2928

3029

tests/test_outputvcf.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
write_breakpoints,
1717
)
1818

19-
2019
DATADIR = Path(__file__).parent.joinpath("data")
2120

2221

@@ -740,8 +739,7 @@ def test_model_files():
740739
faulty_model, mapdir, chroms, popsize, vcf_file, sampleinfo_file, False
741740
)
742741
assert (
743-
(str(e.value))
744-
== "Current generation 1 - previous generation 4 = -3"
742+
(str(e.value)) == "Current generation 1 - previous generation 4 = -3"
745743
" is less than 1. Please ensure the generations given in the first column"
746744
" are correct."
747745
)

tests/test_simgenotype.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
from haptools.data import Data
77
from haptools.__main__ import main
88

9-
109
DATADIR = Path(__file__).parent.joinpath("data")
1110

1211

tests/test_simphenotype.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
GenotypesPLINK,
1717
)
1818

19-
2019
DATADIR = Path(__file__).parent.joinpath("data")
2120

2221

0 commit comments

Comments
 (0)