Skip to content

Commit

Permalink
Add genome MIMAG out-links
Browse files Browse the repository at this point in the history
  • Loading branch information
lmrodriguezr committed Jan 9, 2024
1 parent 4c27220 commit fd1d48e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions app/views/genomes/_samples.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,13 @@
"\\1<a href='#{ena}\\2' target='_blank'>\\2</a>\\3"
)
end
ncbi = 'https://www.ncbi.nlm.nih.gov/biosample/docs/packages/'
v.map! do |i|
i.gsub(
/(^\s*|[^A-Z0-9\.])(MIMAG\.[A-Z0-9\.]+)(\s*$|[^A-Z0-9\.])/i,
"\\1<a href='#{ncbi}\\2' target='_blank'>\\2</a>\\3"
)
end
else
v.map! { |i| sanitize(i) }
end
Expand Down

0 comments on commit fd1d48e

Please sign in to comment.