diff --git a/lightmotif-io/benches/jaspar.rs b/lightmotif-io/benches/jaspar16.rs similarity index 100% rename from lightmotif-io/benches/jaspar.rs rename to lightmotif-io/benches/jaspar16.rs diff --git a/lightmotif-io/src/jaspar/mod.rs b/lightmotif-io/src/jaspar/mod.rs index 0f5ca17f528b712dab1393a85568255878143959..58a1cac1da01cb11938cdd70a59d686463058fe9 100644 --- a/lightmotif-io/src/jaspar/mod.rs +++ b/lightmotif-io/src/jaspar/mod.rs @@ -26,6 +26,10 @@ mod parse; // --- +/// A JASPAR (raw) record. +/// +/// The JASPAR (raw) format only supports count matrices in the DNA +/// alphabet. #[derive(Debug, Clone)] pub struct Record { id: String, @@ -34,14 +38,17 @@ pub struct Record { } impl Record { + /// Get the identifier of the record. pub fn id(&self) -> &str { &self.id } + /// Get the description of the record, if any. pub fn description(&self) -> Option<&str> { self.description.as_deref() } + /// Get the count matrix of the record. pub fn matrix(&self) -> &CountMatrix<Dna> { &self.matrix } diff --git a/lightmotif-io/src/jaspar16/mod.rs b/lightmotif-io/src/jaspar16/mod.rs index 16c9fe9618234e553e46d6acc57c0c8d2921c6c2..1eae03b52ec191018810d61399b2581334b74462 100644 --- a/lightmotif-io/src/jaspar16/mod.rs +++ b/lightmotif-io/src/jaspar16/mod.rs @@ -26,6 +26,7 @@ mod parse; // --- +/// A JASPAR (2016) record. #[derive(Debug, Clone)] pub struct Record<A: Alphabet> { id: String,