mirror of
https://github.com/metabarcoding/obitools4.git
synced 2025-12-08 00:30: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
|
// corresponds to the last commit, and not the one when the file will be
|
||||||
// commited
|
// commited
|
||||||
|
|
||||||
var _Commit = "d35a32b"
|
var _Commit = "27204d5"
|
||||||
var _Version = "Release 4.4.0"
|
var _Version = "Release 4.4.0"
|
||||||
|
|
||||||
// Version returns the version of the obitools package.
|
// 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.
|
// It returns a pointer to the transposed MatrixData.
|
||||||
func (matrix *MatrixData) TransposeMatrixData() *MatrixData {
|
func (matrix *MatrixData) TransposeMatrixData() *MatrixData {
|
||||||
m := MakeMatrixData(matrix.naValue, "id")
|
m := MakeMatrixData(matrix.naValue, "id")
|
||||||
for k, v := range *&matrix.matrix {
|
for k, v := range matrix.matrix {
|
||||||
for kk, vv := range v {
|
for kk, vv := range v {
|
||||||
if _, ok := m.matrix[kk]; !ok {
|
if _, ok := m.matrix[kk]; !ok {
|
||||||
m.matrix[kk] = make(map[string]interface{})
|
m.matrix[kk] = make(map[string]interface{})
|
||||||
}
|
}
|
||||||
m.matrix[kk][k] = vv
|
m.matrix[kk][k] = vv
|
||||||
m.attributes[kk] = map[string]interface{}{"id": k}
|
m.attributes[kk] = map[string]interface{}{"id": kk}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return &m
|
return &m
|
||||||
|
|||||||
Reference in New Issue
Block a user