Skip to content

Commit

Permalink
NimaGen 29-plex (#134)
Browse files Browse the repository at this point in the history
  • Loading branch information
standage committed Aug 18, 2023
1 parent 5521ef7 commit 292ef21
Show file tree
Hide file tree
Showing 28 changed files with 111,212 additions and 101,725 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
microhapdb/_version.py export-subst
notebooks/*.ipynb linguist-documentation
dbbuild/sources/auton2015/scripts/infocalc linguist-vendored
dbbuild/legacy/sources/1kgp/infocalc linguist-vendored
2,178 changes: 1,112 additions & 1,066 deletions dbbuild/build-summary.txt

Large diffs are not rendered by default.

Binary file modified dbbuild/frequency.csv.gz
Binary file not shown.
4 changes: 2 additions & 2 deletions dbbuild/indels.csv
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Marker,VariantIndex,Refr,Alt
mh01ZBF-002,0,T,TT
mh02FHL-003.v3,3,A,AC;ACC
mh02FHL-006.v2,33,T,TA
mh02FHL-003,3,A,AC;ACC
mh02FHL-006,33,T,TA
mh02ZBF-001,2,C,CC
mh03FHL-003.v1,1,AT,A
mh03ZBF-001,0,CAATCAATCAA,CAATCAA
Expand Down
2 changes: 1 addition & 1 deletion dbbuild/lib/interval.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def check(self):
loci = set([m.locus for m in interval.data])
if len(loci) == 1:
continue
markers = sorted(interval.data, key=lambda m: m.sortkey)
markers = sorted(interval.data, key=lambda m: m.sources[0].sortkey)
for marker in markers[1:]:
if marker.name != markers[0].name and marker.name not in self.mergeables:
self.mergeables[marker.name] = markers[0].name
Expand Down
10 changes: 10 additions & 0 deletions dbbuild/lib/marker.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
# -------------------------------------------------------------------------------------------------

from .variant import VariantList
from itertools import chain
import pandas as pd


Expand Down Expand Up @@ -178,6 +179,15 @@ def overlaps(self, other):
same_chrom = self.chrom_num == other.chrom_num
return same_chrom and self.start <= other.end and self.end >= other.start

def rsid_union(self, *others):
rsids = set(self.rsids)
for other in others:
rsids |= set(other.rsids)
for rsid in rsids:
for marker in chain([self], others):
if rsid not in marker.rsids:
marker.rsids.append(rsid)

@property
def sortkey(self):
return self.chrom_num, self.span, self.name
Expand Down
Loading

0 comments on commit 292ef21

Please sign in to comment.