Skip to content

A Rust library for predicting transcription factor binding sites and analyzing DNA sequences with FASTA utilities

Notifications You must be signed in to change notification settings

peter6866/tf-binding-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TF Binding Analysis Tools

This workspace contains tools for analyzing transcription factor (TF) binding sites in DNA sequences:

  • tf-binding-rs: A Rust library for TF binding site prediction and sequence analysis
  • motif-scanner: A command-line tool for scanning DNA sequences for TF binding sites

🧬 tf-binding-rs

Github Crates.io

A Rust library providing efficient implementations for:

  • FASTA file manipulation and sequence processing
  • Position Weight Matrix (PWM) handling
  • Energy Weight Matrix (EWM) conversion
  • TF binding site occupancy prediction
  • Multi-TF occupancy analysis
use tf_binding_rs::occupancy;

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let ewms = occupancy::read_pwm_to_ewm("motifs.meme")?;
    let sequence = "ATCGATCGTAGCTACGT";
    let landscape = occupancy::total_landscape(sequence, &ewms, -3.0)?;
    println!("Binding landscape:\n{}", landscape);
    Ok(())
}

🔍 motif-scanner

A command-line tool for scanning DNA sequences and predicting TF binding sites. Features:

  • Batch processing of sequence files
  • Occupancy score calculation
  • Multiple output formats (CSV, Parquet)
  • Filtering by occupancy threshold
motif-scanner input.csv motifs.meme output.csv --cutoff 0.2 --mu 9.0

Installation

From Source

# Clone the repository
git clone https://github.com/peter6866/tf-binding-rs
cd tf-binding-rs

# Build both the library and the scanner
cargo build --release --workspace

# Install the motif-scanner binary
cargo install --path motif-scanner

From crates.io

# Install just the motif-scanner tool
cargo install motif-scanner

# For library usage, add to your Cargo.toml:
[dependencies]
tf-binding-rs = "0.1.4"

Documentation

About

A Rust library for predicting transcription factor binding sites and analyzing DNA sequences with FASTA utilities

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages