Skip to content

Commit

Permalink
优化
Browse files Browse the repository at this point in the history
  • Loading branch information
eric committed Jan 5, 2024
1 parent ad39c84 commit 2078e98
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 36 deletions.
35 changes: 8 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,38 +3,19 @@

## 从 NCBI 下载数据
```
cargo run --bin ncbi -- -h
Compiling ncbi v0.1.0 (/Users/eric/kraken2-rust/ncbi)
Finished dev [unoptimized + debuginfo] target(s) in 0.79s
Running `target/debug/ncbi -h`
$ ./ncbi -h
ncbi download resource
Usage: ncbi [OPTIONS]
Options:
-l, --list 列出 NCBI 站点上的种类列表信息,实时拉取
-d, --database <DATABASE> 构建数据库的目录 [default: lib]
-g, --group <GROUP> 从 NCBI 站点上下载某个种类的数据信息,必须是列表中所列名称
-c, --check-md5 <CHECK_MD5> 检查文件的 md5 [default: true] [possible values: true, false]
-p, --parallel <PARALLEL> 下载时的并行大小 [default: 8]
-h, --help Print help (see more with '--help')
-V, --version Print version
```

### md5 文件校验
```
cargo run --bin ncbi_md5 -- -h
Finished dev [unoptimized + debuginfo] target(s) in 0.07s
Running `target/debug/ncbi_md5 -h`
ncbi check genomics file md5sum
Usage: ncbi_md5 [OPTIONS]
Options:
-d, --database <DATABASE> 数据库的路径 [default: lib]
-g, --group <GROUP> 从 NCBI 站点上下载某个种类的数据信息,必须是列表中所列名称
--delete 删除校验错误的文件
-l, --list 列出 NCBI 站点上的种类列表信息,实时拉取
-d, --database <DATABASE> 构建数据库的目录 [default: lib]
-g, --group <GROUP> 从 NCBI 站点上下载某个种类的数据信息,必须是列表中所列名称,archaea,bacteria,fungi...
-m, --md5 仅检查文件的 md5
-t, --threads <THREADS> 下载时的并行大小 [default: 8]
-h, --help Print help (see more with '--help')
-V, --version Print version
```

10 changes: 1 addition & 9 deletions ncbi/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,18 +1,10 @@
[package]
name = "ncbi"
version = "0.1.0"
version = "0.1.1"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[[bin]]
name = "ncbi"
path = "src/bin/ncbi.rs"

# [[bin]]
# name = "ncbi_md5"
# path = "src/bin/md5.rs"

[dependencies]
reqwest = { version = "0.11", features = ["stream", "multipart", "gzip"] }
tokio = { version = "1", features = ["full"] }
Expand Down
File renamed without changes.

0 comments on commit 2078e98

Please sign in to comment.