Skip to content

Commit

Permalink
Ignore references not in Alliance
Browse files Browse the repository at this point in the history
  • Loading branch information
markquintontulloch committed Jan 16, 2025
1 parent 72bc2d8 commit 98a0e60
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
10 changes: 9 additions & 1 deletion scripts/AGR/agr_variations.def
Original file line number Diff line number Diff line change
Expand Up @@ -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
10 changes: 7 additions & 3 deletions scripts/AGR/make_agr_variations.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 98a0e60

Please sign in to comment.