mmft 0.2.1

A minimal fasta toolkit.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use anyhow::{bail, Result};
use std::path::{Path, PathBuf};

pub mod fasta;
pub mod utils;

pub(crate) fn get_fasta_files(matches: &clap::ArgMatches) -> Option<Vec<PathBuf>> {
    matches.get_many("fasta").map(|e| e.cloned().collect())
}

pub(crate) fn get_basename_from_pathbuf(pb: &Path) -> Result<String> {
    match pb.file_name() {
        Some(f) => Ok(f.to_str().unwrap().to_owned()),
        None => bail!("Could not find file"),
    }
}