diff --git a/scripts/AGR/agr_variations.def b/scripts/AGR/agr_variations.def index 646eb662c..0c63be3c9 100644 --- a/scripts/AGR/agr_variations.def +++ b/scripts/AGR/agr_variations.def @@ -70,6 +70,14 @@ Class Strain From 1 Tag Strain - +Colonne 8 +Width 40 +Optional +Visible +Class +Class Text +From 2 +Tag Name + // End of these definitions diff --git a/scripts/AGR/make_agr_variations.rb b/scripts/AGR/make_agr_variations.rb index c77eee92e..35108bd01 100755 --- a/scripts/AGR/make_agr_variations.rb +++ b/scripts/AGR/make_agr_variations.rb @@ -99,17 +99,21 @@ def parse_output(outfile) File.open(outfile).each{|line| line.chomp! line.gsub!('"','') + isInAgr = false + if line["AGRKB"] + isInAgr = true + end if !line["Europe_PMC"] c = line.split("\t") if !results[c[0]] results[c[0]]=Hash.new # WBVarXXX results[c[0]]["name"] = c[0] # WBVarXXX end - if !c[1].empty? + if !c[1].empty? && isInAgr results[c[0]]["paper"]||=Hash.new # WBPaperXXX - results[c[0]]["paper"][c[1]] = (c[4].nil? or c[4].empty?) ? 'n/a' : c[4] # PubmedID + results[c[0]]["paper"][c[1]] = (!c[4].nil? && !c[4].empty?) ? c[4] : 'n/a' # PubmedID end - if c[5] + if c[5] results[c[0]][:strains]||=[] # WBStrains results[c[0]][:strains].push(c[5]) # adds WBStrainId end