+ tileVariant, _ := strconv.Atoi(string(fields[2]))
+ hgvsID := string(fields[3])
+ seqname := string(fields[4])
+ pos, _ := strconv.Atoi(string(fields[5]))
+ refseq := fields[6]
+ if mask != nil && !mask.Check(strings.TrimPrefix(seqname, "chr"), pos, pos+len(refseq)) {
+ // The tile intersects one of
+ // the selected regions, but
+ // this particular HGVS
+ // variant does not.
+ continue
+ }
+ fmt.Fprintf(annow, "%s,%d,%d,%s,%s,%d,%s,%s\n", fields[0], incol+startcol/2, tileVariant, hgvsID, seqname, pos, refseq, fields[7])
+ hgvscols := hgvs[hgvsID]
+ if hgvscols[0] == nil {
+ hgvscols = [2][]int16{make([]int16, len(cgnames)), make([]int16, len(cgnames))}
+ hgvs[hgvsID] = hgvscols
+ }
+ for ph := 0; ph < 2; ph++ {
+ for row := 0; row < rows; row++ {
+ if v := chunk[row*chunkcols+incol*2+ph]; int(v) == tileVariant {
+ hgvscols[ph][row] = 1
+ } else if v < 0 {
+ hgvscols[ph][row] = -1
+ }
+ }
+ }