Skip to content

Commit

Permalink
Minor edits
Browse files Browse the repository at this point in the history
  • Loading branch information
Euphrasiologist committed Jul 15, 2021
1 parent 05d6d28 commit 7df586e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@ Fast statistics in windows over a genome in fasta format.
- GC content
- GC proportion
- GC skew
- Shannon entropy
- Proportion of G's, C's, A's, T's, N's
- Shannon entropy
- Di/tri/tetranucleotide shannon diversity
- Di/tri/tetranucleotide frequency arrays

## Usage

Fewer options than previous versions, as di/tri/tetranucleotide diversity is calculated instead of user input for kmer length.
The masked (-m) flag only affects the first four output options above - kmers are coerced to uppercase, and shannon entropy probably needs some attention on that.

```
Fasta windows 0.2.1
Expand All @@ -21,17 +22,15 @@ USAGE:
fasta_windows [FLAGS] [OPTIONS] --fasta <fasta> --output <output>
FLAGS:
-h, --help Prints help information
-m, --masked Consider only uppercase nucleotides in the calculations.
-V, --version Prints version information
-c, --canonical_kmers Should the canonical kmers be calculated?
-h, --help Prints help information
-m, --masked Consider only uppercase nucleotides in the calculations.
-V, --version Prints version information
OPTIONS:
-c, --canonical_kmers <canonical_kmers> Should the canonical kmers be calculated? Boolean, input true or false.
[default: false]
-f, --fasta <fasta> The input fasta file.
-o, --output <output> Output filename for the CSV (without extension).
-w, --window_size <window_size> Integer size of window for statistics to be computed over. [default:
1000]
-f, --fasta <fasta> The input fasta file.
-o, --output <output> Output filename for the CSV (without extension).
-w, --window_size <window_size> Integer size of window for statistics to be computed over. [default: 1000]
```

## Building
Expand Down Expand Up @@ -75,6 +74,7 @@ Also output (non-optional at the moment), are three more TSV's, which are the ar
e.g. for dinucleotide frequencies:

```
ID start end AA AC AG AT CA CC CG CT GA GC GG GT TA TC TG TT
SUPER_1 0 1000 122 120 45 73 134 68 39 46 50 55 45 15 54 44 36 53
SUPER_1 1000 2000 140 83 32 90 85 54 22 66 30 25 19 39 91 65 40 118
SUPER_1 2000 3000 216 181 4 5 4 181 5 181 3 8 3 3 183 1 516
Expand Down
6 changes: 3 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ fn main() {
}
writeln!(
window_file_2,
"id\tstart\tend\t{}",
"ID\tstart\tend\t{}",
kmer_maps::WriteKmerValues(dinuc_headers)
)
.unwrap_or_else(|_| eprintln!("[-]\tError in writing to file."));
Expand All @@ -265,7 +265,7 @@ fn main() {
}
writeln!(
window_file_3,
"id\tstart\tend\t{}",
"ID\tstart\tend\t{}",
kmer_maps::WriteKmerValues(trinuc_headers)
)
.unwrap_or_else(|_| eprintln!("[-]\tError in writing to file."));
Expand All @@ -289,7 +289,7 @@ fn main() {
}
writeln!(
window_file_4,
"id\tstart\tend\t{}",
"ID\tstart\tend\t{}",
kmer_maps::WriteKmerValues(tetranuc_headers)
)
.unwrap_or_else(|_| eprintln!("[-]\tError in writing to file."));
Expand Down

0 comments on commit 7df586e

Please sign in to comment.