Skip to content

Commit 621bf1e

Browse files
committed
refactored the parameter interface
1 parent 58db207 commit 621bf1e

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

conda/meta.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package:
22
name: smcpp
3-
version: {{ GIT_DESCRIBE_TAG.lstrip("v") }}
3+
version: {{ environ['GIT_DESCRIBE_TAG'].lstrip("v") }}
44

55
source:
66
git_url: ../

conda/run_test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ set -e
44
$SMC vcf2smc -v example/example.vcf.gz /tmp/example.1.smc.gz 1 msp1:msp_0,msp_1,msp_2
55
$SMC vcf2smc -d msp_0 msp_0 example/example.vcf.gz /tmp/example.2.smc.gz 1 msp2:msp_0,msp_3,msp_4
66
$SMC vcf2smc -d msp_1 msp_1 example/example.vcf.gz /tmp/example.12.smc.gz 1 msp1:msp_1,msp_2 msp2:msp_3,msp_4,msp_0
7-
$SMC estimate -o /tmp/out/1 --unfold --knots 5 --no-multi --em-iterations 1 1.25e-8 /tmp/example.1.smc.gz
7+
$SMC estimate -o /tmp/out/1 --unfold --knots 5 --em-iterations 1 1.25e-8 /tmp/example.1.smc.gz
88
$SMC estimate -p 0.01 -r 1e-8 -o /tmp/out/2 --knots 5 --em-iterations 1 1.25e-8 /tmp/example.2.smc.gz
99
$SMC split -o /tmp/out/split --em-iterations 1 \
1010
/tmp/out/1/model.final.json \

smcpp/commands/vcf2smc.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,10 +158,11 @@ def rec2gt(rec):
158158
ref = rec.alleles[0]
159159
for di in dist:
160160
for d, i in di:
161-
if len(rec.samples[d]) != 2:
161+
if len(rec.samples[d].alleles) != 2:
162162
raise RuntimeError(
163163
"Expected a diploid genotype at position {} "
164-
"for individual {} but found:\n{}".format(rec.pos, d, rec))
164+
"for individual {} but found:\n{}".format(rec.pos, d,
165+
list(rec.samples[d].alleles)))
165166
da = [[rec.samples[d].alleles[i]
166167
for d, i in di] for di in dist]
167168
a = [sum([x != ref for x in d])

0 commit comments

Comments
 (0)