Rename the Length methods Len to follow GO standart

This commit is contained in:
2022-11-17 11:09:58 +01:00
parent eb32089305
commit 29563aa94e
30 changed files with 134 additions and 130 deletions

View File

@ -65,19 +65,12 @@ func _FastseqReader(seqfile C.fast_kseq_p,
slice = append(slice, rep)
ii++
if ii >= batch_size {
//log.Printf("\n==> Pushing sequence batch\n")
// start := time.Now()
iterator.Push(obiiter.MakeBioSequenceBatch(i, slice))
// elapsed := time.Since(start)
// log.Printf("\n==>sequences pushed after %s\n", elapsed)
slice = obiseq.MakeBioSequenceSlice()
i++
ii = 0
}
// log.Println("longueur : ",l,rep.Length())
}
if len(slice) > 0 {

View File

@ -15,9 +15,9 @@ import (
func FormatFastq(seq *obiseq.BioSequence, quality_shift int, formater FormatHeader) string {
l := seq.Length()
l := seq.Len()
q := seq.Qualities()
ascii := make([]byte, seq.Length())
ascii := make([]byte, seq.Len())
for j := 0; j < l; j++ {
ascii[j] = uint8(q[j]) + uint8(quality_shift)

View File

@ -5,12 +5,13 @@ import (
"encoding/csv"
"fmt"
"io"
log "github.com/sirupsen/logrus"
"os"
"path"
"strconv"
"strings"
log "github.com/sirupsen/logrus"
"git.metabarcoding.org/lecasofts/go/obitools/pkg/obitax"
)
@ -101,7 +102,7 @@ func LoadNCBITaxDump(directory string, onlysn bool) (*obitax.Taxonomy, error) {
buffered := bufio.NewReader(nodefile)
loadNodeTable(buffered, taxonomy)
log.Printf("%d Taxonomy nodes read\n", taxonomy.Length())
log.Printf("%d Taxonomy nodes read\n", taxonomy.Len())
//
// Load the Taxonomy nodes