func OtherFileMap(other string) (map[otherFileRow]struct{}, error) {
	otherFile, err := os.Open(other)
	if err != nil {
		return nil, pfx.Err(err)
	}
	defer otherFile.Close()

	r := csv.NewReader(otherFile)
	r.Comma = '\t'
	rows, err := r.ReadAll()
	if err != nil {
		return nil, pfx.Err(err)
	}

	out := make(map[otherFileRow]struct{})

	for _, row := range rows {
		if len(row) < 3 {
			continue
		}

		out[otherFileRow{RSID: row[0], Ref: row[1], Alt: row[2]}] = struct{}{}
	}

	return out, nil
}
// OtherFileMap converts your alternative input file into a map based on rsid,
// ref, and alt.
OtherFileMap converts your alternative input file into a map based on rsid,
ref, and alt.
// OtherFileMap converts your alternative input file into a map based on rsid // ref and alt .
func OtherFileMap(other string) (map[otherFileRow]struct{}, error) {
	otherFile, err := os.Open(other)
	if err != nil {
		return nil, pfx.Err(err)
	}
	defer otherFile.Close()
	r := csv.NewReader(otherFile)
	r.Comma = '\t'
	rows, err := r.ReadAll()
	if err != nil {
		return nil, pfx.Err(err)
	}
	out := make(map[otherFileRow]struct{})
	for _, row := range rows {
		if len(row) < 3 {
			continue
		}
		out[otherFileRow{RSID: row[0], Ref: row[1], Alt: row[2]}] = struct{}{}
	}
	return out, nil
}
func OtherFileMap ( other string ) ( map [ otherFileRow ] struct { } , error ) { otherFile , err := os . Open ( other ) if err != nil { return nil , pfx . Err ( err ) } defer otherFile . Close ( ) r := csv . NewReader ( otherFile ) r . Comma = '\t' rows , err := r . ReadAll ( ) if err != nil { return nil , pfx . Err ( err ) } out := make ( map [ otherFileRow ] struct { } ) for _ , row := range rows { if len ( row ) < 3 { continue } out [ otherFileRow { RSID : row [ 0 ] , Ref : row [ 1 ] , Alt : row [ 2 ] } ] = struct { } { } } return out , nil }
OtherFileMap converts your alternative input file into a map based on rsid,
ref, and alt.
OtherFileMap converts your alternative input file into a map based on rsid ref and alt .