You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Allow separate upstream and downstream gene window flanks #45
I noticed, that the gene window is always symmetric: SNPs are taken from tx_start - window to tx_end + window. It's common to want different flanks, e.g. more upstream to cover promoter regions (MAGMA supports this with window=up,down). Currently asymmetric flanks are only possible using a custom mapping file. After benchmarking I noticed, that for the same SNP sets window=10000 is much more time and memory efficient than passing them in a custom mapping file (see plot).
Proposal: let window also accept a tuple (upstream, downstream), e.g. chi2sum(window=(35000, 10000)). An int keeps today's symmetric behaviour. Upstream and downstream follow the gene's strand from the annotation (+/1 or -/-1; anything else counts as +). The repeated G[1]-self._window, G[2]+self._window expressions in genescorer.py and xscorer.py would move into one helper.
Activity