| 1 | package parsersscip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/parsers`/ |
| 2 | |
| 3 | import ( |
| 4 | "ioscip-go gomod github.com/golang/go/src go1.23.0 io/" |
| 5 | |
| 6 | "github.com/brentp/irelate/interfacesscip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/interfaces`/" |
| 7 | "github.com/brentp/vcfgoscip-go gomod github.com/brentp/vcfgo a31336cef488 `github.com/brentp/vcfgo`/" |
| 8 | ) |
| 9 | |
| 10 | type Variantscip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/parsers`/Variant# struct { |
| 11 | interfacesscip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/interfaces`/.IVariantscip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/parsers`/Variant#IVariant. |
| 12 | sourcescip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/parsers`/Variant#source. uint32 |
| 13 | relatedscip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/parsers`/Variant#related. []interfacesscip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/interfaces`/.Relatablescip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/interfaces`/Relatable# |
| 14 | } |
| 15 | |
| 16 | func (v *Variantscip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/parsers`/Variant#) Stringscip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/parsers`/Variant#String().() string { |
| 17 | return v.IVariantscip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/parsers`/Variant#IVariant..Stringscip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/interfaces`/IVariant#String.() |
| 18 | } |
| 19 | |
| 20 | func NewVariantscip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/parsers`/NewVariant().(v interfacesscip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/interfaces`/.IVariantscip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/interfaces`/IVariant#, source uint32, related []interfacesscip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/interfaces`/.Relatablescip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/interfaces`/Relatable#) *Variantscip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/parsers`/Variant# { |
| 21 | return &Variantscip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/parsers`/Variant#{v, source, related} |
| 22 | } |
| 23 | |
| 24 | func (v *Variantscip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/parsers`/Variant#) AddRelatedscip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/parsers`/Variant#AddRelated().(r interfacesscip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/interfaces`/.Relatablescip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/interfaces`/Relatable#) { |
| 25 | if len(v.relatedscip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/parsers`/Variant#related.) == 0 { |
| 26 | v.relatedscip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/parsers`/Variant#related. = make([]interfacesscip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/interfaces`/.Relatablescip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/interfaces`/Relatable#, 0, 2) |
| 27 | } |
| 28 | v.relatedscip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/parsers`/Variant#related. = append(v.relatedscip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/parsers`/Variant#related., r) |
| 29 | } |
| 30 | |
| 31 | func (v *Variantscip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/parsers`/Variant#) Relatedscip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/parsers`/Variant#Related().() []interfacesscip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/interfaces`/.Relatablescip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/interfaces`/Relatable# { |
| 32 | return v.relatedscip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/parsers`/Variant#related. |
| 33 | } |
| 34 | |
| 35 | func (v *Variantscip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/parsers`/Variant#) SetSourcescip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/parsers`/Variant#SetSource().(src uint32) { v.sourcescip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/parsers`/Variant#source. = src } |
| 36 | func (v *Variantscip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/parsers`/Variant#) Sourcescip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/parsers`/Variant#Source().() uint32 { return v.sourcescip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/parsers`/Variant#source. } |
| 37 | |
| 38 | func Vopenscip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/parsers`/Vopen().(rdr ioscip-go gomod github.com/golang/go/src go1.23.0 io/.Readerscip-go gomod github.com/golang/go/src go1.23.0 io/Reader#, hdr *vcfgoscip-go gomod github.com/brentp/vcfgo a31336cef488 `github.com/brentp/vcfgo`/.Headerscip-go gomod github.com/brentp/vcfgo a31336cef488 `github.com/brentp/vcfgo`/Header#) (*vcfgoscip-go gomod github.com/brentp/vcfgo a31336cef488 `github.com/brentp/vcfgo`/.Readerscip-go gomod github.com/brentp/vcfgo a31336cef488 `github.com/brentp/vcfgo`/Reader#, error) { |
| 39 | if hdr == nil { |
| 40 | return vcfgoscip-go gomod github.com/brentp/vcfgo a31336cef488 `github.com/brentp/vcfgo`/.NewReaderscip-go gomod github.com/brentp/vcfgo a31336cef488 `github.com/brentp/vcfgo`/NewReader().(rdr, true) |
| 41 | } |
| 42 | return vcfgoscip-go gomod github.com/brentp/vcfgo a31336cef488 `github.com/brentp/vcfgo`/.NewWithHeaderscip-go gomod github.com/brentp/vcfgo a31336cef488 `github.com/brentp/vcfgo`/NewWithHeader().(rdr, hdr, true) |
| 43 | } |
| 44 | |
| 45 | func StreamVCFscip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/parsers`/StreamVCF().(vcf *vcfgoscip-go gomod github.com/brentp/vcfgo a31336cef488 `github.com/brentp/vcfgo`/.Readerscip-go gomod github.com/brentp/vcfgo a31336cef488 `github.com/brentp/vcfgo`/Reader#) interfacesscip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/interfaces`/.RelatableChannelscip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/interfaces`/RelatableChannel# { |
| 46 | ch := make(interfacesscip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/interfaces`/.RelatableChannelscip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/interfaces`/RelatableChannel#, 256) |
| 47 | go func() { |
| 48 | j := 0 |
| 49 | for { |
| 50 | v := vcf.Readscip-go gomod github.com/brentp/vcfgo a31336cef488 `github.com/brentp/vcfgo`/Reader#Read().() |
| 51 | if v == nil { |
| 52 | break |
| 53 | } |
| 54 | ch <- &Variantscip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/parsers`/Variant#{v, 0, nil} |
| 55 | j++ |
| 56 | if j < 1000 { |
| 57 | vcf.Clearscip-go gomod github.com/brentp/vcfgo a31336cef488 `github.com/brentp/vcfgo`/Reader#Clear().() |
| 58 | j = 0 |
| 59 | } |
| 60 | } |
| 61 | close(ch) |
| 62 | }() |
| 63 | return ch |
| 64 | } |
| 65 | |
| 66 | type vWrapperscip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/parsers`/vWrapper# struct { |
| 67 | *vcfgoscip-go gomod github.com/brentp/vcfgo a31336cef488 `github.com/brentp/vcfgo`/.Readerscip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/parsers`/vWrapper#Reader. |
| 68 | } |
| 69 | |
| 70 | func (v vWrapperscip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/parsers`/vWrapper#) Nextscip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/parsers`/vWrapper#Next().() (interfacesscip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/interfaces`/.Relatablescip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/interfaces`/Relatable#, error) { |
| 71 | r := v.Readscip-go gomod github.com/brentp/vcfgo a31336cef488 `github.com/brentp/vcfgo`/Reader#Read().() |
| 72 | if r == nil { |
| 73 | return nil, ioscip-go gomod github.com/golang/go/src go1.23.0 io/.EOFscip-go gomod github.com/golang/go/src go1.23.0 io/EOF. |
| 74 | } |
| 75 | return &Variantscip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/parsers`/Variant#{r, 0, nil}, nil |
| 76 | } |
| 77 | |
| 78 | func (v vWrapperscip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/parsers`/vWrapper#) AddInfoToHeaderscip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/parsers`/vWrapper#AddInfoToHeader().(id, itype, number, description string) { |
| 79 | v.Readerscip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/parsers`/vWrapper#Reader..AddInfoToHeaderscip-go gomod github.com/brentp/vcfgo a31336cef488 `github.com/brentp/vcfgo`/Reader#AddInfoToHeader().(id, itype, number, description) |
| 80 | } |
| 81 | |
| 82 | func VCFIteratorscip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/parsers`/VCFIterator().(buf ioscip-go gomod github.com/golang/go/src go1.23.0 io/.Readerscip-go gomod github.com/golang/go/src go1.23.0 io/Reader#) (interfacesscip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/interfaces`/.RelatableIteratorscip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/interfaces`/RelatableIterator#, *vcfgoscip-go gomod github.com/brentp/vcfgo a31336cef488 `github.com/brentp/vcfgo`/.Readerscip-go gomod github.com/brentp/vcfgo a31336cef488 `github.com/brentp/vcfgo`/Reader#, error) { |
| 83 | v, err := Vopenscip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/parsers`/Vopen().(buf, nil) |
| 84 | if err != nil { |
| 85 | return nil, v, err |
| 86 | } |
| 87 | return vWrapperscip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/parsers`/vWrapper#{v}, v, nil |
| 88 | } |