Update mix.go

This commit is contained in:
kuoi 2022-01-18 14:10:22 +00:00 committed by GitHub
parent de717bf419
commit 410f2e6156
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

13
mix.go
View file

@ -11,10 +11,10 @@ func fas_mix(sum_nex []dna, sum_charset []charset) (map[string][]string, int, in
sum_dna := make(map[string][]string)
for _, v := range sum_nex {
for k1 := range v.min {
_, has := sum_dna[k1]
if !has {
for _, v := range sum_nex { // v is sequence of a sample in a file
for k1 := range v.min { // v.min is sum of intaxname and indsq
_, has := sum_dna[k1] // k1 indataxname
if !has { // has is true, not have is false
sum_dna[k1] = make([]string, len(sum_charset))
ntax++
}
@ -24,10 +24,9 @@ func fas_mix(sum_nex []dna, sum_charset []charset) (map[string][]string, int, in
for _, v1 := range v.min {
for k2 := range sum_dna {
if _, ok := v.min[k2]; ok {
sum_dna[k2][k] = v1
sum_dna[k2][k] = v1 //include is fine
} else {
sum_dna[k2][k] = strings.Repeat("?", v.count)
// 之前就没写错吗?已修复
sum_dna[k2][k] = strings.Repeat("?", v.count) //not include, repeat string ?
}
}
}