Skip to content

Commit

Permalink
added number of first and end sites in goalign clean sites log
Browse files Browse the repository at this point in the history
  • Loading branch information
fredericlemoine committed Apr 27, 2020
1 parent 57f0c1a commit fa7e2d3
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions cmd/cleansites.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ If cutoff is <0 or >1, it will be considered as 0, which means that every site w
will be removed.`,
RunE: func(cmd *cobra.Command, args []string) (err error) {
var aligns *align.AlignChannel
var nbstart, nbend int
var f *os.File

if aligns, err = readalign(infile); err != nil {
Expand All @@ -45,13 +46,15 @@ will be removed.`,
i := 0
for al := range aligns.Achan {
beforelength := al.Length()
al.RemoveGapSites(cleanCutoff, cleanEnds)
nbstart, nbend = al.RemoveGapSites(cleanCutoff, cleanEnds)
afterlength := al.Length()
writeAlign(al, f)
if !cleanQuiet {
io.PrintMessage(fmt.Sprintf("Alignment (%d) length before cleaning=%d", i, beforelength))
io.PrintMessage(fmt.Sprintf("Alignment (%d) length after cleaning=%d", i, afterlength))
io.PrintMessage(fmt.Sprintf("Alignment (%d) number of gaps=%d", i, beforelength-afterlength))
io.PrintSimpleMessage(fmt.Sprintf("Alignment (%d) length before cleaning=%d", i, beforelength))
io.PrintSimpleMessage(fmt.Sprintf("Alignment (%d) length after cleaning=%d", i, afterlength))
io.PrintSimpleMessage(fmt.Sprintf("Alignment (%d) number of gaps=%d", i, beforelength-afterlength))
io.PrintSimpleMessage(fmt.Sprintf("Alignment (%d) number of start gaps=%d", i, nbstart))
io.PrintSimpleMessage(fmt.Sprintf("Alignment (%d) number of end gaps=%d", i, nbend))
}
}

Expand Down

0 comments on commit fa7e2d3

Please sign in to comment.