Skip to content

Commit

Permalink
feat: initial implementation of ACMG rules for DEL/loss (#1) (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
holtgrewe authored Nov 14, 2023
1 parent 8157751 commit 62d763f
Show file tree
Hide file tree
Showing 150 changed files with 5,561 additions and 5 deletions.
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
tests/**/hgnc.tsv filter=lfs diff=lfs merge=lfs -text
tests/**/*.tsv filter=lfs diff=lfs merge=lfs -text
tests/**/*.bin* filter=lfs diff=lfs merge=lfs -text
tests/**/rocksdb/** filter=lfs diff=lfs merge=lfs -text
15 changes: 15 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ jobs:
override: true
components: rustfmt

- name: Setup protoc
uses: arduino/[email protected]
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Check format
run: |
cargo fmt -- --check
Expand All @@ -39,6 +44,11 @@ jobs:
override: true
components: clippy

- name: Setup protoc
uses: arduino/[email protected]
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Lint with clippy
uses: actions-rs/clippy-check@v1
with:
Expand All @@ -59,6 +69,11 @@ jobs:
toolchain: stable
override: true

- name: Setup protoc
uses: arduino/[email protected]
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

- uses: Swatinem/rust-cache@v2

- name: Run cargo-tarpaulin
Expand Down
22 changes: 20 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,39 @@ name = "scarus"
path = "src/main.rs"

[dependencies]
annonars = "0.24.5"
anyhow = "1.0"
bio = "1.4.0"
biocommons-bioutils = "0.1.4"
clap-verbosity-flag = "2.0"
clap = { version = "4.4", features = ["derive", "help"] }
csv = "1.3.0"
displaydoc = "0.2.4"
hgvs = "0.13.2"
itertools = "0.11.0"
log = "0.4"
mehari = "0.17"
rustc-hash = "1.1"
rustix = "=0.38.21" # TODO: remove pin
serde_json = "1.0"
serde = { version = "1.0", features = ["serde_derive"] }
serde_with = { version = "3.3", features = ["indexmap_2"] }
thiserror = "1.0"
tokio = { version = "1.33", features = ["full"] }
tracing = "0.1"
tracing-subscriber = "0.3"
rocksdb = { version = "0.21.0", features = ["multi-threaded-cf"] }
prost = "0.12.1"

[dev-dependencies]
anyhow = "1.0"
assert-eq-float = "0.1.3"
clap-verbosity-flag = {version = "2.0"}
clap = { version = "4.1", features = ["derive", "env"] }
env_logger = "0.10"
insta = { version = "1.34", features = ["yaml"] }
pretty_assertions = "1.3"
rstest = "0.18.2"
serde_test = "1.0"
temp_testdir = "0.2"
test-log = "0.2"
tracing-subscriber = {version = "0.3" }
tracing-test = "0.2"
41 changes: 41 additions & 0 deletions src/common/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,44 @@ pub struct Args {
#[clap(flatten)]
pub verbose: Verbosity<InfoLevel>,
}

/// Assembly to be passed on the command line.
#[derive(
Debug,
Clone,
Copy,
PartialEq,
Eq,
PartialOrd,
Ord,
clap::ValueEnum,
serde::Deserialize,
serde::Serialize,
)]
pub enum Assembly {
/// GRCh37
Grch37,
/// GRCh38
Grch38,
}

impl From<Assembly> for biocommons_bioutils::assemblies::Assembly {
fn from(val: Assembly) -> Self {
match val {
// GRCh37p10 is the first one with chrMT.
Assembly::Grch37 => biocommons_bioutils::assemblies::Assembly::Grch37p10,
// All canonical contigs including chrMT are in GRCh38.
Assembly::Grch38 => biocommons_bioutils::assemblies::Assembly::Grch38,
}
}
}

impl From<biocommons_bioutils::assemblies::Assembly> for Assembly {
fn from(val: biocommons_bioutils::assemblies::Assembly) -> Self {
match val {
biocommons_bioutils::assemblies::Assembly::Grch37 => Assembly::Grch37,
biocommons_bioutils::assemblies::Assembly::Grch37p10 => Assembly::Grch37,
biocommons_bioutils::assemblies::Assembly::Grch38 => Assembly::Grch38,
}
}
}
4 changes: 2 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
//! Main entry point for Scarus application.

#![deny(clippy::pedantic)]
// #![deny(clippy::pedantic)]
#![allow(clippy::must_use_candidate)]
#![allow(clippy::module_name_repetitions)]
#![warn(missing_docs)]
// #![warn(missing_docs)]

use clap::{Parser, Subcommand};

Expand Down
Loading

0 comments on commit 62d763f

Please sign in to comment.