diff --git a/README.md b/README.md index 92e9763e..52f43719 100644 --- a/README.md +++ b/README.md @@ -14,15 +14,15 @@ They are written in the Rust programming language to speed up the execution of c At the moment, the following sub commands exist: - `db` -- subcommands to build binary (protobuf) database files - - `db to-bin` -- convert text files downloaded by [varfish-db-downloader](https://github.com/bihealth/varfish-db-downloader/) to binary for fast use in query sub commands - - `db mk-inhouse` -- compile per-case structural variant into an in-house database previously created by `db compile` - `seqvars` -- subcommands for processing sequence (aka small/SNV/indel) variants - `seqvars ingest` -- convert single VCF file into internal format for use with `seqvars query` + - `seqvars query` -- perform sequence variant filtration and on-the-fly annotation - `seqvars prefilter` -- limit the result of `seqvars prefilter` by population frequency and/or distance to exon - `seqvars aggregate` -- read through multiple VCF files written by `seqvars ingest` and computes a carrier counts table. - - `seqvars query` -- perform sequence variant filtration and on-the-fly annotation - `strucvars` -- subcommands for processing structural (aka large variants, CNVs, etc.) variants - `strucvars ingest` -- convert one or more structural variant files for use with `strucvars query` + - `strucvars aggregate` -- compile per-case structural variant into an in-house database, to be converted to `.bin` with `strucvars txt-to-bin`. + - `strucvars txt-to-bin` -- convert text files downloaded by [varfish-db-downloader](https://github.com/bihealth/varfish-db-downloader/) to binary for fast use in `strucvars query` commands - `strucvars query` -- perform structural variant filtration and on-the-fly annotation ## Overall Design @@ -39,40 +39,6 @@ The worker will create a result file that can be directly imported by the server Future versions may provide persistently running HTTP/REST servers that provide functionality without startup cost. -## The `db to-bin` Command - -Convert output of [varfish-db-downloader](https://github.com/bihealth/varfish-db-downloader/) to a directory with databases to be used by query commands such as `strucvars query`. - -``` -$ varfish-server-worker db to-bin \ - --input-type {ClinvarSv,StrucvarInhouse,...} \ - --path-input IN.txt \ - --path-output-bin DST.bin -``` - -## The `db mk-inhouse` Command - -Import multiple files created by `strucvars ingest` into a database previously created by `db compile`. -You can specify the files individually. -Paths starting with an at (`@`) character are interpreted as files with lists of paths. -You can mix paths with `@` and without. - -``` -$ varfish-server-worker db mk-inhouse \ - --genome-release {Grch37,Grch38} \ - --path-output-tsv OUT.tsv \ - --path-input-tsvs IN/file1.gts.tsv.gz \ - [--path-input-tsv IN/file1.gts.tsv.gz] \ - -# OR: - -$ varfish-server-worker db mk-inhouse \ - --genome-release {Grch37,Grch38} \ - --path-output-tsv OUT.tsv \ - --path-input-tsvs @IN/path-list.txt \ - [--path-input-tsvs @IN/path-list2.txt] -``` - ## The `seqvars ingest` Command This command takes as the input a single VCF file from a (supported) variant caller and converts it into a file for further querying. @@ -286,6 +252,40 @@ Overall, the command will emit the following header rows in addition to the `##c > It only merges the input VCF files from multiple callers (all files must have the same samples) and converts them into the internal format. > The `INFO/annsv` field is filled by `strucvars query`. +## The `strucvars aggregate` Command + +Import multiple files created by `strucvars ingest` into a database that can be convered to `.bin` with `strucvars txt-to-bin` and then used by `strucvars query`. +You can specify the files individually. +Paths starting with an at (`@`) character are interpreted as files with lists of paths. +You can mix paths with `@` and without. + +``` +$ varfish-server-worker strucvars aggregate \ + --genome-release {Grch37,Grch38} \ + --path-output OUT.tsv \ + --path-input IN/file1.vcf.gz \ + [--path-input IN/file1.vcf.gz] \ + +# OR: + +$ varfish-server-worker db mk-inhouse \ + --genome-release {Grch37,Grch38} \ + --path-output OUT.tsv \ + --path-input @IN/path-list.txt \ + [--path-input @IN/path-list2.txt] +``` + +## The `strucvars txt-to-bin` Command + +Convert output of [varfish-db-downloader](https://github.com/bihealth/varfish-db-downloader/) to a directory with databases to be used by query commands such as `strucvars query`. + +``` +$ varfish-server-worker strucvars txt-to-bin \ + --input-type {ClinvarSv,StrucvarInhouse,...} \ + --path-input IN.txt \ + --path-output-bin DST.bin +``` + # Developer Information This section is only relevant for developers of `varfish-server-worker`. diff --git a/src/common.rs b/src/common.rs index e81cb1b9..9669e613 100644 --- a/src/common.rs +++ b/src/common.rs @@ -511,6 +511,52 @@ where Ok(buffer) } +/// Enum for the supported gene/transcript databases. +#[derive( + serde::Serialize, + serde::Deserialize, + enum_map::Enum, + PartialEq, + Eq, + Clone, + Copy, + Debug, + Default, + strum::EnumString, + strum::Display, +)] +#[serde(rename_all = "lowercase")] +#[strum(serialize_all = "lowercase")] +pub enum Database { + /// RefSeq + #[default] + RefSeq, + /// ENSEMBL + Ensembl, +} + +/// Enum for the supported TADs. +#[derive( + serde::Serialize, + serde::Deserialize, + enum_map::Enum, + PartialEq, + Eq, + Clone, + Copy, + Debug, + Default, + strum::EnumString, + strum::Display, +)] +#[serde(rename_all = "lowercase")] +#[strum(serialize_all = "lowercase")] +pub enum TadSet { + /// hESC + #[default] + Hesc, +} + #[cfg(test)] mod test { use noodles_vcf as vcf; diff --git a/src/db/conf.rs b/src/db/conf.rs deleted file mode 100644 index 38c8c626..00000000 --- a/src/db/conf.rs +++ /dev/null @@ -1,129 +0,0 @@ -//! Code for supporting the database configuration (description) file. - -use clap::ValueEnum; -use enum_map::Enum; -use hgvs::static_data::Assembly; -use serde::{Deserialize, Serialize}; -use strum_macros::EnumString; - -/// Enum for the supported genome releases. -#[derive( - Serialize, - Deserialize, - Enum, - PartialEq, - Eq, - Clone, - Copy, - Debug, - Default, - EnumString, - ValueEnum, - strum::Display, -)] -#[serde(rename_all = "lowercase")] -#[strum(serialize_all = "lowercase")] -pub enum GenomeRelease { - /// GRCh37 - #[default] - Grch37, - /// GRCh38 - Grch38, -} - -impl From for Assembly { - fn from(val: GenomeRelease) -> Self { - match val { - GenomeRelease::Grch37 => Assembly::Grch37p10, - GenomeRelease::Grch38 => Assembly::Grch38, - } - } -} - -/// Enum for the supported gene/transcript databases. -#[derive( - Serialize, - Deserialize, - Enum, - PartialEq, - Eq, - Clone, - Copy, - Debug, - Default, - EnumString, - strum::Display, -)] -#[serde(rename_all = "lowercase")] -#[strum(serialize_all = "lowercase")] -pub enum Database { - /// RefSeq - #[default] - RefSeq, - /// ENSEMBL - Ensembl, -} - -/// Enum for the supported TADs. -#[derive( - Serialize, - Deserialize, - Enum, - PartialEq, - Eq, - Clone, - Copy, - Debug, - Default, - EnumString, - strum::Display, -)] -#[serde(rename_all = "lowercase")] -#[strum(serialize_all = "lowercase")] -pub enum TadSet { - /// hESC - #[default] - Hesc, -} - -/// Enum for the supported gene ID cross-link tables. -#[derive( - Serialize, - Deserialize, - Enum, - PartialEq, - Eq, - Clone, - Copy, - Debug, - Default, - EnumString, - strum::Display, -)] -#[serde(rename_all = "lowercase")] -#[strum(serialize_all = "lowercase")] -pub enum GeneXlink { - /// HGNC (complete for Entrez/NCBI gene IDs) - #[default] - Hgnc, - /// ENSEMBL (complete for ENSEMBL gene IDs) - Ensembl, -} - -/// A relative path to a file with its checksum and specification. -#[derive(Serialize, Deserialize, PartialEq, Debug, Default)] -pub struct DbDef { - /// The (relative) path to the (possibly compressed) text-based file. - pub path: String, - /// Optional MD5 checksum of file at `path`. - pub md5: Option, - /// Optional SHA256 checksum of file at `path`. - pub sha256: Option, - - // The (optional, relative) path to the binary representation (for faster loading). - pub bin_path: Option, - /// Optional MD5 checksum of file at `path_bin`. - pub bin_md5: Option, - /// Optional SHA256 checksum of file at `path_bin`. - pub bin_sha256: Option, -} diff --git a/src/db/mod.rs b/src/db/mod.rs deleted file mode 100644 index b7617e8e..00000000 --- a/src/db/mod.rs +++ /dev/null @@ -1,5 +0,0 @@ -//! Code supporting the `db *` sub commands. - -pub mod conf; -pub mod pbs; -pub mod to_bin; diff --git a/src/main.rs b/src/main.rs index bb8a7c60..acf8bd27 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,7 +1,6 @@ //! VarFish Server Worker main executable pub mod common; -pub mod db; pub mod seqvars; pub mod strucvars; @@ -30,30 +29,12 @@ struct Cli { #[allow(clippy::large_enum_variant)] #[derive(Debug, Subcommand)] enum Commands { - /// Database building related commands. - Db(Db), /// Structural variant related commands. Strucvars(Strucvars), /// Sequence variant related commands. Seqvars(Seqvars), } -/// Parsing of "db *" sub commands. -#[derive(Debug, Args)] -#[command(args_conflicts_with_subcommands = true)] -struct Db { - /// The sub command to run - #[command(subcommand)] - command: DbCommands, -} - -/// Enum supporting the parsing of "db *" sub commands. -#[allow(clippy::large_enum_variant)] -#[derive(Debug, Subcommand)] -enum DbCommands { - ToBin(db::to_bin::cli::Args), -} - /// Parsing of "sv *" sub commands. #[derive(Debug, Args)] #[command(args_conflicts_with_subcommands = true)] @@ -69,6 +50,7 @@ enum StrucvarsCommands { Aggregate(strucvars::aggregate::cli::Args), Ingest(strucvars::ingest::Args), Query(strucvars::query::Args), + TxtToBin(strucvars::txt_to_bin::cli::Args), } /// Parsing of "seqvars *" sub commands. @@ -111,11 +93,6 @@ fn main() -> Result<(), anyhow::Error> { let term = Term::stderr(); tracing::subscriber::with_default(collector, || { match &cli.command { - Commands::Db(db) => match &db.command { - DbCommands::ToBin(args) => { - db::to_bin::cli::run(&cli.common, args)?; - } - }, Commands::Seqvars(seqvars) => match &seqvars.command { SeqvarsCommands::Aggregate(args) => { seqvars::aggregate::run(&cli.common, args)?; @@ -137,6 +114,9 @@ fn main() -> Result<(), anyhow::Error> { StrucvarsCommands::Query(args) => { strucvars::query::run(&cli.common, args)?; } + StrucvarsCommands::TxtToBin(args) => { + strucvars::txt_to_bin::cli::run(&cli.common, args)?; + } }, } diff --git a/src/strucvars/mod.rs b/src/strucvars/mod.rs index c03f927b..da33e784 100644 --- a/src/strucvars/mod.rs +++ b/src/strucvars/mod.rs @@ -1,3 +1,5 @@ pub mod aggregate; pub mod ingest; +pub mod pbs; pub mod query; +pub mod txt_to_bin; diff --git a/src/db/pbs.rs b/src/strucvars/pbs.rs similarity index 100% rename from src/db/pbs.rs rename to src/strucvars/pbs.rs diff --git a/src/strucvars/query/bgdbs.rs b/src/strucvars/query/bgdbs.rs index 872ec1a8..ffc15cff 100644 --- a/src/strucvars/query/bgdbs.rs +++ b/src/strucvars/query/bgdbs.rs @@ -10,8 +10,8 @@ use strum_macros::{Display, EnumString}; use tracing::info; use crate::{ - common::{trace_rss_now, CHROMS}, - db::{conf::GenomeRelease, pbs}, + common::{trace_rss_now, GenomeRelease, CHROMS}, + strucvars::pbs, }; use super::{ diff --git a/src/strucvars/query/clinvar.rs b/src/strucvars/query/clinvar.rs index 1adf2200..8db02b1d 100644 --- a/src/strucvars/query/clinvar.rs +++ b/src/strucvars/query/clinvar.rs @@ -6,10 +6,7 @@ use prost::Message; use thousands::Separable; use tracing::{info, warn}; -use crate::{ - common::{reciprocal_overlap, CHROMS}, - db::conf::GenomeRelease, -}; +use crate::common::{reciprocal_overlap, GenomeRelease, CHROMS}; use super::{ records::ChromRange, diff --git a/src/strucvars/query/genes.rs b/src/strucvars/query/genes.rs index 11509002..4a926d85 100644 --- a/src/strucvars/query/genes.rs +++ b/src/strucvars/query/genes.rs @@ -9,11 +9,8 @@ use serde::Deserialize; use tracing::info; use crate::{ - common::CHROMS, - db::{ - conf::{Database, GenomeRelease}, - pbs, - }, + common::{Database, GenomeRelease, CHROMS}, + strucvars::pbs, }; /// Alias for the interval tree that we use. diff --git a/src/strucvars/query/interpreter.rs b/src/strucvars/query/interpreter.rs index 69bb4aee..1bf29763 100644 --- a/src/strucvars/query/interpreter.rs +++ b/src/strucvars/query/interpreter.rs @@ -380,7 +380,7 @@ mod tests { use mehari::annotate::strucvars::csq::interface::StrandOrientation; use crate::{ - db::conf::Database, + common::Database, strucvars::query::schema::{CallInfo, GenomicRegion, GenotypeChoice, GenotypeCriteria}, }; diff --git a/src/strucvars/query/masked.rs b/src/strucvars/query/masked.rs index 0e4e1240..8a678714 100644 --- a/src/strucvars/query/masked.rs +++ b/src/strucvars/query/masked.rs @@ -8,8 +8,8 @@ use prost::Message; use tracing::info; use crate::{ - common::{trace_rss_now, CHROMS}, - db::{conf::GenomeRelease, pbs}, + common::{trace_rss_now, GenomeRelease, CHROMS}, + strucvars::pbs, }; use super::{ diff --git a/src/strucvars/query/mod.rs b/src/strucvars/query/mod.rs index d313fcdb..ddbffbe0 100644 --- a/src/strucvars/query/mod.rs +++ b/src/strucvars/query/mod.rs @@ -32,7 +32,7 @@ use uuid::Uuid; use crate::{ common::{build_chrom_map, numeric_gene_id, trace_rss_now}, - db::conf::{Database, GenomeRelease, TadSet as TadSetChoice}, + common::{Database, GenomeRelease, TadSet as TadSetChoice}, strucvars::query::{ interpreter::QueryInterpreter, pathogenic::Record as KnownPathogenicRecord, records::StructuralVariant as RecordSv, schema::CaseQuery, diff --git a/src/strucvars/query/pathogenic.rs b/src/strucvars/query/pathogenic.rs index ef402574..fec84d1b 100644 --- a/src/strucvars/query/pathogenic.rs +++ b/src/strucvars/query/pathogenic.rs @@ -9,8 +9,8 @@ use serde::Serialize; use tracing::{info, warn}; use crate::{ + common::GenomeRelease, common::{build_chrom_map, CHROMS}, - db::conf::GenomeRelease, }; use super::{ diff --git a/src/strucvars/query/schema.rs b/src/strucvars/query/schema.rs index 38ca54cc..f7585625 100644 --- a/src/strucvars/query/schema.rs +++ b/src/strucvars/query/schema.rs @@ -1,6 +1,6 @@ //! Supporting code for SV query definition. -use crate::db::conf::{Database, TadSet}; +use crate::common::{Database, TadSet}; use indexmap::IndexMap; use mehari::annotate::strucvars::csq::interface::StrandOrientation; use regex::Regex; diff --git a/src/strucvars/query/tads.rs b/src/strucvars/query/tads.rs index d44d397c..b5a0f422 100644 --- a/src/strucvars/query/tads.rs +++ b/src/strucvars/query/tads.rs @@ -9,7 +9,7 @@ use tracing::info; use crate::{ common::{build_chrom_map, CHROMS}, - db::conf::{GenomeRelease, TadSet as TadSetChoice}, + common::{GenomeRelease, TadSet as TadSetChoice}, }; use super::{ diff --git a/src/db/to_bin/cli.rs b/src/strucvars/txt_to_bin/cli.rs similarity index 94% rename from src/db/to_bin/cli.rs rename to src/strucvars/txt_to_bin/cli.rs index 2da6d59c..422b888d 100644 --- a/src/db/to_bin/cli.rs +++ b/src/strucvars/txt_to_bin/cli.rs @@ -6,7 +6,7 @@ use clap::Parser; use crate::{ common::trace_rss_now, - db::to_bin::{ + strucvars::txt_to_bin::{ clinvar, gene_region, masked, vardbs::{self, InputFileType}, xlink, @@ -34,11 +34,11 @@ pub enum Assembly { Grch38, } -impl From for crate::db::to_bin::clinvar::input::Assembly { +impl From for crate::strucvars::txt_to_bin::clinvar::input::Assembly { fn from(val: Assembly) -> Self { match val { - Assembly::Grch37 => crate::db::to_bin::clinvar::input::Assembly::Grch37, - Assembly::Grch38 => crate::db::to_bin::clinvar::input::Assembly::Grch38, + Assembly::Grch37 => crate::strucvars::txt_to_bin::clinvar::input::Assembly::Grch37, + Assembly::Grch38 => crate::strucvars::txt_to_bin::clinvar::input::Assembly::Grch38, } } } @@ -114,7 +114,7 @@ pub fn run(common_args: &crate::common::Args, args: &Args) -> Result<(), anyhow: let assembly = args .assembly .expect("assembly required for ClinvarSv conversion"); - let assembly: crate::db::to_bin::clinvar::input::Assembly = assembly.into(); + let assembly: crate::strucvars::txt_to_bin::clinvar::input::Assembly = assembly.into(); clinvar::convert_to_bin(&args.path_input, &args.path_output_bin, assembly)? } InputType::StrucvarInhouse => vardbs::convert_to_bin( @@ -168,10 +168,10 @@ mod test { use super::{Args, InputType}; #[rstest::rstest] - #[case(crate::db::to_bin::cli::Assembly::Grch37)] - #[case(crate::db::to_bin::cli::Assembly::Grch38)] + #[case(crate::strucvars::txt_to_bin::cli::Assembly::Grch37)] + #[case(crate::strucvars::txt_to_bin::cli::Assembly::Grch38)] fn run_clinvar_sv_smoke( - #[case] assembly: crate::db::to_bin::cli::Assembly, + #[case] assembly: crate::strucvars::txt_to_bin::cli::Assembly, ) -> Result<(), anyhow::Error> { let tmp_dir = temp_testdir::TempDir::default(); let common_args = common::Args { diff --git a/src/db/to_bin/clinvar/input.rs b/src/strucvars/txt_to_bin/clinvar/input.rs similarity index 100% rename from src/db/to_bin/clinvar/input.rs rename to src/strucvars/txt_to_bin/clinvar/input.rs diff --git a/src/db/to_bin/clinvar/mod.rs b/src/strucvars/txt_to_bin/clinvar/mod.rs similarity index 99% rename from src/db/to_bin/clinvar/mod.rs rename to src/strucvars/txt_to_bin/clinvar/mod.rs index 11a21285..d74df9bb 100644 --- a/src/db/to_bin/clinvar/mod.rs +++ b/src/strucvars/txt_to_bin/clinvar/mod.rs @@ -183,7 +183,7 @@ where #[cfg(test)] mod test { - use crate::db::to_bin::clinvar::input::Assembly; + use crate::strucvars::txt_to_bin::clinvar::input::Assembly; use mehari::common::open_read_maybe_gz; #[rstest::rstest] diff --git a/src/db/to_bin/clinvar/snapshots/varfish_server_worker__db__to_bin__clinvar__test__run_convert_jsonl_to_protobuf@Grch37.snap b/src/strucvars/txt_to_bin/clinvar/snapshots/varfish_server_worker__strucvars__txt_to_bin__clinvar__test__run_convert_jsonl_to_protobuf@Grch37.snap similarity index 100% rename from src/db/to_bin/clinvar/snapshots/varfish_server_worker__db__to_bin__clinvar__test__run_convert_jsonl_to_protobuf@Grch37.snap rename to src/strucvars/txt_to_bin/clinvar/snapshots/varfish_server_worker__strucvars__txt_to_bin__clinvar__test__run_convert_jsonl_to_protobuf@Grch37.snap diff --git a/src/db/to_bin/clinvar/snapshots/varfish_server_worker__db__to_bin__clinvar__test__run_convert_jsonl_to_protobuf@Grch38.snap b/src/strucvars/txt_to_bin/clinvar/snapshots/varfish_server_worker__strucvars__txt_to_bin__clinvar__test__run_convert_jsonl_to_protobuf@Grch38.snap similarity index 100% rename from src/db/to_bin/clinvar/snapshots/varfish_server_worker__db__to_bin__clinvar__test__run_convert_jsonl_to_protobuf@Grch38.snap rename to src/strucvars/txt_to_bin/clinvar/snapshots/varfish_server_worker__strucvars__txt_to_bin__clinvar__test__run_convert_jsonl_to_protobuf@Grch38.snap diff --git a/src/db/to_bin/gene_region.rs b/src/strucvars/txt_to_bin/gene_region.rs similarity index 97% rename from src/db/to_bin/gene_region.rs rename to src/strucvars/txt_to_bin/gene_region.rs index b5f1fcd0..af8fcabe 100644 --- a/src/db/to_bin/gene_region.rs +++ b/src/strucvars/txt_to_bin/gene_region.rs @@ -8,7 +8,7 @@ use thousands::Separable; use crate::{ common::{build_chrom_map, numeric_gene_id, trace_rss_now}, - db::pbs::{GeneRegionDatabase, GeneRegionRecord}, + strucvars::pbs::{GeneRegionDatabase, GeneRegionRecord}, }; /// Module with code supporting the parsing. diff --git a/src/db/to_bin/masked.rs b/src/strucvars/txt_to_bin/masked.rs similarity index 97% rename from src/db/to_bin/masked.rs rename to src/strucvars/txt_to_bin/masked.rs index f2fdeae5..fd542dc4 100644 --- a/src/db/to_bin/masked.rs +++ b/src/strucvars/txt_to_bin/masked.rs @@ -8,7 +8,7 @@ use thousands::Separable; use crate::{ common::{build_chrom_map, trace_rss_now}, - db::pbs::{MaskedDatabase, MaskedDbRecord}, + strucvars::pbs::{MaskedDatabase, MaskedDbRecord}, }; /// Module with code supporting the parsing. diff --git a/src/db/to_bin/mod.rs b/src/strucvars/txt_to_bin/mod.rs similarity index 100% rename from src/db/to_bin/mod.rs rename to src/strucvars/txt_to_bin/mod.rs diff --git a/src/db/to_bin/vardbs/input.rs b/src/strucvars/txt_to_bin/vardbs/input.rs similarity index 100% rename from src/db/to_bin/vardbs/input.rs rename to src/strucvars/txt_to_bin/vardbs/input.rs diff --git a/src/db/to_bin/vardbs/mod.rs b/src/strucvars/txt_to_bin/vardbs/mod.rs similarity index 89% rename from src/db/to_bin/vardbs/mod.rs rename to src/strucvars/txt_to_bin/vardbs/mod.rs index 4e22bb01..ed5b6c02 100644 --- a/src/db/to_bin/vardbs/mod.rs +++ b/src/strucvars/txt_to_bin/vardbs/mod.rs @@ -11,9 +11,9 @@ use prost::Message; use thousands::Separable; use crate::common::{build_chrom_map, trace_rss_now}; -use crate::db; -use crate::db::pbs::{BackgroundDatabase, BgDbRecord}; +use crate::strucvars; use crate::strucvars::aggregate::output::Record as InhouseDbRecord; +use crate::strucvars::pbs::{BackgroundDatabase, BgDbRecord}; use crate::strucvars::query::schema::SvType; use self::input::InputRecord; @@ -60,12 +60,12 @@ where .unwrap_or_else(|| panic!("unknown chrom2: {:?}", &record.chromosome2)) as i32, sv_type: match record.sv_type { - SvType::Del => db::pbs::SvType::Del, - SvType::Dup => db::pbs::SvType::Dup, - SvType::Inv => db::pbs::SvType::Inv, - SvType::Ins => db::pbs::SvType::Ins, - SvType::Bnd => db::pbs::SvType::Bnd, - SvType::Cnv => db::pbs::SvType::Cnv, + SvType::Del => strucvars::pbs::SvType::Del, + SvType::Dup => strucvars::pbs::SvType::Dup, + SvType::Inv => strucvars::pbs::SvType::Inv, + SvType::Ins => strucvars::pbs::SvType::Ins, + SvType::Bnd => strucvars::pbs::SvType::Bnd, + SvType::Cnv => strucvars::pbs::SvType::Cnv, } as i32, start: record.begin + 1, stop: record.end, diff --git a/src/db/to_bin/xlink.rs b/src/strucvars/txt_to_bin/xlink.rs similarity index 97% rename from src/db/to_bin/xlink.rs rename to src/strucvars/txt_to_bin/xlink.rs index 75b91c3f..adb21c58 100644 --- a/src/db/to_bin/xlink.rs +++ b/src/strucvars/txt_to_bin/xlink.rs @@ -8,7 +8,7 @@ use thousands::Separable; use crate::{ common::{numeric_gene_id, trace_rss_now}, - db::pbs::{XlinkDatabase, XlinkRecord}, + strucvars::pbs::{XlinkDatabase, XlinkRecord}, }; /// Module with code for parsing the TSVs.