Skip to content

Commit 6b57a15

Browse files
committed
added links to global sample id
1 parent c0629e3 commit 6b57a15

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

ui/src/pages/bed-splash.tsx

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,40 @@ export const BedSplash = () => {
157157
return null;
158158
}
159159

160+
if (k === 'global_sample_id') {
161+
const parts = value.split(':');
162+
163+
164+
if (parts[1].startsWith('gsm') || parts[0].startsWith('encode')) {
165+
let link;
166+
if (parts[1].startsWith('gsm')) {
167+
link = (
168+
<a href={`https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=${parts[1]}`}
169+
target="_blank">
170+
{value}
171+
</a>
172+
);
173+
} else {
174+
link = (
175+
<a href={`https://www.encodeproject.org/experiments/${parts[1]}/`}
176+
target="_blank">
177+
{value}
178+
</a>
179+
);
180+
}
181+
return (
182+
<tr key={k}>
183+
<td style={{ maxWidth: '50px' }} className="fst-italic">
184+
{snakeToTitleCase(k)}
185+
</td>
186+
<td style={{ maxWidth: '120px' }} className="truncate">
187+
{link}
188+
</td>
189+
</tr>
190+
);
191+
}
192+
}
193+
160194
return (
161195
<tr key={k}>
162196
<td style={{ maxWidth: '50px' }} className="fst-italic">

0 commit comments

Comments
 (0)