Species conservation
para = window.location.href.match(/(?<=candidate=)(.*?)[^&]+/)
sv = {
if ( para !== null ) {
if ( motifs_list.includes(para[0]) ) {
return para[0]
}
}
return motifs_list[0]
}
// Choose a single motif
viewof sel = Inputs.select(
motifs_list,
{
label: 'Details for',
value: sv
}
)
html`<a href="https://rth.dk/resources/crs/cyanobacteria/candidate.html?candidate=${sel}">View CRS details</a>`CRS anchoring orthologous gene
motif_order_prev_filtered = motif_order_prev_tbl.filter(function(row) {
var regex = new RegExp("^" + row.term + "_");
return regex.test(sel)
})
Plot.plot({
marginLeft: 500,
marginBottom: 70,
marginTop: 50,
height: 600,
width: 1000,
style: {
'font-size': '18pt',
'color': 'black',
'text-shadow': '1pt 1pt 8pt white'
},
x: {
label: 'Studied species containing the ortholog (%)',
grid: true
},
y: {
label: 'Phylogenetic order:',
labelAnchor: 'top'
},
marks: [
Plot.barX(
motif_order_prev_filtered,
{
x: 'ratio',
y: 'order',
fill: 'fill'
}
),
Plot.text(
motif_order_prev_filtered,
{
x: 5,
y: 'order',
rotate: 0,
textAnchor: 'start',
text: 'lab',
fontSize: '16pt',
fontWeight: 'bolder'
}
)
]
})(Relative to the NCBI taxonomy)
CRS
phylo_filtered = phylo_tbl.filter(function(row) {
return row.motif === sel
})
Plot.plot({
marginLeft: 500,
marginBottom: 70,
marginTop: 50,
height: 600,
width: 1000,
style: {
'font-size': '18pt',
'color': 'black',
'text-shadow': '1pt 1pt 8pt white'
},
x: {
label: 'Studied species containing the CRS (%)',
grid: true
},
y: {
label: 'Phylogenetic order:',
labelAnchor: 'top'
},
marks: [
Plot.barX(
phylo_filtered,
{
x: 'ratio',
y: 'order',
fill: 'fill'
}
),
Plot.text(
phylo_filtered,
{
x: 2,
y: 'order',
rotate: 0,
textAnchor: 'start',
text: 'lab',
fontSize: '16pt',
fontWeight: 'bolder'
}
)
]
})(Relative to the NCBI taxonomy)