Skip to content

Commit

Permalink
Corrected doc
Browse files Browse the repository at this point in the history
  • Loading branch information
fredericlemoine committed Apr 30, 2020
1 parent e363704 commit f984bdd
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 6 deletions.
14 changes: 12 additions & 2 deletions cmd/stats.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,29 @@ If --per-sequences is given, then it will print the following stats, for each se
2. Number of consecutive gaps at the beginning of the sequence;
3. Number of consecutive gaps at the end of the sequence;
4. Number of gaps unique to the sequence (present in no other sequence);
If --profile is given along, then the output will be : unique\tnew\tboth, with:
If --count-profile is given along, then the output will be : unique\tnew\tboth, with:
- 4a unique: # gaps that are unique in each sequence in the alignment
- 4b new: # gaps that are new in each sequence compared to the profile
- 4c both: # gaps that are unique in each sequence in the alignment and that are new compared the profile
5. Number of gap opennings (streches of gaps are counted once);
6. Number of Unique mutations;
If --profile is given along, then the output will be : unique\tnew\tboth, with:
If --count-profile is given along, then the output will be : unique\tnew\tboth, with:
- 6a unique: # mutations that are unique in each sequence in the alignment
- 6b new: # mutations that are new in each sequence compared to the profile
- 6c both: # mutations that are unique in each sequence in the alignment and that are new compared the profile
7. Number of mutations compared to a reference sequence (given with --ref-sequence, otherwise, no column);
8. Length of the sequence without gaps;
9..n Number of occurence of each character (A,C,G, etc.).
Note that --count-profile takes a tab separated file such as given by the command
goalign stats char --per-sites
site A C G T
0 nA nC nG nT
1...
...
n...
`,
RunE: func(cmd *cobra.Command, args []string) (err error) {
var aligns *align.AlignChannel
Expand Down
10 changes: 9 additions & 1 deletion cmd/stats_gaps.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,22 @@ var statGapsCmd = &cobra.Command{
- If --from-start is specified, then counts only gaps at sequence starts;
- If --from-end is specified, then counts only gaps at sequence ends;
- If --unique is specified, then counts only gaps that are unique in their column.
If --profile is given along --unique, then the output will be : unique\tnew\tboth, with:
If --count-profile is given along with --unique, then the output will be : unique\tnew\tboth, with:
- unique: # gaps that are unique in each sequence in the alignment
- new: # gaps that are new in each sequence compared to the profile
- both: # gaps that are unique in each sequence in the alignment and that are new compared the profile
- If --openning is specified, then counts only gap openning (streches of gaps are counted once)
- Otherwise, counts total number of gaps
for the given sequence.
Note that --count-profile takes a tab separated file such as the one given by the command
goalign stats char --per-sites
site A C G T
0 nA nC nG nT
1...
...
n...
`,
RunE: func(cmd *cobra.Command, args []string) (err error) {
var aligns *align.AlignChannel
Expand Down
12 changes: 11 additions & 1 deletion cmd/stats_mutations.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ var statMutationsCmd = &cobra.Command{
- If --unique is specified, then counts only mutations (characters) that are unique in their column
for the given sequence.
If --profile is given along --unique, then the output will be : unique\tnew\tboth, with:
If --count-profile is given along with --unique, then the output will be : unique\tnew\tboth, with:
- unique: # mutations that are unique in each sequence in the alignment
- new: # mutations that are new in each sequence compared to the profile
- both: # mutations that are unique in each sequence in the alignment and that are new compared the profile
Expand All @@ -32,6 +32,16 @@ var statMutationsCmd = &cobra.Command{
It does not take into account '-' and 'N' as unique mutations, and does not take into account '-' and 'N' as mutations compared
to a reference sequence.
Note that --count-profile takes a tab separated file such as the one given by the command
goalign stats char --per-sites
site A C G T
0 nA nC nG nT
1...
...
n...
`,
RunE: func(cmd *cobra.Command, args []string) (err error) {
var aligns *align.AlignChannel
Expand Down
13 changes: 11 additions & 2 deletions docs/commands/stats.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ If `--per-sequences` option is given, then prints statistics for all sequences i
4. gapsend: Number of consecutive gaps at the end;
5. gapsuniques: Number of gaps unique to that sequence;

If --profile is given along, then the output will be : unique\tnew\tboth, with:
If --count-profile is given, then the output will be : unique\tnew\tboth, with:
- 5a unique: # gaps that are unique in each sequence in the alignment
- 5b new: # gaps that are new in each sequence compared to the profile
- 5c both: # gaps that are unique in each sequence in the alignment and that are new compared the profile

6. gapsopenning: Number of streches of gaps;
7. mutuniques: Number of unique mutations;

If --profile is given along, then the output will be : unique\tnew\tboth, with:
If --count-profile is given, then the output will be : unique\tnew\tboth, with:
- 7a unique: # mutations that are unique in each sequence in the alignment
- 7b new: # mutations that are new in each sequence compared to the profile
- 7c both: # mutations that are unique in each sequence in the alignment and that are new compared the profile
Expand All @@ -36,6 +36,15 @@ If `--per-sequences` option is given, then prints statistics for all sequences i
8. length: Lenght of the unaligned sequence;
9. A C G T...: Number of occurence of each character.

Note that `--count-profile`takes a tab separated file such as given by the command `goalign stats char --per-sites`:

```
site A C G T
0 nA nC nG nT
1...
...
n
```

Different sub-commands:
* `goalign stats alleles`: Prints the average number of alleles per site of the alignment;
Expand Down

0 comments on commit f984bdd

Please sign in to comment.