- PAF file reader
- MAF file reader
- Chain file reader
- CIGAR string parser
- MAF2PAF
- MAF2Chain
- PAF2Chain
- PAF2Blocks
- PAF2MAF
- Chain2MAF
- Chain2PAF
- Call Variants from MAF
- Visualize MAF file in terminal
- Extract regions from MAF file
- Build MAF index
- Statistics of MAF/PAF file
- SAM converter [really need?]
- Local improvement of alignment by re-alignment
- MAF -> GAF -> HAL
- for BIG MAF, should optimize
- split & chop MAF file
git clone https://github.com/wjwei-handsome/wgatools.git
cd wgatools
cargo build --release
or just install from git:
cargo install --git https://github.com/wjwei-handsome/wgatools.git
> wgatools
wgatools -- a cross-platform and ultrafast toolkit for Whole Genome Alignment Files manipulation
Version: 0.1.0
Authors: Wenjie Wei <wjwei9908@gmail.com>
Usage: wgatools [OPTIONS] <COMMAND>
Commands:
maf2paf Convert MAF format to PAF format [aliases: m2p]
maf2chain Convert MAF format to Chain format [aliases: m2c]
paf2maf Convert PAF format to MAF format [aliases: p2m]
paf2chain Convert PAF format to Chain format [aliases: p2c]
chain2maf Convert Chain format to MAF format [aliases: c2m]
chain2paf Convert Chain format to PAF format [aliases: c2p]
maf-ext Extract specific region from MAF file with index [aliases: me]
call Call Variants from MAF file [aliases: c]
maf2sam TEST: maf2sam [aliases: m2s]
maf-index Build index for MAF file [aliases: mi]
tview View MAF file in terminal [aliases: tv]
stat Statistics for Alignment file [aliases: st]
help Print this message or the help of the given subcommand(s)
Options:
-h, --help Print help (see more with '--help')
-V, --version Print version
GLOBAL:
-o, --outfile <OUTFILE> Output file ("-" for stdout) [default: -]
-r, --rewrite Bool, if rewrite output file [default: false]
-t, --threads <THREADS> Threads, default 1 [default: 1]
-v, --verbose... Logging level [-v: Info, -vv: Debug, -vvv: Trace, defalut: Warn]
NOTE: If you want to convert into MAF format, you should provide target and query genome sequence files in [.fa/.fa.gz].
Some simple reader and iterator for PAF, MAF and Chain files:
use wgatools::parser::paf::PafReader;
use wgatools::parser::maf::MAFReader;
use wgatools::parser::chain::ChainReader;
fn main() {
let mut mafreader = MAFReader::from_path("test.maf").unwrap();
for record in mafreader.records() {
let record = record.unwrap();
println!("{:?}", record);
}
/// ...
}
- Error detection and handling
- Test cases
- Documentations
- use
nom
to parse CIGAR string - use
rayon
to accelerate the speed of conversions - use
ratatui
to visualize MAF file in terminal - ...
Feel free to dive in! Open an issue or submit PRs.
MIT License © WenjieWei