From b8ce754e28e969ff7000a37759c12bc3ec71b09c Mon Sep 17 00:00:00 2001 From: Brent Pedersen Date: Fri, 24 Feb 2017 11:44:44 -0700 Subject: [PATCH] allow postannotation to set the ID column. closes #51 --- README.md | 12 +++++++ api/api.go | 32 +++++++++++++------ tests/dbnsfp/Calls_for_dbNSFP_example.vcf.gz | Bin 2823 -> 2828 bytes tests/dbnsfp/conf.toml | 6 ++++ tests/dbnsfp/dbNSFP_example.txt.gz | Bin 0 -> 3403 bytes tests/dbnsfp/dbNSFP_example.txt.gz.tbi | Bin 0 -> 149 bytes tests/functional-test.sh | 6 ++-- vcfanno.go | 2 +- 8 files changed, 46 insertions(+), 12 deletions(-) create mode 100644 tests/dbnsfp/dbNSFP_example.txt.gz create mode 100644 tests/dbnsfp/dbNSFP_example.txt.gz.tbi diff --git a/README.md b/README.md index 5003a0a..01bc418 100644 --- a/README.md +++ b/README.md @@ -156,6 +156,18 @@ indicate the fields (from the INFO) that will be available to the op, and the *o powerful. For an extensive example that demonstrates the utility of this type of approach, see [docs/examples/clinvar_exac.md](http://brentp.github.io/vcfanno/examples/clinvar_exac/). +A user can set the ID field of the VCF in a `[[postannotation]]` block by using `name=ID`. For example: + +``` +[[postannotation]] +name="ID" +fields=["other_field", "ID"] +op="lua:other_field .. ';' .. ID" +type="String" +``` + +will take the value in `other_field`, concatenate it with the existing ID, and set the ID to that value. + Binaries ======== diff --git a/api/api.go b/api/api.go index 76608b7..52dc03b 100644 --- a/api/api.go +++ b/api/api.go @@ -423,12 +423,13 @@ func (s *Source) UpdateHeader(r HeaderUpdater, ends bool, htype string, number s } // PostAnnotate happens after everything is done. -func (a *Annotator) PostAnnotate(chrom string, start int, end int, info interfaces.Info, prefix string) error { +func (a *Annotator) PostAnnotate(chrom string, start int, end int, info interfaces.Info, prefix string, id string) (error, string) { var e, err error vals := make([]interface{}, 0, 2) fields := make([]string, 0, 2) missing := make([]string, 0, 2) var val interface{} + newid := "" for i := range a.PostAnnos { post := a.PostAnnos[i] vals = vals[:0] @@ -437,7 +438,11 @@ func (a *Annotator) PostAnnotate(chrom string, start int, end int, info interfac // lua code if post.code != "" { for _, field := range post.Fields { - val, e = info.Get(field) + if field == "ID" { + val = id + } else { + val, e = info.Get(field) + } if val != nil { vals = append(vals, val) fields = append(fields, field) @@ -516,7 +521,9 @@ func (a *Annotator) PostAnnotate(chrom string, start int, end int, info interfac } } else { - if e := info.Set(prefix+post.Name, val); e != nil { + if post.Name == "ID" && prefix == "" { + newid = val + } else if e := info.Set(prefix+post.Name, val); e != nil { err = e } } @@ -539,12 +546,15 @@ func (a *Annotator) PostAnnotate(chrom string, start int, end int, info interfac // run this as long as we found any of the values. if len(vals) != 0 { fn := Reducers[post.Op] - info.Set(prefix+post.Name, fn(vals)) + if post.Name == "ID" && prefix == "" { + newid = fmt.Sprintf("%s", fn(vals)) + } else { + info.Set(prefix+post.Name, fn(vals)) + } } } - } - return err + return err, newid } // Setup reads all the tabix indexes and setups up the Queryables @@ -624,11 +634,12 @@ func (a *Annotator) AnnotateEnds(v interfaces.Relatable, ends string) error { var err error // if Both, call the interval, left, and right version to annotate. + id := v.(*parsers.Variant).IVariant.(*vcfgo.Variant).Id() if ends == BOTH { if e := a.AnnotateOne(v, a.Strict); e != nil { err = e } - if e := a.PostAnnotate(v.Chrom(), int(v.Start()), int(v.End()), v.(interfaces.IVariant).Info(), ""); e != nil { + if e, _ := a.PostAnnotate(v.Chrom(), int(v.Start()), int(v.End()), v.(interfaces.IVariant).Info(), "", id); e != nil { err = e } if e := a.AnnotateEnds(v, LEFT); e != nil { @@ -640,10 +651,13 @@ func (a *Annotator) AnnotateEnds(v interfaces.Relatable, ends string) error { } if ends == INTERVAL { err := a.AnnotateOne(v, a.Strict) - err2 := a.PostAnnotate(v.Chrom(), int(v.Start()), int(v.End()), v.(interfaces.IVariant).Info(), "") + err2, newid := a.PostAnnotate(v.Chrom(), int(v.Start()), int(v.End()), v.(interfaces.IVariant).Info(), "", id) if err != nil { return err } + if err2 == nil && newid != "" { + v.(*parsers.Variant).IVariant.(*vcfgo.Variant).Id_ = newid + } return err2 } // hack: @@ -677,7 +691,7 @@ func (a *Annotator) AnnotateEnds(v interfaces.Relatable, ends string) error { val, err = v2.Info().Get(key) variant.Info().Set(key, val) } - err2 := a.PostAnnotate(v.Chrom(), int(l), int(r), variant.Info(), ends) + err2, _ := a.PostAnnotate(v.Chrom(), int(l), int(r), variant.Info(), ends, id) if err2 != nil { err = err2 } diff --git a/tests/dbnsfp/Calls_for_dbNSFP_example.vcf.gz b/tests/dbnsfp/Calls_for_dbNSFP_example.vcf.gz index 9d939986eb5db29a684000b146f27f342421851e..1c269cdbe94b6e0f18015e23d90dbf80425ef2bb 100644 GIT binary patch literal 2828 zcmV+n3-k0JiwFb&00000{{{d;LjnNr3bk5WbJ|E2ekQ-7Yf?4q>|&<7b%(H9#27*q zU~c2=&Pz%_8@eJSMiRD}U%#g%AzHE{I+v+brGz;5%XdyUe*5-;d+Z?ycW&Iizv(^d z4f^Ko+umTfxSh4%54!D1XFjiYS+olIKIVbn{-xu22)JSvMriLw5nKQAZ{X<+7YW1o zZv1(6+bicM2Qfz3)b)% zVgusQFj#}p*P263t6^hP|0WxLmI+PS0`$I(o`q2cZdkT$R9G}0PkuBeAmS?#acrl7 zE#q7C{~YyAS$iH0(`eXKx69Ue!Bc-))Z3o|Jq3GG+Pm4PllD`mTOS{GOBS{p^~G_| z+544yeahfw6MQ|0JNJV)q>!}Dm`rVtLWCi%DoB0&x)5V8zJ*!o>reQ!}xKaWH1 zZ%P4Ueh|Z#*I8Z?VP#1WWd%o0qR>=sX-Uer*i&X64aT3<;yL0z-yL=cASqZzEPQ0^ zBy3s2`hd@939$I3tYV^M;ADG@_{#Ore(Of?E!w(!FZG-I=?DP2I%H8WEfWfWIidOl z(=0C{kv|~^Oa${n<|WK14p86&6@+5@G8>aY_j~Ldbc+T)foO)9yV|0I&;L9yL6HT@ zMH`qUK8oDk9)`))@(?312Dz&cW={4xdWTkl@3R$*qmZq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45P{N9kNvuG#1#s>q^Yw+9#)9#F>uIaQ)6CSXOJ0sZ+!|6=!T-=0(0R&9N zA--jI%6E036qC;Ueg+~9&FW+qS}ti>q?2DIRc`khcZ+tn*X~W){YCq3+MdAY$)MMs z4BL}Q1OH0e)M`?zZRl+gwzg%rTksDzb-n3mCOp7t9d;$V@qZQ>z>fGQ001A02m}BC Z000301^_}s0stET0{{R300000004sLVp#wH diff --git a/tests/dbnsfp/conf.toml b/tests/dbnsfp/conf.toml index cf55a4d..283819b 100644 --- a/tests/dbnsfp/conf.toml +++ b/tests/dbnsfp/conf.toml @@ -3,3 +3,9 @@ file="dbNSFP_ex.txt.gz" columns=[1,2,4,5] names=["nschrom", "nspos", "nsref", "nsalt"] ops=["first", "max", "uniq", "uniq"] + +[[postannotation]] +name="ID" +fields=["culprit", "ID"] +op="lua:culprit .. ';' .. ID" +type="String" diff --git a/tests/dbnsfp/dbNSFP_example.txt.gz b/tests/dbnsfp/dbNSFP_example.txt.gz new file mode 100644 index 0000000000000000000000000000000000000000..d8d27f58b8f02e9d99709fc026eb215b45029580 GIT binary patch literal 3403 zcmV-R4YcwfiwFb&00000{{{d;LjnLU4eeUnavDhzeeV5=iP)FjnSiPLW!@Nsuw#VG z0MhOofuSw2gFpdz#`^m`nbkl;w`8yFm1j3(ho!2l%(~{OlUeP*wqFh2^s@e&A^%(F z@3P5an@uKMnoxPY8PDDhFZJrZ zy2+RMa&nhv)7fUc*{&zc8I3bt%~s2de?mPK#=+;(q4=wi$%W3v({oe znP28G&(~Xwf0i%jo7L}=th3zYcW)PCGM&%%RT^nCUC-~gCE@*gwau}D85T#w4qu;- z#+&JCou}e-wfr63=d&@ae=9ZIuk%@UwVYE2Y7?ynXP_qX{{?WOZsjgW^a$@iu4 ztFzbF#n30h!_X%UJc*L*x;3cwK*HJ{sDXR980^+erMe}Pe6RZEF29-d-ft({`D!_u zY_|EjFh3F2^>m`bou0_$7Up@00a>vfNf1j;C=f zu9@dvfoFQ&8olcEiav@;-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On^qeR}LQ#@B(i!*gR)dz(JFB)9j7T_59F#K;0tJM%GGYLPy)wlN*e#y|Mw=ebtV9n-JR4{}K}##J^Te~rvJ0NoKJl!Ko`}}q z;uL&?5YhS<#Qyma>kfq!8~^hNv95$zcZ}FCOltwf$JX)`2$|s|eeXTXrYl05Bn2mR z%0k5g-Y)QWAB4y3jMzAcjKI!Sf+Tqn6c87Xou97E8dh|;QHT(>Q{s7h~c{4 zc>2!)ny&K~;66KW5qw$>(L9d95pcr}xEiQ%0ko)03AftqzSq#iN<{kt+%EzyJ$O6g z^9GW!a+%gbb+4#yxL*FNWHSW4H`|r>W?Zi^L$FLw literal 0 HcmV?d00001 diff --git a/tests/dbnsfp/dbNSFP_example.txt.gz.tbi b/tests/dbnsfp/dbNSFP_example.txt.gz.tbi new file mode 100644 index 0000000000000000000000000000000000000000..d34e08e0713afb6930888938bb6ce11d7e5b6c95 GIT binary patch literal 149 zcmb2|=3rp}f&Xj_PR>jW6%23B*zz4R;9(13mq>Ja#ANHRRAyoH%$qwzrMIiri>x$$ z{9EO@>b9xJH!Tw})m+scbUY~d%a!VLYisMje*A5dW*Gl!r>*>31 e35Gu1ulvkc^g}_FUy*@99?fED24=83Km-79Xf%`n literal 0 HcmV?d00001 diff --git a/tests/functional-test.sh b/tests/functional-test.sh index 67b8eac..08656b5 100755 --- a/tests/functional-test.sh +++ b/tests/functional-test.sh @@ -104,7 +104,7 @@ assert_equal 3 $(grep -c ";right_ref_alt=A" $STDOUT_FILE) rm e.lua irefalt() { - vcfanno -permissive-overlap -base-path tests/dbnsfp/ tests/dbnsfp/conf.toml tests/dbnsfp/Calls_for_dbNSFP_example.vcf.gz | grep -v ^# + vcfanno -lua <(echo "") -permissive-overlap -base-path tests/dbnsfp/ tests/dbnsfp/conf.toml tests/dbnsfp/Calls_for_dbNSFP_example.vcf.gz | grep -v ^# } run check_iref_alt irefalt @@ -112,10 +112,12 @@ assert_in_stdout "nsalt=A,G,T" assert_exit_code 0 irefalt_strict() { - vcfanno -base-path tests/dbnsfp/ tests/dbnsfp/conf.toml tests/dbnsfp/Calls_for_dbNSFP_example.vcf.gz | grep -v ^# + vcfanno -lua <(echo "") -base-path tests/dbnsfp/ tests/dbnsfp/conf.toml tests/dbnsfp/Calls_for_dbNSFP_example.vcf.gz | grep -v ^# } run check_iref_alt_strict irefalt_strict assert_in_stdout $'nsalt=T\t' +# check that ID was set. +assert_in_stdout $'\tReadPosRankSum;ORIGID\t' assert_exit_code 0 diff --git a/vcfanno.go b/vcfanno.go index e104bdf..91b6cc7 100644 --- a/vcfanno.go +++ b/vcfanno.go @@ -24,7 +24,7 @@ import ( "github.com/brentp/xopen" ) -var VERSION = "0.1.1" +var VERSION = "0.1.2-dev" func envGet(name string, vdefault int) int { sval := os.Getenv(name)