SeqCombGo/src/nex_tmpl.go

21 lines
400 B
Go
Raw Normal View History

package fas_parser
2022-01-03 12:38:07 +08:00
const Nex_tmpl = `#NEXUS
BEGIN DATA;
2022-01-04 13:55:05 +08:00
DIMENSIONS NTAX={{ .Ntax }} NCHAR={{ .Nchar }};
2022-01-04 20:05:27 +08:00
FORMAT DATATYPE=DNA GAP=- MISSING=?;
2022-01-04 16:59:37 +08:00
MATRIX
{{- range $k, $v := .Matrix }}
2022-01-04 13:55:05 +08:00
'{{ $k }}' {{ $v }}{{ end }}
;
END;
2022-01-04 16:59:37 +08:00
BEGIN SETS;
{{- range $_, $i := .Charset }}
2022-01-05 11:29:59 +08:00
CHARSET {{ $i.Name }} = {{ $i.From }}-{{ $i.To }};
2022-01-04 16:59:37 +08:00
{{- end }}
2022-01-04 13:55:05 +08:00
END;
`
2022-01-04 13:55:05 +08:00
// 最后那个 $i 好像有问题
2022-01-04 20:05:27 +08:00
// {{/* $k| printf "%-40s" */}}