Skip to main content

fastqrab_steps/
lib.rs

1pub mod config;
2pub mod demultiplex;
3pub mod transformations;
4
5#[must_use]
6pub fn link_docs(step_name: &str) -> String {
7    format!(
8        "{}v{}/docs/redirects/{}",
9        env!("CARGO_PKG_HOMEPAGE"),
10        env!("CARGO_PKG_VERSION"),
11        step_name
12    )
13}
14
15pub fn join_nonempty<'a>(parts: impl IntoIterator<Item = &'a str>, separator: &str) -> String {
16    let mut iter = parts.into_iter().filter(|part| !part.is_empty());
17    let mut result = String::new();
18    if let Some(first) = iter.next() {
19        result.push_str(first);
20        for part in iter {
21            result.push_str(separator);
22            result.push_str(part);
23        }
24    } // cov:excl-line
25    result
26}
27
28#[must_use]
29pub fn no_barcode_infix() -> &'static str {
30    "nobarcode"
31}