Skip to content

Commit

Permalink
clean up some bitrot
Browse files Browse the repository at this point in the history
  • Loading branch information
brentp committed Sep 20, 2022
1 parent 49f7d70 commit 0c1a736
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
1 change: 1 addition & 0 deletions nim.cfg
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
-d:noUndefinedBitOpts
-d:nimNoGetRandom
--passC:"-mpopcnt"
--path:"$projectPath/src"
-d:openmp
Expand Down
5 changes: 2 additions & 3 deletions somalier.nimble
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions src/somalierpkg/ancestry.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
6 changes: 3 additions & 3 deletions src/somalierpkg/relate.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 0c1a736

Please sign in to comment.