Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync CLI to Cargo.toml #39

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
160 changes: 77 additions & 83 deletions src/cli.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
name: Rust-Bio-Tools
author: Johannes Köster <[email protected]>
about: A set of ultra-fast command line utilities for bioinformatics tasks based on Rust-Bio.

settings:
- SubcommandRequired

Expand Down Expand Up @@ -41,7 +37,6 @@ subcommands:
required: true
help: File with list of record IDs to remove, one per line.


- bam-depth:
about: |
Print depth of BAM or CRAM file at given positions from STDIN (tab separated: chrom, pos).
Expand Down Expand Up @@ -77,7 +72,7 @@ subcommands:
long: incl-flags
short: i
value_name: INT
help: "Skip reads with mask bits unset []."
help: "Skip reads with mask bits unset []."
- exclude-flags:
long: excl-flags
short: e
Expand Down Expand Up @@ -168,32 +163,33 @@ subcommands:
author: Johannes Köster <[email protected]>, Jan Forster <[email protected]>

- vcf-annotate-dgidb:
about: |
Looks for interacting drugs in DGIdb and annotates them for every gene in every record.
about: |
Looks for interacting drugs in DGIdb and annotates them for every gene in every record.

Example:
rbt vcf-annotate-dgidb input.vcf > output.vcf
args:
- vcf:
required: true
help: VCF/BCF file to be extended by dgidb drug entries
- api-path:
long: api-path
short: p
default_value: http://dgidb.org/api/v2/interactions.json?genes=
help: url prefix for requesting interaction drugs by gene names.
- field:
long: field
short: f
default_value: dgiDB_drugs
help: Info field name to be used for annotation.
- genes-per-request:
long: genes-per-request
short: g
default_value: "1000"
help: Number of genes to submit per api request. A lower value increases the number of api requests in return.
Too many requests could be rejected by the DGIdb server.
author: Felix Mölder <[email protected]>
Example:
rbt vcf-annotate-dgidb input.vcf > output.vcf
args:
- vcf:
required: true
help: VCF/BCF file to be extended by dgidb drug entries
- api-path:
long: api-path
short: p
default_value: http://dgidb.org/api/v2/interactions.json?genes=
help: url prefix for requesting interaction drugs by gene names.
- field:
long: field
short: f
default_value: dgiDB_drugs
help: Info field name to be used for annotation.
- genes-per-request:
long: genes-per-request
short: g
default_value: "1000"
help:
Number of genes to submit per api request. A lower value increases the number of api requests in return.
Too many requests could be rejected by the DGIdb server.
author: Felix Mölder <[email protected]>

- call-consensus-reads:
about: |
Expand Down Expand Up @@ -226,56 +222,56 @@ subcommands:
{n}
author: Johannes Köster <[email protected]>, Henning Timm <[email protected]>, Felix Mölder <[email protected]>
args:
- fq1:
required: true
help: Input FASTQ file with forward reads.
- fq2:
required: true
help: Input FASTQ file with reverse reads.
- consensus-fq1:
required: true
help: Output FASTQ file with forward reads.
- consensus-fq2:
required: true
help: Output FASTQ file with reverse reads.
- consensus-fq3:
requires: [insert-size, std-dev]
help: Output FASTQ file for overlapping consensus reads (Required for calculating overlapping consensus only)
- max-umi-dist:
long: max-umi-dist
short: d
default_value: "1"
help: Maximum hamming distance between the UMIs of any pair of reads in the same cluster.
- umi-len:
long: umi-len
short: l
default_value: "8"
help: Length of UMI in read.
- max-seq-dist:
long: max-seq-dist
short: D
possible_values: ["1", "2", "3", "4", "5", "6", "7", "8"]
default_value: "2"
help: Maximum hamming distance between the sequences of any pair of reads in the same cluster.
- umi-on-reverse:
long: umi-on-reverse
short: u
help: Set if UMI is on reverse read
- verbose-read-names:
long: verbose-read-names
help: Add list of reads that were merged for each consensus read. Note that this can yield very long FASTQ name lines which cannot be handled by some tools.
- insert-size:
long: insert-size
short: i
takes_value: true
requires: [consensus-fq3, std-dev]
help: Expected insert size of sequenced fragment (Required for calculating overlapping consensus only)
- std-dev:
long: std-dev
short: s
takes_value: true
requires: [consensus-fq3, insert-size]
help: Standard deviation of expected insert size. Defines search space of the most likely overlap. (Required for calculating overlapping consensus only)
- fq1:
required: true
help: Input FASTQ file with forward reads.
- fq2:
required: true
help: Input FASTQ file with reverse reads.
- consensus-fq1:
required: true
help: Output FASTQ file with forward reads.
- consensus-fq2:
required: true
help: Output FASTQ file with reverse reads.
- consensus-fq3:
requires: [insert-size, std-dev]
help: Output FASTQ file for overlapping consensus reads (Required for calculating overlapping consensus only)
- max-umi-dist:
long: max-umi-dist
short: d
default_value: "1"
help: Maximum hamming distance between the UMIs of any pair of reads in the same cluster.
- umi-len:
long: umi-len
short: l
default_value: "8"
help: Length of UMI in read.
- max-seq-dist:
long: max-seq-dist
short: D
possible_values: ["1", "2", "3", "4", "5", "6", "7", "8"]
default_value: "2"
help: Maximum hamming distance between the sequences of any pair of reads in the same cluster.
- umi-on-reverse:
long: umi-on-reverse
short: u
help: Set if UMI is on reverse read
- verbose-read-names:
long: verbose-read-names
help: Add list of reads that were merged for each consensus read. Note that this can yield very long FASTQ name lines which cannot be handled by some tools.
- insert-size:
long: insert-size
short: i
takes_value: true
requires: [consensus-fq3, std-dev]
help: Expected insert size of sequenced fragment (Required for calculating overlapping consensus only)
- std-dev:
long: std-dev
short: s
takes_value: true
requires: [consensus-fq3, insert-size]
help: Standard deviation of expected insert size. Defines search space of the most likely overlap. (Required for calculating overlapping consensus only)
- bam:
about: |
Tool to remove PCR duplicates from BAM file.
Expand Down Expand Up @@ -304,5 +300,3 @@ subcommands:
- verbose-read-names:
long: verbose-read-names
help: Add list of reads that were merged for each consensus read. Note that this can yield very long FASTQ name lines which cannot be handled by some tools.


7 changes: 6 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
//! Documentation for Rust Bio Tools
#[macro_use]
extern crate clap;
use clap::{load_yaml, value_t};
use log::LevelFilter;

Expand All @@ -15,7 +17,10 @@ pub mod fastq;
fn main() -> Result<(), Box<dyn Error>> {
let yaml = load_yaml!("cli.yaml");
let matches = App::from_yaml(yaml)
.version(env!("CARGO_PKG_VERSION"))
.name(crate_name!())
.author(crate_authors!())
.version(crate_version!())
.about(crate_description!())
.get_matches();

fern::Dispatch::new()
Expand Down