-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* draft streaming with generators * set up effect types * profiling improvements * fix output * check for duplicates * add liftover * update dependencies and set up pre-commit * complain when linting fails * fix linting * support wide files * add log * fix tests and liftover * fix test * sqlite support and add log data * fix tests * fix tests * fixes to make old and new output consistent * update tests * drop parallel gzip and --threads * create ScoreVariant and EffectType classes * review comments * add type hints * remove coordinates from mandatory fields * fix old scoring files * check effect alleles and compelx scoring files * don't access __annotations__ directly * remove logger * warn about complex files and variant mismatch * refactor scorevariant from userdict to class with __slots__ * fix __repr__ and type hints * add pyarrow support * add license data to log * add custom exceptions * add custom exit code * move class definitions * rename * update effect allele class * tidy up docstring * add docstrings to pytest * fix pyproject * Make sure that IID isn't converted to numeric during aggreation Signed-off-by: smlmbrt <sam.a.lambert@gmail.com> * bump minor version * dynamically set is_snp * remove samplesheet package * delete samplesheet tests * fix liftover * set up local venv * fix liftover test * improve comment --------- Signed-off-by: smlmbrt <sam.a.lambert@gmail.com> Co-authored-by: smlmbrt <sam.a.lambert@gmail.com>
- Loading branch information
Showing
32 changed files
with
4,200 additions
and
1,182 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
repos: | ||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
# Ruff version. | ||
rev: v0.1.3 | ||
hooks: | ||
- id: ruff | ||
args: [--fix, --exit-non-zero-on-fix] | ||
- id: ruff-format |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,25 @@ | ||
from enum import Enum, auto | ||
from enum import Enum | ||
|
||
|
||
class GenomeBuild(Enum): | ||
GRCh37 = auto() | ||
GRCh38 = auto() | ||
GRCh37 = "GRCh37" | ||
GRCh38 = "GRCh38" | ||
# just included to handle older files, incompatible unless harmonised: | ||
NCBI36 = "NCBI36" # ew | ||
|
||
def __str__(self): | ||
return str(self.value) | ||
|
||
@classmethod | ||
def from_string(cls, build): | ||
match build: | ||
case "GRCh37" | "hg19": | ||
return cls(GenomeBuild.GRCh37) | ||
case "GRCh38" | "hg38": | ||
return cls(GenomeBuild.GRCh38) | ||
case "NR": | ||
return None | ||
case "NCBI36" | "hg18": | ||
return cls(GenomeBuild.NCBI36) | ||
case _: | ||
raise Exception(f"Can't match {build=}") |
Oops, something went wrong.