Skip to content

Commit 541f896

Browse files
Miscellaneous changes
1 parent 3be37bc commit 541f896

4 files changed

Lines changed: 7 additions & 10 deletions

File tree

examples/1kg_conf.toml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
name = "1kgp_chr20"
88
path = "data/1kgp_chr20.vcz"
99
# First 5Mb for development
10-
regions = "chr20:1-10000000"
10+
# regions = "chr20:1-10000000"
1111
include = 'TYPE="snp"'
1212

1313
# wget https://ftp.ensembl.org/pub/release-115/variation/vcf/homo_sapiens/homo_sapiens-chr20.vcf.gz
@@ -24,9 +24,7 @@ name = "ancestors"
2424
path = "data/ancestors.vcz" # output path for the ancestor store
2525
sources = ["1kgp_chr20"] # which source(s) to build from
2626
max_gap_length = 500_000
27-
genotype_encoding = "one_bit"
28-
# samples_chunk_size = 1000 # default: 1000 (ancestor dimension)
29-
# variants_chunk_size = 1000 # default: 1000 (site dimension)
27+
samples_chunk_size = 100
3028

3129
[match]
3230
output = "data/output.trees" # output tree sequence path

tsinfer/config.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@
4141
# Default constants
4242
# ---------------------------------------------------------------------------
4343
DEFAULT_MAX_GAP_LENGTH = 500_000
44-
DEFAULT_SAMPLES_CHUNK_SIZE = 1000
45-
DEFAULT_VARIANTS_CHUNK_SIZE = 1000
44+
DEFAULT_SAMPLES_CHUNK_SIZE = 100
45+
DEFAULT_VARIANTS_CHUNK_SIZE = 50_000
4646
DEFAULT_GENOTYPE_ENCODING = 0 # 0 = eight-bit, 1 = one-bit
4747
DEFAULT_COMPRESSOR = "zstd"
4848
DEFAULT_COMPRESSION_LEVEL = 7

tsinfer/pipeline.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -502,8 +502,8 @@ def match(
502502
if progress:
503503
pbar = tqdm.tqdm(
504504
total=len(job_list),
505-
desc=f"Group {gi + 1}/{num_groups}",
506-
unit="haplotypes",
505+
desc=f"Group {gi} ({num_groups})",
506+
unit="haps",
507507
)
508508
results = []
509509
for job, result in match_iter:

tsinfer/vcz.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
import queue
4949
import threading
5050
import time as _time
51+
import warnings
5152
from typing import Any
5253

5354
import numpy as np
@@ -2088,8 +2089,6 @@ def __init__(
20882089
chunks_fit,
20892090
)
20902091
if cb > 0 and chunks_fit < 2:
2091-
import warnings
2092-
20932092
warnings.warn(
20942093
f"Cache can hold fewer than 2 chunks from source "
20952094
f"'{name}' (chunk={cb / (1024 * 1024):.1f} MiB, "

0 commit comments

Comments
 (0)