From fa7e2d35cdf23bdb26947fd8ad71f27b57e9f2b3 Mon Sep 17 00:00:00 2001 From: Frederic Lemoine Date: Mon, 27 Apr 2020 12:17:47 +0200 Subject: [PATCH] added number of first and end sites in goalign clean sites log --- cmd/cleansites.go | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/cmd/cleansites.go b/cmd/cleansites.go index 34b3fc7..241e318 100644 --- a/cmd/cleansites.go +++ b/cmd/cleansites.go @@ -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 { @@ -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)) } }