Skip to content

Commit

Permalink
Added comments and doc
Browse files Browse the repository at this point in the history
  • Loading branch information
fredericlemoine committed Jul 3, 2017
1 parent faa678a commit c308d88
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
4 changes: 4 additions & 0 deletions align/align.go
Original file line number Diff line number Diff line change
Expand Up @@ -954,6 +954,10 @@ func (a *align) Concat(c Alignment) (err error) {
return err
}

/*
Returns the number of variable sites in the alignment.
It does not take into account gaps and other charactes like "."
*/
func (a *align) NbVariableSites() int {
nbinfo := 0
for site := 0; site < a.Length(); site++ {
Expand Down
7 changes: 5 additions & 2 deletions cmd/stats.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,11 @@ var statsCmd = &cobra.Command{
Short: "Prints different characteristics of the alignment",
Long: `Prints different characteristics of the alignment.
1 - Length
2 - Number of sequences
1. Length of alignment;
2. Number of sequences;
3. Average number of alleles per site;
4. Number of variables sites (does ot take into account gaps or special characters);
5. Character frequencies.
If the input alignment contains several alignments, will process all of them
Expand Down
3 changes: 2 additions & 1 deletion docs/commands/stats.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ Without any subcommand, it prints the following information:
1. Length of alignment;
2. Number of sequences;
3. Average number of alleles per site;
4. Character frequencies.
4. Number of variables sites (does ot take into account gaps or special characters);
5. Character frequencies.

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

0 comments on commit c308d88

Please sign in to comment.