From 0c1a736a5186e7e2d1d2f5a57751934771090ca4 Mon Sep 17 00:00:00 2001 From: Brent Pedersen Date: Tue, 20 Sep 2022 17:00:51 -0600 Subject: [PATCH] clean up some bitrot --- nim.cfg | 1 + somalier.nimble | 5 ++--- src/somalierpkg/ancestry.nim | 4 ++-- src/somalierpkg/relate.nim | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/nim.cfg b/nim.cfg index 28d4b3a..08e267a 100644 --- a/nim.cfg +++ b/nim.cfg @@ -1,4 +1,5 @@ -d:noUndefinedBitOpts +-d:nimNoGetRandom --passC:"-mpopcnt" --path:"$projectPath/src" -d:openmp diff --git a/somalier.nimble b/somalier.nimble index 539b5e9..2ebb505 100644 --- a/somalier.nimble +++ b/somalier.nimble @@ -10,12 +10,11 @@ license = "MIT" # Dependencies requires "https://github.com/brentp/zip#dev" -requires "nim >= 1.2.0", "hts >= 0.3.20", "https://github.com/brentp/pedfile >= 0.0.3", "https://github.com/brentp/hileup", "argparse==0.10.1", "lapper", "arraymancer#head" +requires "nim >= 1.2.0", "hts >= 0.3.20", "https://github.com/brentp/pedfile >= 0.0.3", "https://github.com/brentp/hileup", "argparse >=0.10.1 & < 0.10.2", "lapper", "arraymancer#head" requires "https://github.com/brentp/slivar#head" srcDir = "src" -#bin = @["./somalier"] -#bin = @["somalier"] +bin = @["somalier"] task test, "run the tests": exec "nim c -d:useSysAssert -d:useGcAssert --lineDir:on --debuginfo -r tests/test_groups" diff --git a/src/somalierpkg/ancestry.nim b/src/somalierpkg/ancestry.nim index ea8e08e..429b7f3 100644 --- a/src/somalierpkg/ancestry.nim +++ b/src/somalierpkg/ancestry.nim @@ -174,9 +174,9 @@ proc ancestry_main*() = t_proj = T * res.components X = ctx.variable t_proj - network ctx, AncestryNet: + network AncestryNet: layers: - x: Input([1, t_proj.shape[1]]) + #x: Input([1, t_proj.shape[1]]) fc1: Linear(t_proj.shape[1], nHidden) classifier: Linear(nHidden, nOut) diff --git a/src/somalierpkg/relate.nim b/src/somalierpkg/relate.nim index e42d9c8..ff42e84 100644 --- a/src/somalierpkg/relate.nim +++ b/src/somalierpkg/relate.nim @@ -595,14 +595,14 @@ proc remove_spurious_parent_ids(final:var relation_matrices, L:SampleLooker, sta proc add_siblings(final:var relation_matrices, stats: seq[Stat4], gt_counts: array[5, seq[uint16]], L:var SampleLooker) = for sample_name, sib_names in L.sib_pairs: let isample = L.sample_table[sample_name] - let iset = sib_names.toSet + let iset = sib_names.toHashSet let i = isample.i if i >= 0 and not gt_counts.high_quality(i): continue var ipids = [isample.paternal_id, isample.maternal_id] let parent_order = ["dad", "mom"] for sn in sib_names: - let jset = L.sib_pairs.getOrDefault(sn, @[]).toSet + let jset = L.sib_pairs.getOrDefault(sn, @[]).toHashSet # require that they share the same siblings if iset.symmetricDifference(jset).len != 2: continue @@ -924,7 +924,7 @@ proc rel_main*() = opts.extracted.update_with_glob stderr.write_line &"[somalier] starting read of {opts.extracted.len} samples" - if opts.extracted.len == 0 or (opts.extracted.len == 1 and not existsFile(opts.extracted[0])): + if opts.extracted.len == 0 or (opts.extracted.len == 1 and not fileExists(opts.extracted[0])): echo p.help quit "[somalier] specify at least 1 extracted somalier file" var