Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
holtgrewe committed Dec 28, 2023
1 parent c33cbfc commit e2a4ce6
Show file tree
Hide file tree
Showing 75 changed files with 14,903 additions and 4 deletions.
29 changes: 25 additions & 4 deletions src/freqs/cli/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,13 @@ mod test {
}

#[rstest::rstest]
#[case("1:55516885:G:A", "grch37", "2.1")]
#[case("1:55039933:G:A", "grch38", "4.0")]
fn smoke_query_exomes_var_single_match_chr_1(
#[with("1:55516885:G:A", "grch37", "2.1")] args_freqs: ArgsFreqs,
#[case] _variant: &str,
#[case] _genome: &str,
#[case] _version: &str,
#[with(_variant, _genome, _version)] args_freqs: ArgsFreqs,
) -> Result<(), anyhow::Error> {
let ArgsFreqs {
common_args,
Expand All @@ -261,8 +266,13 @@ mod test {
}

#[rstest::rstest]
#[case("X:69902557:G:T", "grch37", "2.1")]
#[case("X:17434:A:AC", "grch38", "4.0")]
fn smoke_query_exomes_var_single_match_chr_x(
#[with("X:69902557:G:T", "grch37", "2.1")] args_freqs: ArgsFreqs,
#[case] _variant: &str,
#[case] _genome: &str,
#[case] _version: &str,
#[with(_variant, _genome, _version)] args_freqs: ArgsFreqs,
) -> Result<(), anyhow::Error> {
let ArgsFreqs {
common_args,
Expand All @@ -285,8 +295,13 @@ mod test {
}

#[rstest::rstest]
#[case("Y:4967199:G:T", "grch37", "2.1")]
#[case("Y:2782947:C:T", "grch38", "4.0")]
fn smoke_query_exomes_var_single_match_chr_y(
#[with("Y:4967199:G:T", "grch37", "2.1")] args_freqs: ArgsFreqs,
#[case] _variant: &str,
#[case] _genome: &str,
#[case] _version: &str,
#[with(_variant, _genome, _version)] args_freqs: ArgsFreqs,
) -> Result<(), anyhow::Error> {
let ArgsFreqs {
common_args,
Expand All @@ -309,8 +324,13 @@ mod test {
}

#[rstest::rstest]
#[case("M:11:C:T", "grch37", "2.1")]
#[case("M:11:C:T", "grch38", "4.0")]
fn smoke_query_exomes_var_single_match_chr_mt(
#[with("M:11:C:T", "grch37", "2.1")] args_freqs: ArgsFreqs,
#[case] _variant: &str,
#[case] _genome: &str,
#[case] _version: &str,
#[with(_variant, _genome, _version)] args_freqs: ArgsFreqs,
) -> Result<(), anyhow::Error> {
let ArgsFreqs {
common_args,
Expand All @@ -334,6 +354,7 @@ mod test {

#[rstest::rstest]
#[case("1:55516885:G:TT", "grch37", "2.1")]
#[case("1:55516885:G:TT", "grch38", "4.0")]
fn smoke_query_exomes_var_single_nomatch(
#[case] _variant: &str,
#[case] _genome: &str,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
source: src/freqs/cli/query.rs
expression: "&out_data"
---
{"gnomad_exomes":{"an":128256,"ac_hom":0,"ac_het":1},"gnomad_genomes":{"an":0,"ac_hom":0,"ac_het":0}}

Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
source: src/freqs/cli/query.rs
expression: "&out_data"
---
{"gnomad_exomes":{"an":586534,"ac_hom":0,"ac_het":1},"gnomad_genomes":{"an":0,"ac_hom":0,"ac_het":0}}

Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
source: src/freqs/cli/query.rs
expression: "&out_data"
---
{"gnomad_mtdna":{"an":0,"ac_hom":0,"ac_het":0},"helixmtdb":{"an":196554,"ac_hom":0,"ac_het":1}}

Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
source: src/freqs/cli/query.rs
expression: "&out_data"
---
{"gnomad_mtdna":{"an":0,"ac_hom":0,"ac_het":0},"helixmtdb":{"an":196554,"ac_hom":0,"ac_het":1}}

Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
source: src/freqs/cli/query.rs
expression: "&out_data"
---
{"gnomad_exomes":{"an":179321,"ac_hom":0,"ac_het":1,"ac_hemi":0},"gnomad_genomes":{"an":0,"ac_hom":0,"ac_het":0,"ac_hemi":0}}

Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
source: src/freqs/cli/query.rs
expression: "&out_data"
---
{"gnomad_exomes":{"an":0,"ac_hom":0,"ac_het":0,"ac_hemi":0},"gnomad_genomes":{"an":45836,"ac_hom":0,"ac_het":0,"ac_hemi":0}}

Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
source: src/freqs/cli/query.rs
expression: "&out_data"
---
{"gnomad_exomes":{"an":67766,"ac_hom":0,"ac_het":0,"ac_hemi":1},"gnomad_genomes":{"an":0,"ac_hom":0,"ac_het":0,"ac_hemi":0}}

Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
source: src/freqs/cli/query.rs
expression: "&out_data"
---
{"gnomad_exomes":{"an":0,"ac_hom":0,"ac_het":0,"ac_hemi":0},"gnomad_genomes":{"an":33081,"ac_hom":0,"ac_het":0,"ac_hemi":1}}

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
source: src/freqs/cli/query.rs
expression: "&out_data"
---

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
source: src/freqs/cli/query.rs
expression: "&out_data"
---

70 changes: 70 additions & 0 deletions tests/freqs/grch37/v2.1/bootstrap.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
#!/usr/bin/env bash

set -euo pipefail
set -x

if [[ "${EXTRACT-false}" == "true" ]]; then
EXOMES=https://storage.googleapis.com/gcp-public-data--gnomad/release/2.1.1/vcf/exomes
tabix --print-header \
$EXOMES/gnomad.exomes.r2.1.1.sites.1.vcf.bgz \
1:55505599-55516888 \
> tests/freqs/grch37/v2.1/gnomad-exomes.1.vcf
bgzip -c tests/freqs/grch37/v2.1/gnomad-exomes.1.vcf \
> tests/freqs/grch37/v2.1/gnomad-exomes.1.vcf.bgz
tabix -f tests/freqs/grch37/v2.1/gnomad-exomes.1.vcf.bgz

tabix --print-header \
$EXOMES/gnomad.exomes.r2.1.1.sites.X.vcf.bgz \
X:69902557-69902557 \
> tests/freqs/grch37/v2.1/gnomad-exomes.X.vcf
bgzip -c tests/freqs/grch37/v2.1/gnomad-exomes.X.vcf \
> tests/freqs/grch37/v2.1/gnomad-exomes.X.vcf.bgz
tabix -f tests/freqs/grch37/v2.1/gnomad-exomes.X.vcf.bgz

tabix --print-header \
$EXOMES/gnomad.exomes.r2.1.1.sites.Y.vcf.bgz \
Y:4967199-4967199 \
> tests/freqs/grch37/v2.1/gnomad-exomes.Y.vcf
bgzip -c tests/freqs/grch37/v2.1/gnomad-exomes.Y.vcf \
> tests/freqs/grch37/v2.1/gnomad-exomes.Y.vcf.bgz
tabix -f tests/freqs/grch37/v2.1/gnomad-exomes.Y.vcf.bgz

GENOMES=https://storage.googleapis.com/gcp-public-data--gnomad/release/2.1.1/vcf/genomes
tabix --print-header \
$GENOMES/gnomad.genomes.r2.1.1.sites.1.vcf.bgz \
1:55505599-55505599 \
> tests/freqs/grch37/v2.1/gnomad-genomes.1.vcf
bgzip -c tests/freqs/grch37/v2.1/gnomad-genomes.1.vcf \
> tests/freqs/grch37/v2.1/gnomad-genomes.1.vcf.bgz
tabix -f tests/freqs/grch37/v2.1/gnomad-genomes.1.vcf.bgz

tabix --print-header \
$GENOMES/gnomad.genomes.r2.1.1.sites.X.vcf.bgz \
X:69902634-69902634 \
> tests/freqs/grch37/v2.1/gnomad-genomes.X.vcf
bgzip -c tests/freqs/grch37/v2.1/gnomad-genomes.X.vcf \
> tests/freqs/grch37/v2.1/gnomad-genomes.X.vcf.bgz
tabix -f tests/freqs/grch37/v2.1/gnomad-genomes.X.vcf.bgz
fi

rm -rf tests/freqs/grch37/v2.1/example/freqs.db
cargo run --all-features -- \
freqs import \
-vvv \
--genome-release grch37 \
--path-out-rocksdb tests/freqs/grch37/v2.1/example/freqs.db \
\
--gnomad-exomes-version "2.1.1" \
--path-gnomad-exomes-auto tests/freqs/grch37/v2.1/gnomad-exomes.1.vcf.bgz \
--path-gnomad-exomes-xy tests/freqs/grch37/v2.1/gnomad-exomes.X.vcf.bgz \
--path-gnomad-exomes-xy tests/freqs/grch37/v2.1/gnomad-exomes.Y.vcf.bgz \
\
--gnomad-genomes-version "2.1.1" \
--path-gnomad-genomes-auto tests/freqs/grch37/v2.1/gnomad-genomes.1.vcf.bgz \
--path-gnomad-genomes-xy tests/freqs/grch37/v2.1/gnomad-genomes.X.vcf.bgz \
\
--gnomad-mtdna-version "3.1.1" \
--path-gnomad-mtdna tests/freqs/grch37/v2.1/reading/gnomad.chrM.vcf.bgz \
\
--helixmtdb-version "20200327" \
--path-helixmtdb tests/freqs/grch37/v2.1/reading/helix.chrM.vcf.bgz
3 changes: 3 additions & 0 deletions tests/freqs/grch37/v2.1/example/freqs.db/000018.sst
Git LFS file not shown
3 changes: 3 additions & 0 deletions tests/freqs/grch37/v2.1/example/freqs.db/000020.sst
Git LFS file not shown
3 changes: 3 additions & 0 deletions tests/freqs/grch37/v2.1/example/freqs.db/000022.sst
Git LFS file not shown
3 changes: 3 additions & 0 deletions tests/freqs/grch37/v2.1/example/freqs.db/000024.sst
Git LFS file not shown
3 changes: 3 additions & 0 deletions tests/freqs/grch37/v2.1/example/freqs.db/CURRENT
Git LFS file not shown
3 changes: 3 additions & 0 deletions tests/freqs/grch37/v2.1/example/freqs.db/IDENTITY
Git LFS file not shown
Empty file.
3 changes: 3 additions & 0 deletions tests/freqs/grch37/v2.1/example/freqs.db/LOG
Git LFS file not shown
3 changes: 3 additions & 0 deletions tests/freqs/grch37/v2.1/example/freqs.db/MANIFEST-000005
Git LFS file not shown
3 changes: 3 additions & 0 deletions tests/freqs/grch37/v2.1/example/freqs.db/OPTIONS-000013
Git LFS file not shown
3 changes: 3 additions & 0 deletions tests/freqs/grch37/v2.1/example/freqs.db/OPTIONS-000015
Git LFS file not shown
Loading

0 comments on commit e2a4ce6

Please sign in to comment.