Location: Dependence of the period on the rate of protein degradation in minimal models for circadian oscillations @ 19e4669a2f3c / gerard_gonze_goldbeter_2009.xul

Author:
Hanne Nielsen <hnie010@aucklanduni.ac.nz>
Date:
2011-09-07 13:48:49+12:00
Desc:
Added model c with cellml file, images and session.
Permanent Source URI:
https://models.fieldml.org/w/hnielsen/gerard_gonze_goldbeter_2009/rawfile/19e4669a2f3c4ee8528bb12d34633f3126a4c5c8/gerard_gonze_goldbeter_2009.xul

<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<window id="layout-diagram" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" style="overflow: auto" onload="setupDocument()">
<hbox>
	<scale id="zoom_scale" value="10" min="7" max="14" flex="4"/>
	<label value="Zoom" control="zoom_scale" flex="1"/>
	<button id="reset_button" label="Reset View" flex="1"/>
	<spacer flex="34"/>
</hbox>
<script>
<![CDATA[
window.model_entities =
  {

			
	X: {
		id: "X",
		y: "X/X",
		x: "environment/time",
		graph: "Traces against time (hour)",
		colour: "#ff9900",
		linestyle: "none"
	},

	Y: {
		id: "Y",
		y: "Y/Y",
		x: "environment/time",
		graph: "Traces against time (hour)",
		colour: "#ff00cc",
		linestyle: "none"
	},

	Z: {
		id: "Z",
		y: "Z/Z",
		x: "environment/time",
		graph: "Traces against time (hour)",
		colour: "#cc00ff",
		linestyle: "none"
	}
	
			
 // Repeat the above section for each controllable graph trace.
 // Remember to add a comma to each repeat after the final },
 // except for the final one!
 
};

function flushVisibilityInformation(entity_id, entity_colour)
{
	var message = "";
	var entity;

	if (typeof pcenv != "undefined")
	{
		for (var i in window.model_entities)
		{
			entity = window.model_entities[i];
			if (typeof entity_id == "undefined" || entity_id == window.model_entities[i].id)
			{
				pcenv.selectTrace
				(
					entity.graph,
					entity.x,
					entity.y,
					typeof entity_colour == "undefined" ? "" : entity_colour,
					entity.linestyle
				);
			}
			if (entity.linestyle != "none")
				message += i + ", ";
		}
		pcenv.status(message == "" ? "No fluxes displayed" : "Displaying flux of " + message.slice(0, -2));
	}
}

function processSelectEntity(event)
{
	if (typeof pcenv != "undefined")
		pcenv.status("In processSelectEntity");

	var entity = window.model_entities[window.svgIdToName[event.currentTarget.id]];

	switch(entity.linestyle)
	{
	case "none":
		entity.linestyle = "lines";
		highlightEntity(event.currentTarget.id);
		break;
	case "lines":
		entity.linestyle = "none";
		unlightEntity(event.currentTarget.id);
		break;
	}

	flushVisibilityInformation(entity.id);
}

function processContext(event)
{
	// if (event.button != 2)
	//   return true;

	var entity = window.model_entities[window.svgIdToName[event.currentTarget.id]];

	if (entity.context == null)
		return true;

	var menu = document.getElementById("entityContextMenu");

	for (var c = menu.firstChild, x = null; c != null; c = x)
	{
		x = c.nextSibling;
		menu.removeChild(c);
	}

	for (var i in entity.context)
	{
		var item = entity.context[i];

		var mitem = document.createElementNS
		(
			"http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul",
			"menuitem"
		);

		mitem.setAttribute("label", item.label);
		mitem.setAttribute("url", item.url);
		mitem.addEventListener("command", processShowEntityURL, false);
		menu.appendChild(mitem);
	}

	menu.showPopup(window.diagram, event.screenX, event.screenY, "context");

	event.stopPropagation;
	return false;
}

function processShowEntityURL(event)
{
	url = event.target.getAttribute("url");

	window.open(url);

	var hl = document.getElementById("hidden-link");
	hl.href = url;

	// This is ugly, but it is one way to force everything through the proper
	// external handler...
	var evt = document.createEvent("HTMLEvents");
	evt.initEvent("click", true, true);
	hl.dispatchEvent(evt);
}

function highlightEntity(id)
{
	for (var path = document.getElementById(id + "_path1"), i = 1; path != null; path = document.getElementById(id + "_path" + ++i))
	{
		if (!(i in window.model_entities[window.svgIdToName[id]].path_colours))
			window.model_entities[window.svgIdToName[id]].path_colours[i] = path.attributes.getNamedItem("stroke").value;
		path.attributes.getNamedItem("stroke").value = "#ff0000";
	}
}

function highlightEntityOnRollover(event) {
	if (window.model_entities[window.svgIdToName[event.currentTarget.id]].colour)
		flushVisibilityInformation(event.currentTarget.id, "#ffffff");

	if (window.model_entities[window.svgIdToName[event.currentTarget.id]].linestyle == "none")
		highlightEntity(event.currentTarget.id);
}

function unlightEntity(id)
{
	for (var path = document.getElementById(id + "_path1"), i = 1; path != null; path = document.getElementById(id + "_path" + ++i))
		path.attributes.getNamedItem("stroke").value = window.model_entities[window.svgIdToName[id]].path_colours[i];
}

function unlightEntityOnRollover(event) {
	if (window.model_entities[window.svgIdToName[event.currentTarget.id]].colour)
		flushVisibilityInformation(event.currentTarget.id, window.model_entities[window.svgIdToName[event.currentTarget.id]].colour);

	if (window.model_entities[window.svgIdToName[event.currentTarget.id]].linestyle == "none")
		unlightEntity(event.currentTarget.id);
}

var mouseDown = false;
var initial_x;
var initial_y;
var viewBox;

function startDrag(event)
{
	if (event.button)
		return true;

	mouseDown = true;

	initial_x = parseInt(currentZoom * event.pageX + parseInt(viewBox.value.match(/^-?\d+/)[0]));
	initial_y = parseInt(currentZoom * event.pageY + parseInt(viewBox.value.match(/^-?\d+\s+(-?(\d+))/)[1]));
}

function stopDrag(event)
{
	if (!event.button)
		mouseDown = false;
}

function moveDrag(event)
{
	if (mouseDown == true)
		viewBox.value = viewBox.value.replace(/^-?\d+\s+-?\d+/, parseInt(initial_x - currentZoom * event.pageX) + " " + parseInt(initial_y - currentZoom * event.pageY));
}

function reset()
{
	var zoom_scale = document.getElementById("zoom_scale")
	zoom_scale.value = zoom_scale.originalValue;
	viewBox.value = viewBox.originalValue;
}

var initialZoom;
var currentZoom = 1;
var initialHeight;
var initialWidth;

function zoomDiagram(event)
{
	currentZoom = initialZoom / event.currentTarget.value;
	viewBox.value = viewBox.value.replace(/\d+\s+\d+$/, parseInt(initialHeight * currentZoom) + " " + parseInt(initialWidth * currentZoom));
}

function setupDocument()
{
	flushVisibilityInformation();

	window.diagram = document.getElementById("sachse");

	window.svgIdToName = {};

	for (var name in window.model_entities)
	{
		var id = window.model_entities[name].id;
		window.model_entities[name].path_colours = [];

		var svg = document.getElementById(id);
		window.svgIdToName[id] = name;

		svg.addEventListener("click", processSelectEntity, false);
		svg.addEventListener("contextmenu", processContext, false);
		svg.addEventListener("mouseover", highlightEntityOnRollover ,false);
		svg.addEventListener("mouseout", unlightEntityOnRollover, false);
	}

	document.getElementsByTagName("svg")[0].addEventListener("mousedown", startDrag, false);
	document.addEventListener("mouseup", stopDrag, false);
	document.addEventListener("mousemove", moveDrag, false);
	document.getElementById("reset_button").addEventListener("click", reset, false);

	document.getElementById("zoom_scale").addEventListener("change", zoomDiagram, false);
	document.getElementById("zoom_scale").originalValue = document.getElementById("zoom_scale").value;

	viewBox = document.getElementsByTagName("svg")[0].attributes.getNamedItem("viewBox");
	viewBox.originalValue = viewBox.value;

	initialZoom = document.getElementById("zoom_scale").value;
	initialHeight = parseInt(viewBox.value.match(/(\d+)\s+\d+$/)[1]);
	initialWidth = parseInt(viewBox.value.match(/\d+$/)[0]);
}

]]>
</script>

<popupset>
  <menupopup id="entityContextMenu" />
</popupset>

<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
	 width="322px" height="332px" viewBox="0 0 322 332" enable-background="new 0 0 322 332" xml:space="preserve">
<g>
	<g>
		<line fill="none" stroke="#010101" x1="278.5" y1="259.182" x2="226.918" y2="259.182"/>
		<polygon fill="#010101" points="275.691,262.886 277.264,259.182 275.691,255.479 284.469,259.182 		"/>
	</g>
</g>
<path id="path4101" fill="#C2DCF3" stroke="#2A8FCE" stroke-width="5.128" d="
	M300.667,122.461c0,42.503-62.146,76.959-138.81,76.959c-76.662,0-138.809-34.456-138.809-76.959l0,0
	c0-42.504,62.147-76.96,138.809-76.96C238.521,45.501,300.667,79.957,300.667,122.461z"/>
<g>
	<g>
		<line fill="#F6EB16" x1="79.567" y1="103.35" x2="79.567" y2="30.183"/>
		<polygon fill="#F6EB16" points="75.863,100.541 79.567,102.113 83.271,100.541 79.567,109.318 		"/>
	</g>
	<g>
		<line fill="none" stroke="#EEE92E" x1="79.567" y1="103.35" x2="79.567" y2="30.183"/>
		<polygon fill="#EEE92E" points="75.863,100.541 79.567,102.113 83.271,100.541 79.567,109.318 		"/>
	</g>
</g>
<line fill="none" stroke="#ED2224" x1="120.375" y1="121.225" x2="173.25" y2="121.225"/>
<path id="path33139_2_" fill="none" stroke="#010101" d="M120.445,119.032l0.064,4.52"/>
<g>
	<g>
		<line fill="none" stroke="#010101" x1="82.911" y1="306.184" x2="82.911" y2="130.767"/>
		<polygon fill="#010101" points="79.207,303.375 82.911,304.947 86.614,303.375 82.911,312.152 		"/>
	</g>
</g>
<g id="g4153" transform="translate(-109.3141,-31.23255)">
	<g id="g4155" transform="matrix(1.147869,0.000000,0.000000,1.063231,146.8529,324.9538)">
		
			<radialGradient id="path4157_1_" cx="-138.7521" cy="-925.0818" r="16.1855" gradientTransform="matrix(2.3862 0 0 0.6961 368.8749 481.778)" gradientUnits="userSpaceOnUse">
			<stop  offset="0" style="stop-color:#ADD252"/>
			<stop  offset="0.4082" style="stop-color:#ACD152"/>
			<stop  offset="0.5552" style="stop-color:#A7D053"/>
			<stop  offset="0.66" style="stop-color:#A0CD52"/>
			<stop  offset="0.7448" style="stop-color:#94C951"/>
			<stop  offset="0.8174" style="stop-color:#85C551"/>
			<stop  offset="0.8817" style="stop-color:#75C151"/>
			<stop  offset="0.9398" style="stop-color:#65BD53"/>
			<stop  offset="0.9915" style="stop-color:#59BA53"/>
			<stop  offset="1" style="stop-color:#57BA53"/>
		</radialGradient>
		<path id="path4157" fill="url(#path4157_1_)" stroke="#010101" d="M70.814-162.173c0,5.959-14.793,10.789-33.03,10.789
			c-18.241,0-33.028-4.828-33.028-10.789c0-5.959,14.787-10.787,33.028-10.787C56.021-172.958,70.814-168.13,70.814-162.173z"/>
	</g>
	<text transform="matrix(1 0 0 1 156.2565 155.9572)" fill="#010101" font-family="'Myriad-Roman'" font-size="10">PER transcription</text>
</g>
<g>
	<g>
		<line fill="none" stroke="#010101" x1="168" y1="259.182" x2="105.918" y2="259.182"/>
		<polygon fill="#010101" points="165.191,262.885 166.764,259.182 165.191,255.478 173.969,259.182 		"/>
	</g>
</g>
<g id="X">
	<g id="g4103_2_" transform="matrix(1.147869,0.000000,0.000000,1.063231,146.8529,324.9538)">
		
			<radialGradient id="X_path1_1_" cx="-290.2043" cy="-779.1111" r="16.1863" gradientTransform="matrix(1.8289 0 0 0.676 474.6864 465.5307)" gradientUnits="userSpaceOnUse">
			<stop  offset="0" style="stop-color:#ADD252"/>
			<stop  offset="0.4082" style="stop-color:#ACD152"/>
			<stop  offset="0.5552" style="stop-color:#A7D053"/>
			<stop  offset="0.66" style="stop-color:#A0CD52"/>
			<stop  offset="0.7448" style="stop-color:#94C951"/>
			<stop  offset="0.8174" style="stop-color:#85C551"/>
			<stop  offset="0.8817" style="stop-color:#75C151"/>
			<stop  offset="0.9398" style="stop-color:#65BD53"/>
			<stop  offset="0.9915" style="stop-color:#59BA53"/>
			<stop  offset="1" style="stop-color:#57BA53"/>
		</radialGradient>
		<path id="X_path1" fill="url(#X_path1_1_)" stroke="#010101" d="M-30.754-61.15c0,5.786-11.337,10.478-25.315,10.478
			c-13.981,0-25.315-4.69-25.315-10.478c0-5.788,11.334-10.476,25.315-10.476C-42.092-71.624-30.754-66.936-30.754-61.15z"/>
	</g>
	<text transform="matrix(1 0 0 1 79.7276 262.873)" fill="#010101" font-family="'Myriad-Roman'" font-size="10">X</text>
</g>
<text transform="matrix(1 0 0 1 68.8316 25.125)" fill="#010101" font-family="'Myriad-Roman'" font-size="10">Light</text>
<text transform="matrix(1 0 0 1 90.3023 226.668)" font-family="'MyriadPro-Regular'" font-size="12">k</text>
<text transform="matrix(0.7 0 0 0.7 95.9302 230.6641)" font-family="'MyriadPro-Regular'" font-size="12">1</text>
<text transform="matrix(1 0 0 1 131.9908 277.834)" font-family="'MyriadPro-Regular'" font-size="12">k</text>
<text transform="matrix(0.7 0 0 0.7 137.6187 281.8301)" font-family="'MyriadPro-Regular'" font-size="12">2</text>
<text transform="matrix(1 0 0 1 186.9688 226.668)" font-family="'MyriadPro-Regular'" font-size="12">k</text>
<text transform="matrix(0.7 0 0 0.7 192.5977 230.6641)" font-family="'MyriadPro-Regular'" font-size="12">3</text>
<text transform="matrix(1 0 0 1 90.3023 294.1406)" font-family="'MyriadPro-Regular'" font-size="12">k</text>
<text transform="matrix(0.7 0 0 0.7 95.9302 298.1367)" font-family="'MyriadPro-Regular'" font-size="12">4</text>
<g>
	<g>
		<line fill="none" stroke="#010101" x1="203.372" y1="270.799" x2="203.372" y2="138.667"/>
		<polygon fill="#010101" points="207.075,141.476 203.372,139.903 199.668,141.476 203.372,132.698 		"/>
	</g>
</g>
<g id="Y">
	<g id="g4103_1_" transform="matrix(1.147869,0.000000,0.000000,1.063231,146.8529,324.9538)">
		
			<radialGradient id="Y_path1_1_" cx="-232.6244" cy="-779.1111" r="16.1865" gradientTransform="matrix(1.8289 0 0 0.676 474.6864 465.5307)" gradientUnits="userSpaceOnUse">
			<stop  offset="0" style="stop-color:#ADD252"/>
			<stop  offset="0.4082" style="stop-color:#ACD152"/>
			<stop  offset="0.5552" style="stop-color:#A7D053"/>
			<stop  offset="0.66" style="stop-color:#A0CD52"/>
			<stop  offset="0.7448" style="stop-color:#94C951"/>
			<stop  offset="0.8174" style="stop-color:#85C551"/>
			<stop  offset="0.8817" style="stop-color:#75C151"/>
			<stop  offset="0.9398" style="stop-color:#65BD53"/>
			<stop  offset="0.9915" style="stop-color:#59BA53"/>
			<stop  offset="1" style="stop-color:#57BA53"/>
		</radialGradient>
		<path id="Y_path1" fill="url(#Y_path1_1_)" stroke="#010101" d="M74.554-61.15c0,5.786-11.337,10.478-25.315,10.478
			c-13.981,0-25.315-4.69-25.315-10.478c0-5.788,11.334-10.476,25.315-10.476C63.216-71.624,74.554-66.936,74.554-61.15z"/>
	</g>
	<text transform="matrix(1 0 0 1 200.6075 262.8721)" fill="#010101" font-family="'Myriad-Roman'" font-size="10">Y</text>
</g>
<g>
	<g>
		<line fill="none" stroke="#010101" x1="278.5" y1="121.295" x2="226.918" y2="121.295"/>
		<polygon fill="#010101" points="275.691,124.998 277.264,121.295 275.691,117.591 284.469,121.295 		"/>
	</g>
</g>
<g id="Z">
	<g id="Z_path2" transform="matrix(1.147869,0.000000,0.000000,1.063231,146.8529,324.9538)">
		
			<radialGradient id="Z_path1_1_" cx="-232.6244" cy="-972.0078" r="16.1865" gradientTransform="matrix(1.8289 0 0 0.676 474.6864 465.5307)" gradientUnits="userSpaceOnUse">
			<stop  offset="0" style="stop-color:#ADD252"/>
			<stop  offset="0.4082" style="stop-color:#ACD152"/>
			<stop  offset="0.5552" style="stop-color:#A7D053"/>
			<stop  offset="0.66" style="stop-color:#A0CD52"/>
			<stop  offset="0.7448" style="stop-color:#94C951"/>
			<stop  offset="0.8174" style="stop-color:#85C551"/>
			<stop  offset="0.8817" style="stop-color:#75C151"/>
			<stop  offset="0.9398" style="stop-color:#65BD53"/>
			<stop  offset="0.9915" style="stop-color:#59BA53"/>
			<stop  offset="1" style="stop-color:#57BA53"/>
		</radialGradient>
		<path id="Z_path1" fill="url(#Z_path1_1_)" stroke="#010101" d="M74.554-191.548c0,5.786-11.337,10.478-25.315,10.478
			c-13.981,0-25.315-4.69-25.315-10.478s11.334-10.476,25.315-10.476C63.216-202.022,74.554-197.335,74.554-191.548z"/>
	</g>
	<text transform="matrix(1 0 0 1 200.6075 124.2295)" fill="#010101" font-family="'Myriad-Roman'" font-size="10">Z</text>
</g>
<text transform="matrix(1 0 0 1 247.7403 277.834)" font-family="'MyriadPro-Regular'" font-size="12">k</text>
<text transform="matrix(0.7 0 0 0.7 253.3692 281.8301)" font-family="'MyriadPro-Regular'" font-size="12">5</text>
<text transform="matrix(1 0 0 1 247.7403 137.6675)" font-family="'MyriadPro-Regular'" font-size="12">k</text>
<text transform="matrix(0.7 0 0 0.7 253.3692 141.6636)" font-family="'MyriadPro-Regular'" font-size="12">6</text>
</svg>
</window>