Hi hail team!
Would it be possible to add an option to make scans inclusive?
With this toy example ht
:
locus transcript observed
1:1 'test' 0
1:2 'test' 1
1:3 'test' 1
1:4 'test2' 1
if I run
ht = ht.annotate(obs_scan=hl.scan.group_by(ht.transcript, hl.scan.sum(ht.observed))
I’d get something like:
locus transcript observed obs_scan
1:1 'test' 0 {}
1:2 'test' 1 {'test': 0}
1:3 'test' 1 {'test': 1}
1:4 'test2' 1 {'test': 2}
would it be possible to add a flag or something similar to make this scan inclusive? Something like:
ht = ht.annotate(obs_scan=hl.scan.group_by(ht.transcript, hl.scan.sum(ht.observed, inclusive=True))
which would produce:
locus transcript observed obs_scan
1:1 'test' 0 {'test': 0}
1:2 'test' 1 {'test': 1}
1:3 'test' 1 {'test': 2}
1:4 'test2' 1 {'test': 2, 'test2': 1}
Thanks in advance!