Update mix.go
This commit is contained in:
parent
de717bf419
commit
410f2e6156
1 changed files with 6 additions and 7 deletions
13
mix.go
13
mix.go
|
@ -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 ?
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue