Skip to content

Commit

Permalink
readme
Browse files Browse the repository at this point in the history
  • Loading branch information
dagou committed Sep 11, 2024
1 parent 7cf28d4 commit 86cc66a
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 23 deletions.
9 changes: 3 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
[workspace]
members = [
"ncbi",
"kr2r",
"seqkmer"]
members = ["ncbi", "kr2r", "seqkmer"]
resolver = "2"

[profile.release]
lto = true
opt-level = "s" # 或者 "z"
opt-level = "s" # 或者 "z"
debug-assertions = false
# panic = 'abort'
codegen-units = 1 # Compile crates one after another so the compiler can optimize better
strip = true # Remove debug symbols
strip = true # Remove debug symbols
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ This will build the kr2r and ncbi project in release mode.
Next, run the example script that demonstrates how to use the `kun_peng` binary. Execute the following command from the root of the workspace:

``` sh
cargo run --release --example build_and_classify --package kr2r
cargo run --release --example build_and_classify --package kun_peng
```

This will run the build_and_classify.rs example located in the kr2r project's examples directory.
Expand All @@ -124,42 +124,42 @@ kun_peng direct error: [any direct errors here]

This output confirms that the `kun_peng` commands were executed successfully and the files were processed as expected.

## ncbi tool
## ncbi_dl tool


#### Run the `ncbi` Example

Run the example script in the ncbi project to download the necessary files. Execute the following command from the root of the workspace:

``` sh
cargo run --release --example run_download --package ncbi
cargo run --release --example run_download --package ncbi_dl
```

This will run the run_download.rs example located in the ncbi project's examples directory. The script will:

1. Ensure the necessary directories exist.
2. Download the required files using the ncbi binary with the following commands:

- ./target/release/ncbi -d downloads gen -g archaea
- ./target/release/ncbi -d downloads tax
- ./target/release/ncbi_dl -d downloads gen -g archaea
- ./target/release/ncbi_dl -d downloads tax

Example Output You should see output similar to the following:

``` txt
Executing command: /path/to/workspace/target/release/ncbi -d /path/to/workspace/downloads gen -g archaea
Executing command: /path/to/workspace/target/release/ncbi_dl -d /path/to/workspace/downloads gen -g archaea
NCBI binary output: [download output here]
Executing command: /path/to/workspace/target/release/ncbi -d /path/to/workspace/downloads tax
Executing command: /path/to/workspace/target/release/ncbi_dl -d /path/to/workspace/downloads tax
NCBI binary output: [download output here]
```

The ncbi binary is used to download resources from the NCBI website. Here is the help manual for the ncbi binary:
The ncbi_dl binary is used to download resources from the NCBI website. Here is the help manual for the ncbi_dl binary:

``` sh
./target/release/ncbi -h
ncbi download resource
./target/release/ncbi_dl -h
ncbi_dl download resource

Usage: ncbi [OPTIONS] <COMMAND>
Usage: ncbi_dl [OPTIONS] <COMMAND>

Commands:
taxonomy Download taxonomy files from NCBI (alias: tax)
Expand Down
10 changes: 5 additions & 5 deletions ncbi/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
## ncbi tool
## ncbi_dl tool

The ncbi binary is used to download resources from the NCBI website. Here is the help manual for the ncbi binary:
The ncbi_dl binary is used to download resources from the NCBI website. Here is the help manual for the ncbi_dl binary:

``` sh
./target/release/ncbi -h
ncbi download resource
./target/release/ncbi_dl -h
ncbi_dl download resource

Usage: ncbi [OPTIONS] <COMMAND>
Usage: ncbi_dl [OPTIONS] <COMMAND>

Commands:
taxonomy Download taxonomy files from NCBI (alias: tax)
Expand Down
2 changes: 1 addition & 1 deletion ncbi/examples/run_download.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ fn main() {
.to_path_buf();

// Run the NCBI binary to download files
let ncbi_binary = workspace_root.join("target/release/ncbi");
let ncbi_binary = workspace_root.join("target/release/ncbi_dl");
let download_dir = workspace_root.join("downloads");
// Ensure the download directory exists
fs::create_dir_all(&download_dir).expect("Failed to create download directory");
Expand Down

0 comments on commit 86cc66a

Please sign in to comment.