Skip to content

Commit

Permalink
document update
Browse files Browse the repository at this point in the history
  • Loading branch information
cschin committed Feb 9, 2023
1 parent 2bd65ea commit 809296b
Show file tree
Hide file tree
Showing 9 changed files with 38 additions and 8 deletions.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,25 @@ With the MAP graph, we can use the "principal bundle decomposition" to study com

## Documentation, Usage and Examples

Command Line Tools:

PGR-TK provides the following tool to

- create the PGR-TK sequence and index database
- `pgr-mdb`: create pgr minimizer database with AGC backend
- `pgr-make-frgdb`: create PGR-TK fragment minimizer database with frg format backend
- query the database to fetch sequences
- `pgr-query`: query a PGR-TK pangenome sequence database, ouput the hit summary and generate fasta files from the target sequences
- generate MAP-graph in GFA format and principal bundle decomposition bed file
- `pgr-pbundle-decomp`: generat the principal bundle decomposition though MAP Graph from a fasta file
- generate SVG from the principal bundle decomposition bed file
- `pgr-pbundle-bed2svg`: generate SVG from a principal bundle bed file
- auxiliary tools
- `pgr-pbundle-bed2sorted`: generate annotation file with a sorting order from the principal bundle decomposition
- `pgr-pbundle-bed2dist`: generate alignment scores between sequences using bundle decomposition from a principal bundle bed file

For each comannd, `command --help` provides the detail usage information.

The API documentation is at https://sema4-research.github.io/pgr-tk/

A collection of Jupyter Notebooks are at https://github.com/sema4-Research/pgr-tk-notebooks/
Expand Down
3 changes: 2 additions & 1 deletion pgr-bin/src/bin/pgr-fetch-seqs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ use std::fs::File;
use std::io::{self, BufRead, BufReader, BufWriter, Write};
use std::path::Path;

/// List or fetch sequences from a PGR-TK database
#[derive(Parser, Debug)]
#[clap(name = "pgr-fetch-seqs")]
#[clap(author, version)]
#[clap(about = "list or fetch sequences from a pgr database", long_about = None)]
#[clap(about, long_about = None)]
struct CmdOptions {
/// the prefix to a PGR-TK sequence database
pgr_db_prefix: String,
Expand Down
3 changes: 2 additions & 1 deletion pgr-bin/src/bin/pgr-make-frgdb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ use std::fs::File;
use std::io::{BufRead, BufReader};
use std::path::Path;

/// Create PGR-TK fragment minimizer database with frg format backend
#[derive(Parser, Debug)]
#[clap(name = "pgr-make-frgdb")]
#[clap(author, version)]
#[clap(about = "create PGR-TK fragment minimizer database with frg format backend", long_about = None)]
#[clap(about, long_about = None)]
struct CmdOptions {
/// the path to the file contains the paths to the fastx files to load
filepath: String,
Expand Down
3 changes: 2 additions & 1 deletion pgr-bin/src/bin/pgr-mdb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ use std::io::{BufRead, BufReader};

use pgr_db::seq_db;

/// Create pgr minimizer database with AGC backend
#[derive(Parser, Debug)]
#[clap(name = "pgr-mdb")]
#[clap(author, version)]
#[clap(about = "create pgr minimizer db", long_about = None)]
#[clap(about, long_about = None)]
struct CmdOptions {
filepath: String,
prefix: String,
Expand Down
5 changes: 4 additions & 1 deletion pgr-bin/src/bin/pgr-pbundle-bed2dist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,15 @@ use std::io::{BufRead, BufReader, BufWriter, Write};
use std::path::Path;
use std::{fs::File, path};

/// Generate alignment scores between sequences using bundle decomposition from a principal bundle bed file
#[derive(Parser, Debug)]
#[clap(name = "pgr-pbundle-bed2dist")]
#[clap(author, version)]
#[clap(about = "generate alignment scores between contigs using bundle decomposition from a principal bundle bed file", long_about = None)]
#[clap(about, long_about = None)]
struct CmdOptions {
/// the path to the pricipal bundle bed file
bed_file_path: String,
/// the prefix of the output file
output_prefix: String,
}

Expand Down
3 changes: 2 additions & 1 deletion pgr-bin/src/bin/pgr-pbundle-bed2sorted.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ use std::io::{BufRead, BufReader, BufWriter, Write};
use std::path::Path;
use std::{fs::File, path};

/// Generate annotation file with a sorting order from the principal bundle decomposition
#[derive(Parser, Debug)]
#[clap(name = "pgr-pbundle-bed2sorted")]
#[clap(author, version)]
#[clap(about = "sort the contig by bunldes", long_about = None)]
#[clap(about, long_about = None)]
struct CmdOptions {
/// the path to the pricipal bundle bed file
bed_file_path: String,
Expand Down
3 changes: 2 additions & 1 deletion pgr-bin/src/bin/pgr-pbundle-bed2svg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ use std::{fs::File, path};
use svg::node::{self, element, Node};
use svg::Document;

/// Generate SVG from a principal bundle bed file
#[derive(Parser, Debug)]
#[clap(name = "pgr-pbundle-bed2svg")]
#[clap(author, version)]
#[clap(about = "generate SVG from a principal bundle bed file", long_about = None)]
#[clap(about, long_about = None)]
struct CmdOptions {
/// the path to the pricipal bundle bed file
bed_file_path: String,
Expand Down
3 changes: 2 additions & 1 deletion pgr-bin/src/bin/pgr-pbundle-decomp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ use std::{
path::Path,
};

/// Generat the principal bundle decomposition though MAP Graph from a fasta file
#[derive(Parser, Debug)]
#[clap(name = "pgr-pbundle-decomp")]
#[clap(author, version)]
#[clap(about = "take a fasta file and output the principal bundle decomposition though MAP Graph", long_about = None)]
#[clap(about, long_about = None)]
struct CmdOptions {
/// the path to the input fasta file
fastx_path: String,
Expand Down
4 changes: 3 additions & 1 deletion pgr-bin/src/bin/pgr-query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ use std::fs::File;
use std::io::{self, BufWriter, Write};
use std::path::Path;

/// Query a PGR-TK pangenome sequence database,
/// ouput the hit summary and generate fasta files from the target sequences
#[derive(Parser, Debug)]
#[clap(name = "pgr-query")]
#[clap(author, version)]
#[clap(about = "query a pgr pangenome database and ouput the hits", long_about = None)]
#[clap(about, long_about = None)]
struct CmdOptions {
/// the prefix to a PGR-TK sequence database
pgr_db_prefix: String,
Expand Down

0 comments on commit 809296b

Please sign in to comment.