seqkmer

Crates.ioseqkmer
lib.rsseqkmer
version0.1.1
sourcesrc
created_at2024-08-20 09:28:49.490478
updated_at2024-09-12 11:46:09.110669
descriptionsequence kmer
homepage
repositoryhttps://github.com/eric9n/seqkmer
max_upload_size
id1345069
size70,276
dagou (eric9n)

documentation

README

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(())
}
Commit count: 0

cargo fmt