CRS details
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/msa.html?candidate=${sel}">View alignment</a>`motifs_filtered = motifs_tbl.filter(function(row) {
return row["CRS ID"] === sel
})
// Sort of transpose for improved overview
record = Object.keys(motifs_filtered[0]).
map(x => new Object({key: x, value: motifs_filtered[0][x]}))Characteristics and scores
Associated pathways
Genomic loci
pos_filtered = pos_tbl.filter(function(row) {
return row.motif === sel
})
Inputs.table(
pos_filtered,
{
columns: ["species","NCBI-accession", "start", "end", "strand"],
rows: 50,
format: {
'NCBI-accession': function(i) {
return html`<a href="https://www.ncbi.nlm.nih.gov/search/all/?term=${i}" target="_blank">${i}</a>`
}
}
}
)Species conservation
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 candidate (%)',
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)
Transcriptional Activity
expr_filtered = expr_tbl.filter(function(row) {
return row.motif === sel
})
Plot.plot({
marginLeft: 550,
marginBottom: 70,
marginTop: 50,
height: 600,
width: 1000,
style: {
'font-size': '18pt',
'color': 'black',
'text-shadow': '1pt 1pt 8pt white'
},
x: {
label: 'Proportion of RNA-seq libraries in which candidate is expressed (%)',
grid: true
},
y: {
label: 'Species:',
labelAnchor: 'top'
},
marks: [
Plot.barX(
expr_filtered,
{
x: 'ratio',
y: 'genome',
fill: 'fill'
}
),
Plot.text(
expr_filtered,
{
x: 2,
y: 'genome',
rotate: 0,
textAnchor: 'start',
text: 'lab',
fontSize: '16pt',
fontWeight: 'bolder'
}
)
]
})