Skip to content

Allow separate upstream and downstream gene window flanks #45

Backlog

Description

@leoxnard

Hi all,

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.

Thanks!

worker_scaling_pascalx_16w

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions