// UngappedCoords returns the positions in the sequence where the character
// does not match the gap character.
UngappedCoords returns the positions in the sequence where the character
does not match the gap character.
// UngappedCoords returns the positions in the sequence where the character // does not match the gap character .
func (s *CharSequence) UngappedCoords(gapChar string) (colCoords []int) {
	set := make(map[int]struct{})
	gapRune := []rune(gapChar)[0]
	for j, s := range []rune(s.sequence) {
		if s != gapRune {
			set[j] = struct{}{} 
		}
	}
	for key := range set {
		colCoords = append(colCoords, key)
	}
	sort.Ints(colCoords)
	return
}
func ( s * CharSequence ) UngappedCoords ( gapChar string ) ( colCoords [ ] int ) { set := make ( map [ int ] struct { } ) gapRune := [ ] rune ( gapChar ) [ 0 ] for j , s := range [ ] rune ( s . sequence ) { if s != gapRune { set [ j ] = struct { } { } } } for key := range set { colCoords = append ( colCoords , key ) } sort . Ints ( colCoords ) return }
UngappedCoords returns the positions in the sequence where the character
does not match the gap character.
UngappedCoords returns the positions in the sequence where the character does not match the gap character .
// Assumes gapChar contains only a "single character" // Convert single character string to rune slice, taking the first item // Range over rune slice, j counts by Unicode code points, s is the rune representation of the character // If sequence rune is not a gap character rune, add to rune position to set, 0-indexed // Uses empty anonymous struct // Range over set of positions // Since this is a map, order is scrambled