Team:Amsterdam/maarten/
From 2012.igem.org
(Difference between revisions)
Line 5: | Line 5: | ||
<html> | <html> | ||
<head> | <head> | ||
- | |||
<script type="text/javascript" src="jquery-1.2.3.min.js"></script> | <script type="text/javascript" src="jquery-1.2.3.min.js"></script> | ||
- | |||
- | |||
- | |||
<script type='text/javascript'> | <script type='text/javascript'> | ||
Line 37: | Line 33: | ||
}; | }; | ||
- | function | + | |
- | + | function init(json){ | |
- | + | ||
//init data | //init data | ||
//init Sunburst | //init Sunburst | ||
Line 63: | Line 58: | ||
type: 'Native', | type: 'Native', | ||
stylesClick: { | stylesClick: { | ||
- | 'color': '# | + | 'color': '#33dddd' |
}, | }, | ||
}, | }, | ||
Line 70: | Line 65: | ||
enable: true, | enable: true, | ||
onShow: function(tip, node) { | onShow: function(tip, node) { | ||
- | var html = "<div class=\"tip-title\">" + node. | + | var html = "<div class=\"tip-title\">" + node.name + "</div>"; |
var data = node.data; | var data = node.data; | ||
if("length" in data) { | if("length" in data) { | ||
Line 89: | Line 84: | ||
//and place it in the right column. | //and place it in the right column. | ||
var html = "<h4>" + node.name + "</h4>", data = node.data; | var html = "<h4>" + node.name + "</h4>", data = node.data; | ||
- | if(" | + | |
- | html += "<br /><br /><b> | + | if("description" in data) { |
+ | html += "<br /><br /><b>Last commit was:</b><br /><pre>" + data.description + "</pre>"; | ||
} | } | ||
$jit.id('inner-details').innerHTML = html; | $jit.id('inner-details').innerHTML = html; | ||
Line 96: | Line 92: | ||
sb.tips.hide(); | sb.tips.hide(); | ||
//rotate | //rotate | ||
- | + | sb.rotate(node, animate? 'animate' : 'replot', { | |
- | + | duration: 1000, | |
- | + | transition: $jit.Trans.Quart.easeInOut | |
- | + | }); | |
} | } | ||
}, | }, | ||
Line 107: | Line 103: | ||
onCreateLabel: function(domElement, node){ | onCreateLabel: function(domElement, node){ | ||
var labels = sb.config.Label.type, | var labels = sb.config.Label.type, | ||
- | aw = node.getData(' | + | aw = node.getData('angularWidth'); |
if (labels === 'HTML' && (node._depth < 2 || aw > 2000)) { | if (labels === 'HTML' && (node._depth < 2 || aw > 2000)) { | ||
domElement.innerHTML = node.name; | domElement.innerHTML = node.name; | ||
Line 353: | Line 349: | ||
} | } | ||
- | function | + | function genbank(){ |
+ | memoryPlasmidOutput = staticGenbank('memory_plasmid') | ||
+ | for (item in memoryPlasmid.memoryObjects){ | ||
+ | for (key in memoryPlasmid.memoryObjects[item]){ | ||
+ | memoryPlasmidOutput += generateWhiteSpace(5) | ||
+ | memoryPlasmidOutput += 'misc_feature' | ||
+ | memoryPlasmidOutput += generateWhiteSpace(5) | ||
+ | memoryPlasmidOutput += memoryPlasmid.memoryObjects[item][key].start+'...'+memoryPlasmid.memoryObjects[item][key].end+'<br>' | ||
+ | memoryPlasmidOutput += generateWhiteSpace(10) | ||
+ | memoryPlasmidOutput += '/label='+memoryPlasmid.memoryObjects[item][key].description+'<br>' | ||
+ | } | ||
+ | |||
+ | } | ||
+ | origin = memoryPlasmid.dna | ||
+ | origin = origin.replace(/[atgc]{10}/g,'$& ').replace(/amp;/g,'').split(' ') | ||
+ | pos = 1 | ||
+ | newString = '' | ||
+ | memoryPlasmidOutput += 'ORIGIN<br>' | ||
+ | for (i=0;i<origin.length;i++){ | ||
+ | newString = newString+' '+origin[i] | ||
+ | if ((i+1)%6===0){ | ||
+ | whiteSpace = '' | ||
+ | for (j=0;j<9-pos.toString().length;j++){ | ||
+ | whiteSpace+= ' ' | ||
+ | } | ||
+ | newString = whiteSpace+pos + ' ' + newString | ||
+ | memoryPlasmidOutput+=newString+'<br>' | ||
+ | newString = '' | ||
+ | } else if ((i+1)%6==1){ | ||
+ | if (i!=0){ | ||
+ | pos+=60 | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | if (origin.length%6 != 0){ | ||
+ | newString = '' | ||
+ | whiteSpace = '' | ||
+ | for (j=0;j<9-pos.toString().length;j++){ | ||
+ | whiteSpace+= ' ' | ||
+ | } | ||
+ | newString+=whiteSpace+pos | ||
+ | for (i=0;i<(origin.length%6);i++){ | ||
+ | newString+=' '+origin[origin.length-origin.length%6+i] | ||
+ | } | ||
+ | memoryPlasmidOutput+=newString+'<br>' | ||
+ | } | ||
restrictionPlasmidOutput = staticGenbank('restriction_plasmid') | restrictionPlasmidOutput = staticGenbank('restriction_plasmid') | ||
+ | targetSites = new Array() | ||
+ | for (item in memoryPlasmid.memoryObjects){ | ||
+ | site = new Object() | ||
+ | site.zincFinger = memoryPlasmid.memoryObjects[item].zincFinger.featureObject.target | ||
+ | site.methyltransferase = memoryPlasmid.memoryObjects[item].methyltransferase.featureObject.target | ||
+ | targetSites[item-1] = site | ||
+ | } | ||
restrictionOrigin = memoryPlasmid.features[1].sequence | restrictionOrigin = memoryPlasmid.features[1].sequence | ||
for (key in targetSites){ | for (key in targetSites){ | ||
Line 406: | Line 454: | ||
restrictionPlasmidOutput+=newString+'<br>' | restrictionPlasmidOutput+=newString+'<br>' | ||
} | } | ||
+ | myWindow=window.open() | ||
+ | myWindow.document.write(memoryPlasmidOutput) | ||
+ | myWindow.focus() | ||
restrictionSiteWindow = window.open() | restrictionSiteWindow = window.open() | ||
restrictionSiteWindow.document.write(restrictionPlasmidOutput) | restrictionSiteWindow.document.write(restrictionPlasmidOutput) | ||
restrictionSiteWindow.focus() | restrictionSiteWindow.focus() | ||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
} | } | ||
Line 643: | Line 642: | ||
continue | continue | ||
} else{ | } else{ | ||
- | featureArray[2] = new feature(memoryPlasmid.dna.length+1,memoryPlasmid.dna.length+zincFingers[j].sequence.length,'Zinc Finger',zincFingers[j].sequence, | + | featureArray[2] = new feature(memoryPlasmid.dna.length+1,memoryPlasmid.dna.length+zincFingers[j].sequence.length,'Zinc Finger',zincFingers[j].sequence,zincFingers[j].description,zincFingers[j]) |
memoryPlasmid.setDNA(memoryPlasmid.dna+zincFingers[j].sequence) | memoryPlasmid.setDNA(memoryPlasmid.dna+zincFingers[j].sequence) | ||
break | break | ||
Line 682: | Line 681: | ||
restrictionPlasmid.zfTarget = featureArray[1] | restrictionPlasmid.zfTarget = featureArray[1] | ||
} | } | ||
- | + | //genbank() | |
- | // | + | json = createJSON() |
- | + | init(json) | |
} | } | ||
function setup(){ | function setup(){ | ||
- | |||
- | |||
- | |||
addForbiddenSequences() | addForbiddenSequences() | ||
sensors = document.plasmidForm.sensors.value.toLowerCase() | sensors = document.plasmidForm.sensors.value.toLowerCase() | ||
Line 699: | Line 695: | ||
j = 0 | j = 0 | ||
number = 0 | number = 0 | ||
- | |||
for (sensor in sensorArray){ | for (sensor in sensorArray){ | ||
tempArray[j] = sensorArray[sensor] | tempArray[j] = sensorArray[sensor] | ||
Line 708: | Line 703: | ||
tempArray = new Array() | tempArray = new Array() | ||
j = 0 | j = 0 | ||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
} | } | ||
} | } | ||
if (j%5 !== 0){ | if (j%5 !== 0){ | ||
configuratePlasmid(tempArray,number) | configuratePlasmid(tempArray,number) | ||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
} | } | ||
- | |||
- | |||
- | |||
- | |||
} | } | ||
- | function | + | function createJSON(){ |
- | + | var json = { | |
- | + | "children": [ | |
- | + | { | |
- | + | "children": [], | |
- | + | "data": { | |
- | + | "description": "Fixed polar interpolation problem when theta = pi", | |
- | + | "$color": "#B0AAF6", | |
- | + | "$angularWidth": 1000, | |
- | + | }, | |
- | + | "id": "Source/Coordinates", | |
- | + | "name": "Backbone" | |
- | + | }, | |
- | + | { | |
- | + | "children": [], | |
- | + | "data": { | |
- | + | "description": "Memory part", | |
- | + | "$color": "#B2ABF4", | |
- | + | "$angularWidth": 1000, | |
- | + | }, | |
- | + | "id": "Source/Core", | |
- | + | "name": "Memory part" | |
- | + | }, | |
- | + | ||
- | + | ], | |
- | + | "data": { | |
- | + | "$type": "none" | |
- | + | }, | |
- | + | "id": "Source", | |
- | + | "name": "Plasmid" | |
- | + | }; | |
- | + | json.children[0].children[0] = {} | |
- | + | json.children[0].children[0].data = {} | |
- | + | json.children[0].children[0].data.description = memoryPlasmid.features[1].description | |
- | + | json.children[0].children[0].data.$color = '#B2ABF4' | |
- | + | json.children[0].children[0].data.length = memoryPlasmid.features[1].end - memoryPlasmid.features[1].start | |
- | + | json.children[0].children[0].data.$angularWidth = 1000 | |
- | + | json.children[0].children[0].data.type = memoryPlasmid.features[1].type | |
- | + | json.children[0].children[0].children = [] | |
- | + | json.children[0].children[0].name = memoryPlasmid.features[1].description | |
- | + | json.children[0].children[0].id = memoryPlasmid.features[1].description | |
- | + | i = 0 | |
- | + | for (memoryObject in memoryPlasmid.memoryObjects){ | |
- | + | for (feature in memoryPlasmid.memoryObjects[memoryObject]){ | |
- | + | json.children[1].children[i] = [] | |
- | + | json.children[1].children[i].data = {} | |
- | + | json.children[1].children[i].data.description = memoryPlasmid.memoryObjects[memoryObject][feature].description | |
- | + | type = memoryPlasmid.memoryObjects[memoryObject][feature].type | |
- | + | color = '#B2ABF4' | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | json.children[0] = {} | + | |
- | json.children[0].data = {} | + | |
- | json.children[0].data.description = memoryPlasmid.features[1].description | + | |
- | json.children[0].data.$color = '#B2ABF4' | + | |
- | json.children[0].data.length = memoryPlasmid.features[1].end - memoryPlasmid.features[1].start | + | |
- | json.children[0].data.$angularWidth = 1000 | + | |
- | json.children[0].data.type = memoryPlasmid.features[1].type | + | |
- | json.children[0] | + | |
- | + | ||
- | json.children[0].name = memoryPlasmid.features[1].description | + | |
- | json.children[0].id = memoryPlasmid.features[1].description | + | |
- | i = | + | |
- | + | ||
- | for ( | + | |
- | json.children[ | + | |
- | + | ||
- | json.children[i].data = {} | + | |
- | json.children[i].data.description = memoryPlasmid.memoryObjects[memoryObject][ | + | |
- | type = memoryPlasmid.memoryObjects[memoryObject][ | + | |
if (type == 'Sensor'){ | if (type == 'Sensor'){ | ||
color = '#00FFFF' | color = '#00FFFF' | ||
Line 951: | Line 776: | ||
color = '#B2ABF4' | color = '#B2ABF4' | ||
} | } | ||
- | json.children[i].data.$color = color | + | json.children[1].children[i].data.$color = color |
- | json.children[i].data.length = memoryPlasmid.memoryObjects[memoryObject][ | + | json.children[1].children[i].data.length = memoryPlasmid.memoryObjects[memoryObject][feature].end - memoryPlasmid.memoryObjects[memoryObject][feature].start |
- | json.children[i].data.$angularWidth = 1000 | + | json.children[1].children[i].data.$angularWidth = 1000 |
- | json.children[i].data.type = type | + | json.children[1].children[i].data.type = type |
- | json.children[ | + | json.children[1].children[i].id = i |
- | + | json.children[1].children[i].name = memoryPlasmid.memoryObjects[memoryObject][feature].description | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
i++ | i++ | ||
} | } | ||
- | + | } | |
- | + | return json | |
- | + | ||
//end | //end | ||
} | } | ||
Line 975: | Line 794: | ||
<div id="main-content"> | <div id="main-content"> | ||
{{Team:Amsterdam/toolForm}} | {{Team:Amsterdam/toolForm}} | ||
+ | <div id="infovis"></div> | ||
</div> | </div> | ||
{{Team:Amsterdam/Foot}} | {{Team:Amsterdam/Foot}} |
Revision as of 18:39, 3 September 2012
Parts registry sensors: Madras | ||||
Parts registry sensors: Phage | ||||
Parts registry sensors: Metal sensitive | ||||
Parts registry sensors: Cell signalling | ||||