Skip to content

Commit 93db622

Browse files
committed
bump clap version
1 parent 1ea0bcd commit 93db622

6 files changed

Lines changed: 28 additions & 107 deletions

File tree

Cargo.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ edition = "2018"
77
[dependencies]
88
anyhow = "1.0.53"
99
bytecount = "0.6.2"
10-
clap = "3.0.14"
10+
clap = "3.1.8"
1111
itertools = "0.10.3"
1212
nanoserde = "0.1.29"
1313
rand = {version = "0.8.4", features = ["getrandom", "small_rng"]}

examples/nuc_profile/Cargo.lock

Lines changed: 10 additions & 89 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/nuc_profile/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ edition = "2018"
66

77

88
[dependencies]
9-
anyhow = "1.0.34"
10-
clap = "3.0.0-beta.2"
11-
itertools = "0.10.0"
9+
anyhow = "1.0.53"
10+
clap = "3.1.8"
11+
itertools = "0.10.3"
1212
seq_io = "0.3.1"

examples/nuc_profile/src/main.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use std::{collections::HashMap, str};
22

33
use anyhow::Context;
4-
use clap::{App, Arg};
4+
use clap::{Arg, Command};
55
use itertools::Itertools;
66
use seq_io::{
77
fasta::Reader as faReader,
@@ -143,12 +143,12 @@ impl<'a> Fastx<'a> {
143143
}
144144

145145
fn main() -> anyhow::Result<()> {
146-
let matches = App::new("nuc_profile")
146+
let matches = Command::new("nuc_profile")
147147
.version("0.1.0")
148148
.about("Generate nucleotide profile from FASTA or FASTQ")
149149
.arg(
150150
Arg::new("reads")
151-
.about("File containing input reads")
151+
.help("File containing input reads")
152152
.long("reads")
153153
.short('R')
154154
.takes_value(true)
@@ -157,7 +157,7 @@ fn main() -> anyhow::Result<()> {
157157
)
158158
.arg(
159159
Arg::new("format")
160-
.about("Input file format")
160+
.help("Input file format")
161161
.long("format")
162162
.short('F')
163163
.takes_value(true)
@@ -166,15 +166,15 @@ fn main() -> anyhow::Result<()> {
166166
)
167167
.arg(
168168
Arg::new("kmer")
169-
.about("Kmer size to be used while calculating frequency")
169+
.help("Kmer size to be used while calculating frequency")
170170
.long("kmer")
171171
.takes_value(true)
172172
.value_name("INT")
173173
.default_value("1"),
174174
)
175175
.arg(
176176
Arg::new("oligo_len")
177-
.about("Oligomer length which nucleotide frequency is calculated for")
177+
.help("Oligomer length which nucleotide frequency is calculated for")
178178
.long("len")
179179
.takes_value(true)
180180
.value_name("INT")

src/main.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use std::{
77

88
use anyhow::Context;
99
use bytecount::count;
10-
use clap::{App, Arg};
10+
use clap::{Arg, Command};
1111
use itertools::Itertools;
1212
use nanoserde::DeRon;
1313
use rand::{prelude::SliceRandom, rngs::SmallRng, Rng, SeedableRng};
@@ -235,7 +235,7 @@ impl<'a> Fastx<'a> {
235235
len: record_seq.len(),
236236
});
237237

238-
update_distmap(&mut ndist, &record_seq, kmer);
238+
update_distmap(&mut ndist, record_seq, kmer);
239239
}
240240
}
241241
normalize_distmap(&mut ndist);
@@ -369,7 +369,7 @@ impl<'a> Fastx<'a> {
369369
_ => "+",
370370
};
371371

372-
update_distmap(&mut out_dist, &seq, kmer);
372+
update_distmap(&mut out_dist, seq, kmer);
373373

374374
if let Some(ref mut bed_file) = bed_file {
375375
bed_file.write_all(
@@ -560,7 +560,7 @@ fn reverse_complement(input: &[u8]) -> Vec<u8> {
560560
}
561561

562562
fn main() -> anyhow::Result<()> {
563-
let matches = App::new("boquila")
563+
let matches = Command::new("boquila")
564564
.version("0.6.0")
565565
.about("Generate NGS reads with same nucleotide distribution as input file\nGenerated reads will be written to stdout\nBy default input and output format is FASTQ")
566566
.arg(Arg::new("src").help("Model file").index(1).required(true))

0 commit comments

Comments
 (0)