Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/euphrasiologist/trfr
Parse output from tandem repeat finder
https://github.com/euphrasiologist/trfr
Last synced: 12 days ago
JSON representation
Parse output from tandem repeat finder
- Host: GitHub
- URL: https://github.com/euphrasiologist/trfr
- Owner: Euphrasiologist
- License: mit
- Created: 2024-01-21T21:27:04.000Z (almost 1 year ago)
- Default Branch: main
- Last Pushed: 2024-01-22T14:53:54.000Z (12 months ago)
- Last Synced: 2024-04-24T08:29:23.514Z (9 months ago)
- Language: Rust
- Size: 18.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# `trfr`
The `trfr` crate is purely for parsing the output of the command line tool `Tandem Repeat Finder` (or `trf`).
The output is generated by passing the `-d` flag to createa parseable table (rather than the standard HTML output). Please see [here](https://github.com/Benson-Genomics-Lab/TRF) for the source code and citation for `trf`.
The API follows that of most mainstream Rust API's (in particular BurntSushi's). It is an iterator API.
# Example
```rust
use std::{error::Error, io, process};fn example() -> Result<(), Box> {
// Build the trfr reader
// and assuming you are parsing with `-d` flag only
let mut rdr = trfr::Reader::from_reader(io::stdin(), trfr::Flag::D);
for result in rdr.records() {
let record = result?;
println!("{:?}", record);
}
Ok(())
}fn main() {
if let Err(err) = example() {
println!("error running example: {}", err);
process::exit(1);
}
}
```