From ed79dd5cc64b5030b42fb95e4e3905c34dd2f342 Mon Sep 17 00:00:00 2001
From: Martin Larralde <martin.larralde@embl.de>
Date: Sat, 15 Jun 2024 09:37:41 +0200
Subject: [PATCH] Rename JASPAR (2016) benchmark in `lightmotif-io`

---
 lightmotif-io/benches/{jaspar.rs => jaspar16.rs} | 0
 lightmotif-io/src/jaspar/mod.rs                  | 7 +++++++
 lightmotif-io/src/jaspar16/mod.rs                | 1 +
 3 files changed, 8 insertions(+)
 rename lightmotif-io/benches/{jaspar.rs => jaspar16.rs} (100%)

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 0f5ca17..58a1cac 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 16c9fe9..1eae03b 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,
-- 
GitLab