-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Finished writing the code and had no access to internet since morning and hence pushing it now. Final and binary release.
- Loading branch information
1 parent
391e857
commit 11290ec
Showing
9 changed files
with
437 additions
and
2 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[package] | ||
name = "rust-lcp-arrays" | ||
version = "0.1.0" | ||
edition = "2021" | ||
|
||
[dependencies] | ||
clap = { version = "4.5.23", features = ["derive"] } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,31 @@ | ||
# rust-suffix-lcp-arrays | ||
rust suffix lcp arrays | ||
# rust-lcp-arrays | ||
|
||
- rust lcp arrays | ||
- kasai algorithm says that use a inverse suffix tree but that is cost consuming.Instead, i implemented a string compression way so that it estimates the proportion of the | ||
match based on the ith offset for the i+1 offset. | ||
- general note: Incase of Golang and RUST, please see the last commit message and if it says compiled binary then it is completed or else still in development version. | ||
|
||
|
||
``` | ||
cargo build | ||
``` | ||
``` | ||
➜ gauravsablok rust-suffix-lcp git:(main) ✗ ./target/debug/rust-lcp-arrays -h | ||
Usage: rust-lcp-arrays <LCPARRAY_ARG> | ||
Arguments: | ||
<LCPARRAY_ARG> please provide the path to the fastq file | ||
Options: | ||
-h, --help Print help | ||
-V, --version Print version | ||
``` | ||
- to run the binary | ||
``` | ||
./rust-lcp-arrays ./sample-files/sample.fasta | ||
{[28, 19, 24, 15, 11, 7, 21, 4, 0, 20, 3, 25, 16, 12, 8, 27, 18, 23, 14, 10, 6, 2, 26, 17, 22, 13, 9, 5, 1]: LCPArray { suffixindex: [28, 19, 24, 15, 11, 7, 21, 4, 0, 20, 3, 25, 16, 12, 8, 27, 18, 23, 14, 10, 6, 2, 26, 17, 22, 13, 9, 5, 1], suffixarray: ["A", "ACATGACTGA", "ACTGA", "ACTGACATGACTGA", "ACTGACTGACATGACTGA", "ACTGACTGACTGACATGACTGA", "ATGACTGA", "ATGACTGACTGACTGACATGACTGA", "ATGCATGACTGACTGACTGACATGACTGA", "CATGACTGA", "CATGACTGACTGACTGACATGACTGA", "CTGA", "CTGACATGACTGA", "CTGACTGACATGACTGA", "CTGACTGACTGACATGACTGA", "GA", "GACATGACTGA", "GACTGA", "GACTGACATGACTGA", "GACTGACTGACATGACTGA", "GACTGACTGACTGACATGACTGA", "GCATGACTGACTGACTGACATGACTGA", "TGA", "TGACATGACTGA", "TGACTGA", "TGACTGACATGACTGA", "TGACTGACTGACATGACTGA", "TGACTGACTGACTGACATGACTGA", "TGCATGACTGACTGACTGACATGACTGA"], lcparray: [1, 0, 5, 0, 0, 0, 8, 0, 0, 9, 0, 4, 0, 0, 0, 2, 0, 6, 0, 0, 0, 0, 3, 0, 7, 0, 0, 0, 0] }} | ||
``` | ||
|
||
Gaurav Sablok |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[28, 19, 24, 15, 11, 7, 21, 4, 0, 20, 3, 25, 16, 12, 8, 27, 18, 23, 14, 10, 6, 2, 26, 17, 22, 13, 9, 5, 1] [28, 19, 24, 15, 11, 7, 21, 4, 0, 20, 3, 25, 16, 12, 8, 27, 18, 23, 14, 10, 6, 2, 26, 17, 22, 13, 9, 5, 1] ["A", "ACATGACTGA", "ACTGA", "ACTGACATGACTGA", "ACTGACTGACATGACTGA", "ACTGACTGACTGACATGACTGA", "ATGACTGA", "ATGACTGACTGACTGACATGACTGA", "ATGCATGACTGACTGACTGACATGACTGA", "CATGACTGA", "CATGACTGACTGACTGACATGACTGA", "CTGA", "CTGACATGACTGA", "CTGACTGACATGACTGA", "CTGACTGACTGACATGACTGA", "GA", "GACATGACTGA", "GACTGA", "GACTGACATGACTGA", "GACTGACTGACATGACTGA", "GACTGACTGACTGACATGACTGA", "GCATGACTGACTGACTGACATGACTGA", "TGA", "TGACATGACTGA", "TGACTGA", "TGACTGACATGACTGA", "TGACTGACTGACATGACTGA", "TGACTGACTGACTGACATGACTGA", "TGCATGACTGACTGACTGACATGACTGA"] [1, 0, 5, 0, 0, 0, 8, 0, 0, 9, 0, 4, 0, 0, 0, 2, 0, 6, 0, 0, 0, 0, 3, 0, 7, 0, 0, 0, 0] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
@samplefasta | ||
ATGCATGACTGACTGACTGACATGACTGA |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
use clap::Parser; | ||
|
||
#[derive(Debug, Parser)] | ||
#[clap(version)] | ||
|
||
pub struct LCPArraysArgs { | ||
/// please provide the path to the fastq file | ||
pub lcparray_arg: String | ||
} |
Oops, something went wrong.