Skip to content

Commit

Permalink
close #123
Browse files Browse the repository at this point in the history
  • Loading branch information
brentp committed Sep 20, 2023
1 parent de50b1c commit 7740a33
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
v0.2.19
=======
+ [relate/infer] fix check that would prevent some inference (#123)

v0.2.18
=======
+ [find_sites] handle empty alternate alleles (#121)
Expand Down
2 changes: 1 addition & 1 deletion somalier.nimble
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#import somalierpkg/version as _

version = "0.2.18" #somalierVersion
version = "0.2.19" #somalierVersion
author = "Brent Pedersen"
description = "sample-swap checking directly on BAMs/CRAMs for cancer data"
license = "MIT"
Expand Down
6 changes: 5 additions & 1 deletion src/somalierpkg/relate.nim
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,10 @@ proc high_quality(gt_counts: array[5, seq[uint16]], i:int): bool {.inline.} =
result = gt_counts[4][i].float / (gt_counts[0][i] + gt_counts[1][i] + gt_counts[2][i] + gt_counts[3][i] + gt_counts[4][i]).float < 0.06
if not result:
return false
result = gt_counts[2][i].float / gt_counts[1][i].float > 0.7

# should have fewer hom-alts[2] than hets[1]
result = gt_counts[2][i].float / gt_counts[1][i].float < 0.7


proc samples_have_y_depth(stats: seq[Stat4]): bool =
var n = 0
Expand Down Expand Up @@ -821,6 +824,7 @@ proc write_ped(fh:File, final: var relation_matrices, stats: seq[Stat4], gt_coun
fh.write("X_depth_mean\tX_n\tX_hom_ref\tX_het\tX_hom_alt\t")
fh.write("Y_depth_mean\tY_n\n")


if infer:
final.remove_spurious_parent_ids(L, stats)
for i, sample_name in L.sample_names:
Expand Down
2 changes: 1 addition & 1 deletion src/somalierpkg/version.nim
Original file line number Diff line number Diff line change
@@ -1 +1 @@
let somalierVersion* = "0.2.18"
let somalierVersion* = "0.2.19"

0 comments on commit 7740a33

Please sign in to comment.