Skip to content

Commit

Permalink
version 0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
natir committed Jul 19, 2018
1 parent 20210ac commit b63759e
Show file tree
Hide file tree
Showing 9 changed files with 52 additions and 29 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 19 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,23 @@
[package]
name = "yarcd"
name = "yacrd"
version = "0.3.0"
authors = ["Pierre Marijon <[email protected]>"]

exclude = ["image/*", "validation/*", "tests/*"]

description = "Using all-against-all read mapping, yacrd performs: computation of pile-up coverage for each read and detection of chimeras"
#documentation = "https://github.com/natir/yacrd"
homepage = "https://github.com/natir/yacrd"
repository = "https://github.com/natir/yacrd"
readme = "Readme.md"
license = "MIT"
keywords = ["bioinformatics", "chimera", "long-read"]

[badges]
travis-ci = { repository = "natir/yacrd", branch = "master" }

[dependencies]
bio = "*"
bio = "0.21"
csv = "1"
xz2 = "0.1"
clap = "2.31.2"
Expand All @@ -14,3 +27,7 @@ flate2 = "1.0"
rust-lzma = "0.2"
lazy_static = "1.0"
serde_derive = "1.0"

[[bin]]
name = "yacrd"
path = "src/main.rs"
20 changes: 15 additions & 5 deletions Readme.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Yet Another Chimeric Read Detector for long reads

[![Build Status](https://travis-ci.org/natir/yacrd.svg?branch=master)](https://travis-ci.org/natir/yacrd)

![yacrd pipeline presentation](image/pipeline.svg)

Using all-against-all read mapping, yacrd performs:
Expand All @@ -21,7 +23,7 @@ DAStrim (from the [DASCRUBBER suite](https://github.com/thegenemyers/DASCRUBBER)

## Input

Any set of long reads (PacBio, Nanopore, anything that can be given to [https://github.com/lh3/minimap2](minimap2) ).
Any set of long reads (PacBio, Nanopore, anything that can be given to [minimap2](https://github.com/lh3/minimap2) ).
yacrd takes the resulting PAF (Pairwise Alignement Format) from minimap2 or MHAP file from some other long reads overlapper as input.

## Requirements
Expand All @@ -30,9 +32,17 @@ yacrd takes the resulting PAF (Pairwise Alignement Format) from minimap2 or MHAP

## Instalation

### With cargo

If you have a rust environment setup you can run :

```
cargo install yacrd
```

### With conda

yacrd are avaible in [bioconda channel](https://bioconda.github.io/)
yacrd is avaible in [bioconda channel](https://bioconda.github.io/)

if bioconda channel is setup you can run :

Expand All @@ -58,7 +68,7 @@ cargo install
2)

```
yacrd 0.3 Mew
yacrd 0.3 Ninetales
Pierre Marijon <[email protected]>
Yet Another Chimeric Read Detector
Expand All @@ -81,7 +91,7 @@ OPTIONS:
Mapping input file in PAF or MHAP format (with .paf or .mhap extension), use - for read standard input (no
compression allowed, paf format by default) [default: -]
-o, --output <output>
Path where yacrd report are write, use - for write in standard output same compression as input or use
Path where yacrd report are writen, use - for write in standard output same compression as input or use
--compression-out [default: -]
-f, --filter <filter>...
File containing reads that will be filtered (fasta|fastq|mhap|paf), new file are create like
Expand All @@ -91,7 +101,7 @@ OPTIONS:
Overlap depth threshold below which a gap should be created [default: 0]
-n, --not-covered-threshold <not-covered-threshold>
Coverage depth threshold above which a read are mark as not covered [default: 0.80]
Coverage depth threshold above which a read are marked as not covered [default: 0.80]
--filtered-suffix <filtered-suffix>
Change the suffix of file generate by filter option [default: _filtered]
Expand Down
6 changes: 3 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ use std::collections::HashSet;

fn main() {
let matches = App::new("yacrd")
.version("0.3 Mew")
.version("0.3 Ninetales")
.author("Pierre Marijon <[email protected]>")
.about("Yet Another Chimeric Read Detector")
.usage("yacrd [-i|--input] <input> [-o|--output] <output> [-f|--filter] <file1, file2, …>
Expand All @@ -75,7 +75,7 @@ fn main() {
.display_order(2)
.takes_value(true)
.default_value("-")
.help("Path where yacrd report are write, use - for write in standard output same compression as input or use --compression-out")
.help("Path where yacrd report are writen, use - for write in standard output same compression as input or use --compression-out")
)
.arg(Arg::with_name("filter")
.short("f")
Expand Down Expand Up @@ -107,7 +107,7 @@ fn main() {
.takes_value(true)
.default_value("0.80")
.long("not-covered-threshold")
.help("Coverage depth threshold above which a read are mark as not covered")
.help("Coverage depth threshold above which a read are marked as not covered")
)
.arg(Arg::with_name("filtered-suffix")
.display_order(7)
Expand Down
2 changes: 0 additions & 2 deletions tests/data/test.yacrd

This file was deleted.

Binary file removed tests/data/test.yacrd.gz
Binary file not shown.
2 changes: 0 additions & 2 deletions tests/data/test_filtered.fasta

This file was deleted.

14 changes: 7 additions & 7 deletions tests/not_run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ SOFTWARE.

use std::process::Command;

static HELP_MESSAGE: &'static str = "yacrd 0.3 Mew
static HELP_MESSAGE: &'static str = "yacrd 0.3 Ninetales
Pierre Marijon <[email protected]>
Yet Another Chimeric Read Detector
Expand All @@ -45,7 +45,7 @@ OPTIONS:
Mapping input file in PAF or MHAP format (with .paf or .mhap extension), use - for read standard input (no
compression allowed, paf format by default) [default: -]
-o, --output <output>
Path where yacrd report are write, use - for write in standard output same compression as input or use
Path where yacrd report are writen, use - for write in standard output same compression as input or use
--compression-out [default: -]
-f, --filter <filter>...
File containing reads that will be filtered (fasta|fastq|mhap|paf), new file are create like
Expand All @@ -55,7 +55,7 @@ OPTIONS:
Overlap depth threshold below which a gap should be created [default: 0]
-n, --not-covered-threshold <not-covered-threshold>
Coverage depth threshold above which a read are mark as not covered [default: 0.80]
Coverage depth threshold above which a read are marked as not covered [default: 0.80]
--filtered-suffix <filtered-suffix>
Change the suffix of file generate by filter option [default: _filtered]
Expand All @@ -72,18 +72,18 @@ mod not_run {

#[test]
fn version() {
let output = Command::new("./target/debug/yarcd")
let output = Command::new("./target/debug/yacrd")
.arg("-V")
.output()
.expect("Could not run yacrd");

assert_eq!(output.stdout, b"yacrd 0.3 Mew\n");
assert_eq!(output.stdout, b"yacrd 0.3 Ninetales\n");
println!("{:?}", output);
}

#[test]
fn help() {
let output = Command::new("./target/debug/yarcd")
let output = Command::new("./target/debug/yacrd")
.arg("-h")
.output()
.expect("Could not run yacrd");
Expand All @@ -93,7 +93,7 @@ mod not_run {

#[test]
fn no_argument() {
let output = Command::new("./target/debug/yarcd")
let output = Command::new("./target/debug/yacrd")
.output()
.expect("Could not run yacrd");

Expand Down
14 changes: 7 additions & 7 deletions tests/realistic_scenario.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ mod realistic_scenario {

#[test]
fn default() {
let child = Command::new("./target/debug/yarcd")
let child = Command::new("./target/debug/yacrd")
.stdin(Stdio::from(fs::File::open("tests/data/test.paf").unwrap()))
.stdout(Stdio::piped())
.spawn()
Expand All @@ -49,7 +49,7 @@ mod realistic_scenario {

#[test]
fn file_mhap_gz_out_same_paf_default_default() {
let child = Command::new("./target/debug/yarcd")
let child = Command::new("./target/debug/yacrd")
.arg("-i")
.arg("tests/data/test.mhap.gz")
.arg("-F")
Expand Down Expand Up @@ -81,7 +81,7 @@ Chimeric 1 10000 2000,0,2000;1000,4500,5500;2000,8000,10000
";
let good: HashSet<&str> = expected.split("\n").collect();

Command::new("./target/debug/yarcd")
Command::new("./target/debug/yacrd")
.arg("-i")
.arg("-")
.arg("-o")
Expand All @@ -92,7 +92,7 @@ Chimeric 1 10000 2000,0,2000;1000,4500,5500;2000,8000,10000
fs::File::open("tests/data/test_cov_1.paf").unwrap(),
))
.stdout(Stdio::piped())
.spawn()
.output()
.expect("Could ot run yacrd");

assert_eq!(
Expand All @@ -113,7 +113,7 @@ Not_covered 3 10000 5500,4500,10000
";
let good: HashSet<&str> = expected.split("\n").collect();

let child = Command::new("./target/debug/yarcd")
let child = Command::new("./target/debug/yacrd")
.arg("-i")
.arg("tests/data/test.paf.bz2")
.arg("-o")
Expand Down Expand Up @@ -169,7 +169,7 @@ Chimeric 1 10000 2000,0,2000;1000,4500,5500;2000,8000,10000

let good: HashSet<&str> = expected.split("\n").collect();

Command::new("./target/debug/yarcd")
Command::new("./target/debug/yacrd")
.arg("-i")
.arg("tests/data/test_cov_1.mhap.xz")
.arg("-o")
Expand All @@ -184,7 +184,7 @@ Chimeric 1 10000 2000,0,2000;1000,4500,5500;2000,8000,10000
.arg("tests/data/test.fasta")
.stdin(Stdio::piped())
.stdout(Stdio::piped())
.spawn()
.output()
.expect("Could not run yacrd");

{
Expand Down

0 comments on commit b63759e

Please sign in to comment.