https://github.com/flora-phenotype-ontology/flopoontology
Revision 1c7df4c030e366bfdcd43bc039d1cd628d9417e7 authored by Robert Hoehndorf on 25 November 2015, 07:17:34 UTC, committed by Robert Hoehndorf on 25 November 2015, 07:17:34 UTC
1 parent a3db96b
Raw File
Tip revision: 1c7df4c030e366bfdcd43bc039d1cd628d9417e7 authored by Robert Hoehndorf on 25 November 2015, 07:17:34 UTC
.
Tip revision: 1c7df4c
AddLabelToAnnotations.groovy
// adds label to FLOPO annotation file

// flopo labels
def id2label = [:]
new File(args[0]).splitEachLine("\t") { line ->
  id2label[line[0]] = line[1]
}

new File(args[1]).splitEachLine("\t") { line ->
  def tax = line[0]
  def str = line[1]
  def id = line[2].replaceAll("<http://phenomebrowser.net/plant-phenotype.owl#","").replaceAll(">","")
  println "$tax\t$str\t"+line[2]+"\t"+id2label[id]
}
back to top