Published
Edited
Dec 22, 2021
1 fork
Insert cell
Insert cell
Insert cell
dataForOccupiedVsFreeBidingSitesCleaned = chainData.results.map(d => {
return {
innerConcentration: d.carb.innerConcentration,
occupancy: d.s.occ,
noChain: d.percent[1],
withChain: 1 - d.percent[1],
volMicro: d.carb.volume*1E18,
reg: d.carb.carbIndex,
numRub: d.numRub,
longestChain: d.s.longestChain
}
}).filter(d => d.longestChain > 2 && d.withChain > 0)
Insert cell
Insert cell
Insert cell
vl.markCircle()
.data(chainData.results)
.transform(
vl.calculate(`datum.percent[1]`).as('noChain'),
vl.calculate(`1 - datum.noChain`).as('withChain'),
vl.calculate(`datum.carb.volume*1E18`).as('volMicro'),
vl.filter(`datum.withChain > 0`)
)
.encode(
vl.x({
axis:{
grid: false,
labelFontSize: 15,
titleFontSize: 15,
tickCount: 5,
}
}).fieldQ('carb.innerConcentration')
.title(['Inner rubisco concentration (µM)']),
vl.y({
axis:{
grid: false,
labelFontSize: 15,
titleFontSize: 15
}
}).fieldQ('s.occ').title(['Ratio of occupied vs.', 'free binding sites']).scale({type: 'log'}),
vl.color().fieldQ('withChain').title(['Ratio of RuBisCOs','participating in chains']).scale({scheme: 'viridis', domain: [0, 1]}).sort('descending').legend({orient: 'bottom', titleLimit: 200, width: 200, titleFontSize: 15, labelFontSize: 15, tickCount: 5, padding: 10}),
vl.size().fieldQ('volMicro').title(['Carboxysome','Volume (µm³)']).legend({orient: 'bottom', titleLimit: 200, width: 200, titleFontSize: 15, labelFontSize: 15, tickCount: 5, padding: 10}),
vl.tooltip([
{ field: 'carb.carbIndex', title: 'reg' },
{ field: 'volMicro', title: 'Carboxysome Volume (µm³)', format: ".6f"},
{ field: 'carb.numRub', title: '# of total RuBisCOs'},
{ field: 'carb.numRubOuter', title: '# of outer RuBisCOs'},
{ field: 'innerConcentration', title: 'Inner RuBisCO concentration (µM)', format: ".0f"},
{ field: 'withChain', title: '# of RuBisCOs in chains'},
{ field: 's.longestChain', title: '# of RuBisCos in Longest chain'},
{ field: 's.occ', title: 'Occupancy ratio'},
])
)
.width(800)
.height(500)
.config({view: {stroke: "transparent"}})
.render({renderer: 'svg'})
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
showCarbIndex = [88]
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
chainGraph.nodes.filter(d => d.reg === 86)
Insert cell
Insert cell
analyzePair(144, 127)
Insert cell
Insert cell
occupancy = chainData.results.map(carb => carb.s.occ)
Insert cell
chainStats = chainData.results.map(carb => {
const chainLengths = carb.s.chains.map(c => {
return {
l: c.length,
...carb.carb
}
}).flat()
return chainLengths
}).flat()
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
testResults.map(result => result.miss.length === 0 && result.rest.length === 0 ? true : `[${result.miss}]::[${result.rest}]`)
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
stats(1)
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
import { alignedVsCarbData, carboxysomes, carbVolumes, calcDeltaAngle, calculateDistance, computeVector, allData, rubiscoDiameter } from '1f2c4a85bc897fd8'
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
params.searchRadius + params.searchShift
Insert cell
Insert cell
stats(86)
Insert cell
color(1)
Insert cell
{
const rubIndex = 43723
return chainGraph.links.filter(link => link.target === rubIndex || link.source === rubIndex)
}
Insert cell
chainSize(65667)
Insert cell
allDataWithVectors.filter(d => d.reg === 86)
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more