Skip to content

Commit 98a0e60

Browse files
Ignore references not in Alliance
1 parent 72bc2d8 commit 98a0e60

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

scripts/AGR/agr_variations.def

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,14 @@ Class Strain
7070
From 1
7171
Tag Strain
7272

73-
73+
Colonne 8
74+
Width 40
75+
Optional
76+
Visible
77+
Class
78+
Class Text
79+
From 2
80+
Tag Name
81+
7482

7583
// End of these definitions

scripts/AGR/make_agr_variations.rb

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,17 +99,21 @@ def parse_output(outfile)
9999
File.open(outfile).each{|line|
100100
line.chomp!
101101
line.gsub!('"','')
102+
isInAgr = false
103+
if line["AGRKB"]
104+
isInAgr = true
105+
end
102106
if !line["Europe_PMC"]
103107
c = line.split("\t")
104108
if !results[c[0]]
105109
results[c[0]]=Hash.new # WBVarXXX
106110
results[c[0]]["name"] = c[0] # WBVarXXX
107111
end
108-
if !c[1].empty?
112+
if !c[1].empty? && isInAgr
109113
results[c[0]]["paper"]||=Hash.new # WBPaperXXX
110-
results[c[0]]["paper"][c[1]] = (c[4].nil? or c[4].empty?) ? 'n/a' : c[4] # PubmedID
114+
results[c[0]]["paper"][c[1]] = (!c[4].nil? && !c[4].empty?) ? c[4] : 'n/a' # PubmedID
111115
end
112-
if c[5]
116+
if c[5]
113117
results[c[0]][:strains]||=[] # WBStrains
114118
results[c[0]][:strains].push(c[5]) # adds WBStrainId
115119
end

0 commit comments

Comments
 (0)