Skip to content

Commit

Permalink
feat: move out assemblies to biocommons_bioutils crate (#134)
Browse files Browse the repository at this point in the history
  • Loading branch information
holtgrewe committed Oct 21, 2023
1 parent 0f42d20 commit 434edb2
Show file tree
Hide file tree
Showing 37 changed files with 10 additions and 143 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ serde_json = "1.0"
serde = { version = "1.0", features = ["derive"] }
thiserror = "1.0"
indexmap = { version = "2", features = ["serde"] }
biocommons-bioutils = "0.1.0"

[dev-dependencies]
anyhow = "1.0"
Expand Down
6 changes: 3 additions & 3 deletions src/data/cdot/json.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ use crate::{
self, GeneInfoRecord, TxExonsRecord, TxForRegionRecord, TxIdentityInfo, TxInfoRecord,
TxMappingOptionsRecord, TxSimilarityRecord,
},
static_data::{Assembly, ASSEMBLY_INFOS},
};
use biocommons_bioutils::assemblies::{Assembly, ASSEMBLY_INFOS};

use bio::data_structures::interval_tree::ArrayBackedIntervalTree;
use chrono::NaiveDateTime;
Expand Down Expand Up @@ -104,7 +104,7 @@ impl interface::Provider for Provider {

fn get_assembly_map(
&self,
assembly: crate::static_data::Assembly,
assembly: biocommons_bioutils::assemblies::Assembly,
) -> indexmap::IndexMap<String, String> {
self.inner.get_assembly_map(assembly)
}
Expand Down Expand Up @@ -1082,7 +1082,7 @@ pub mod tests {
};
use crate::mapper::assembly::{self, Mapper};
use crate::parser::HgvsVariant;
use crate::static_data::Assembly;
use biocommons_bioutils::assemblies::Assembly;

#[test]
fn test_sync() {
Expand Down
2 changes: 1 addition & 1 deletion src/data/interface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use chrono::NaiveDateTime;
use indexmap::IndexMap;

use crate::data::error::Error;
use crate::static_data::Assembly;
use biocommons_bioutils::assemblies::Assembly;

/// Information about a gene.
///
Expand Down
2 changes: 1 addition & 1 deletion src/data/uta.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use std::fmt::Debug;
use std::sync::Mutex;

use crate::sequences::seq_md5;
use crate::static_data::{Assembly, ASSEMBLY_INFOS};
use biocommons_bioutils::assemblies::{Assembly, ASSEMBLY_INFOS};

use crate::data::{
error::Error, interface, interface::GeneInfoRecord, interface::TxExonsRecord,
Expand Down
2 changes: 1 addition & 1 deletion src/data/uta_sr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ impl interface::Provider for Provider {

fn get_assembly_map(
&self,
assembly: crate::static_data::Assembly,
assembly: biocommons_bioutils::assemblies::Assembly,
) -> indexmap::IndexMap<String, String> {
self.inner.get_assembly_map(assembly)
}
Expand Down
1 change: 0 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ pub mod mapper;
pub mod normalizer;
pub mod parser;
pub mod sequences;
pub mod static_data;
pub mod validator;
3 changes: 2 additions & 1 deletion src/mapper/assembly.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ use std::sync::Arc;
use crate::mapper::error::Error;
use crate::mapper::variant;
use crate::parser::HgvsVariant;
use crate::{data::interface::Provider, static_data::Assembly, validator::ValidationLevel};
use crate::{data::interface::Provider, validator::ValidationLevel};
use biocommons_bioutils::assemblies::Assembly;

#[derive(Debug, PartialEq, Eq, Default, Clone, Copy)]
pub enum InParAssume {
Expand Down
2 changes: 1 addition & 1 deletion src/mapper/variant.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1152,7 +1152,7 @@ mod test {

fn get_assembly_map(
&self,
_assembly: crate::static_data::Assembly,
_assembly: biocommons_bioutils::assemblies::Assembly,
) -> indexmap::IndexMap<String, String> {
panic!("for test use only");
}
Expand Down
Binary file removed src/static_data/_data/CHM1_1.0.json.gz
Binary file not shown.
Binary file removed src/static_data/_data/CHM1_1.1.json.gz
Binary file not shown.
Binary file removed src/static_data/_data/GRCh37.json.gz
Binary file not shown.
Binary file removed src/static_data/_data/GRCh37.p10.json.gz
Binary file not shown.
Binary file removed src/static_data/_data/GRCh37.p11.json.gz
Binary file not shown.
Binary file removed src/static_data/_data/GRCh37.p12.json.gz
Binary file not shown.
Binary file removed src/static_data/_data/GRCh37.p13.json.gz
Binary file not shown.
Binary file removed src/static_data/_data/GRCh37.p2.json.gz
Binary file not shown.
Binary file removed src/static_data/_data/GRCh37.p5.json.gz
Binary file not shown.
Binary file removed src/static_data/_data/GRCh37.p9.json.gz
Binary file not shown.
Binary file removed src/static_data/_data/GRCh38.json.gz
Binary file not shown.
Binary file removed src/static_data/_data/GRCh38.p1.json.gz
Binary file not shown.
Binary file removed src/static_data/_data/GRCh38.p10.json.gz
Binary file not shown.
Binary file removed src/static_data/_data/GRCh38.p11.json.gz
Binary file not shown.
Binary file removed src/static_data/_data/GRCh38.p12.json.gz
Binary file not shown.
Binary file removed src/static_data/_data/GRCh38.p2.json.gz
Binary file not shown.
Binary file removed src/static_data/_data/GRCh38.p3.json.gz
Binary file not shown.
Binary file removed src/static_data/_data/GRCh38.p4.json.gz
Binary file not shown.
Binary file removed src/static_data/_data/GRCh38.p5.json.gz
Binary file not shown.
Binary file removed src/static_data/_data/GRCh38.p6.json.gz
Binary file not shown.
Binary file removed src/static_data/_data/GRCh38.p7.json.gz
Binary file not shown.
Binary file removed src/static_data/_data/GRCh38.p8.json.gz
Binary file not shown.
Binary file removed src/static_data/_data/GRCh38.p9.json.gz
Binary file not shown.
36 changes: 0 additions & 36 deletions src/static_data/_data/Makefile

This file was deleted.

Binary file removed src/static_data/_data/NCBI33.json.gz
Binary file not shown.
Binary file removed src/static_data/_data/NCBI34.json.gz
Binary file not shown.
Binary file removed src/static_data/_data/NCBI35.json.gz
Binary file not shown.
Binary file removed src/static_data/_data/NCBI36.json.gz
Binary file not shown.
98 changes: 0 additions & 98 deletions src/static_data/mod.rs

This file was deleted.

0 comments on commit 434edb2

Please sign in to comment.