mirror of
https://github.com/metabarcoding/obitools4.git
synced 2025-12-07 16:20:27 +00:00
obimatrix bugs
This commit is contained in:
@@ -8,7 +8,7 @@ import (
|
||||
// corresponds to the last commit, and not the one when the file will be
|
||||
// commited
|
||||
|
||||
var _Commit = "d35a32b"
|
||||
var _Commit = "27204d5"
|
||||
var _Version = "Release 4.4.0"
|
||||
|
||||
// Version returns the version of the obitools package.
|
||||
|
||||
@@ -54,13 +54,13 @@ func NewMatrixData(naValue string, attributes ...string) *MatrixData {
|
||||
// It returns a pointer to the transposed MatrixData.
|
||||
func (matrix *MatrixData) TransposeMatrixData() *MatrixData {
|
||||
m := MakeMatrixData(matrix.naValue, "id")
|
||||
for k, v := range *&matrix.matrix {
|
||||
for k, v := range matrix.matrix {
|
||||
for kk, vv := range v {
|
||||
if _, ok := m.matrix[kk]; !ok {
|
||||
m.matrix[kk] = make(map[string]interface{})
|
||||
}
|
||||
m.matrix[kk][k] = vv
|
||||
m.attributes[kk] = map[string]interface{}{"id": k}
|
||||
m.attributes[kk] = map[string]interface{}{"id": kk}
|
||||
}
|
||||
}
|
||||
return &m
|
||||
|
||||
Reference in New Issue
Block a user