3 releases

0.1.2 Jan 29, 2025
0.1.1 Sep 12, 2024
0.1.0 Aug 20, 2024

#1081 in Parser implementations

Download history 2/week @ 2024-11-17 1/week @ 2024-11-24 3/week @ 2024-12-08 115/week @ 2025-01-26 21/week @ 2025-02-02

136 downloads per month
Used in 2 crates

MIT license

72KB
1.5K SLoC

Seqkmer

Seqkmer is a Rust-based tool for processing and analyzing DNA sequences using k-mers.

Description

Seqkmer is designed to efficiently handle FASTA files and perform k-mer analysis on DNA sequences. It provides functionality for reading FASTA files, generating k-mers, and potentially other sequence analysis tasks.

Features

  • FASTA file parsing
  • K-mer generation

Usage

use seqkmer::{FastxReader, Reader};
use std::path::Path;

fn main() -> std::io::Result<()> {
    // Create a FastxReader for a single FASTA file
    let path = Path::new("path/to/your/fasta_file.fa");
    let mut reader = FastxReader::from_paths(
        seqkmer::OptionPair::Single(path),
        0, // file index
        0  // quality score (not used for FASTA)
    )?;

    // Read sequences
    while let Some(sequences) = reader.next()? {
        for sequence in sequences {
            println!("Sequence ID: {}", sequence.header.id);
            println!("Sequence length: {}", sequence.body.single().unwrap().len());
            // Process the sequence as needed
        }
    }

    Ok(())
}

Dependencies

~685KB
~11K SLoC