From fd1d48ea64c0056367011f222ab209f72c1bc871 Mon Sep 17 00:00:00 2001 From: "Luis M. Rodriguez-R" Date: Tue, 9 Jan 2024 13:20:56 +0100 Subject: [PATCH] Add genome MIMAG out-links --- app/views/genomes/_samples.html.erb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/views/genomes/_samples.html.erb b/app/views/genomes/_samples.html.erb index 47e1cfd4..969a0922 100644 --- a/app/views/genomes/_samples.html.erb +++ b/app/views/genomes/_samples.html.erb @@ -35,6 +35,13 @@ "\\1\\2\\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\\2\\3" + ) + end else v.map! { |i| sanitize(i) } end