• RTH
  • CRS-Cyanobacteria
  • Browse CRSs
  • CRS details
  • CRS alignments
  • Species conservation
  • Known structures
  • Help

Species conservation

phylo_tbl = transpose(phylo)
motif_order_prev_tbl = transpose(motif_order_prev)
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)

ko = sel.split("_")[0]
html `<a href="https://rth.dk/resources/crs/cyanobacteria/data/ko_phylo/${ko}.bootstrap-consensus.tree">Local phylogenetic tree of genomes of the anchoring orthologous gene [newick file]</a>`

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)