Team:Amsterdam/maarten/
From 2012.igem.org
" + node.data.description + "
";
var data = node.data;
if("length" in data) {
html += "Length of feature: " + data.length + "bp";
}
if("type" in data){
html += "Type of feature: " + data.type; } tip.innerHTML = html; } }, //implement event handlers Events: { enable: true, onClick: function(node) { if(!node) return; //Build detailed information about the file/folder //and place it in the right column. var html = "
" + node.name + "
", data = node.data; if("dna" in data) { html += "Sequence:
" + data.dna + ""; } $jit.id('inner-details').innerHTML = html; //hide tip sb.tips.hide(); //rotate //sb.rotate(node, animate? 'animate' : 'replot', { //duration: 1000, //transition: $jit.Trans.Quart.easeInOut //}); } }, // Only used when Label type is 'HTML' or 'SVG' // Add text to the labels. // This method is only triggered on label creation onCreateLabel: function(domElement, node){ var labels = sb.config.Label.type, aw = node.getData('length'); if (labels === 'HTML' && (node._depth < 2 || aw > 2000)) { domElement.innerHTML = node.name; } else if (labels === 'SVG' && (node._depth < 2 || aw > 2000)) { domElement.firstChild.appendChild(document.createTextNode(node.name)); } }, // Only used when Label type is 'HTML' or 'SVG' // Change node styles when labels are placed // or moved. onPlaceLabel: function(domElement, node){ var labels = sb.config.Label.type; if (labels === 'SVG') { var fch = domElement.firstChild; var style = fch.style; style.display = ''; style.cursor = 'pointer'; style.fontSize = "0.8em"; fch.setAttribute('fill', "#fff"); } else if (labels === 'HTML') { var style = domElement.style; style.display = ''; style.cursor = 'pointer'; style.fontSize = "0.8em"; style.color = "#ddd"; var left = parseInt(style.left); var w = domElement.offsetWidth; style.left = (left - w / 2) + 'px'; } } }); //load JSON data. sb.loadJSON(json); //compute positions and plot. sb.refresh(); //end } function addForbiddenSequences(){ forbiddenSequences.addSite('Forbidden-EcoRI','GAATTC') forbiddenSequences.addSite('Forbidden-XbaI','GAATTC') forbiddenSequences.addSite('Forbidden-SpeI','ACTAGT') forbiddenSequences.addSite('Forbidden-PstI','CTGCAG') forbiddenSequences.addSite('Forbidden-NotI','GCGGCCGC') } var forbiddenSequences = { forbiddenSequencesArray : {}, addSite : function(name,sequence){ forbiddenSequences.forbiddenSequencesArray[name] = sequence }, } function checkOccurrence(target,sequence){ if (sequence.length > target.length){ if (sequence.indexOf(target) == -1){ return false } else{ return true } } else{ if (target.indexOf(sequence) == -1){ return false } else{ return true } } } function randomDNA(length){ chars = 'atgc' inForbiddenSite = true while (inForbiddenSite === true){ sequence = '' inForbiddenSite = false for (k=0; k
' output += 'ACCESSION
' output += 'VERSION
' output += 'SOURCE
' output += ' ORGANISM
' output += 'COMMENT
' output += 'FEATURES' output += generateWhiteSpace(13) output += 'Location/Qualifiers
' return output } function genbankRestriction(targetSites){ restrictionPlasmidOutput = staticGenbank('restriction_plasmid') restrictionOrigin = memoryPlasmid.features[1].sequence for (key in targetSites){ restrictionOrigin += randomDNA(10) restrictionPlasmidOutput += generateWhiteSpace(5) restrictionPlasmidOutput += 'misc_feature' restrictionPlasmidOutput += generateWhiteSpace(5) restrictionPlasmidOutput += restrictionOrigin.length+1+'...' restrictionOrigin += targetSites[key].zincFinger restrictionPlasmidOutput += restrictionOrigin.length+'
' restrictionOrigin += randomDNA(10) restrictionPlasmidOutput += generateWhiteSpace(5) restrictionPlasmidOutput += 'misc_feature' restrictionPlasmidOutput += generateWhiteSpace(5) restrictionPlasmidOutput += restrictionOrigin.length+1+'...' restrictionOrigin += targetSites[key].methyltransferase restrictionPlasmidOutput += restrictionOrigin.length+'
' restrictionOrigin += targetSites[key].methyltransferase } restrictionOrigin = restrictionOrigin.toLowerCase() restrictionOrigin = restrictionOrigin.replace(/[atgc]{10}/g,'$& ').replace(/amp;/g,'').split(' ') pos = 1 newString = '' restrictionPlasmidOutput += 'ORIGIN
' for (i=0;i
' } restrictionSiteWindow = window.open() restrictionSiteWindow.document.write(restrictionPlasmidOutput) restrictionSiteWindow.focus() } function genbankMemory(){ 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+'
' memoryPlasmidOutput += generateWhiteSpace(10) memoryPlasmidOutput += '/label='+memoryPlasmid.memoryObjects[item][key].description+'
' } } origin = memoryPlasmid.dna origin = origin.replace(/[atgc]{10}/g,'$& ').replace(/amp;/g,'').split(' ') pos = 1 newString = '' memoryPlasmidOutput += 'ORIGIN
' for (i=0;i
' } myWindow=window.open() myWindow.document.write(memoryPlasmidOutput) myWindow.focus() } function formatPlasmidInput(backbone){ backbone = backbone.split('\n') originBoolean = false backboneName = '' sequence = '' if (backbone[0].toLowerCase().indexOf('locus') != -1){ for (i=0;i
'+sensedSignals[signal]) } } function createJSONRestriction(targetSites){ json = { "children": [], "data": { "$type": "none", }, "id": "Source", "name": "Restriction Plasmid" }; 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].data.dna = memoryPlasmid.dna json.children[0].children = [] json.children[0].name = memoryPlasmid.features[1].description json.children[0].id = memoryPlasmid.features[1].description totalLength = memoryPlasmid.dna.length i = 1 for (item in targetSites){ site = targetSites[item] json.children[i] = {} json.children[i].data = {} json.children[i].children = [] json.children[i].data.description = '120bp random DNA' json.children[i].data.$color = '#FFFF00' json.children[i].data.length = 120 json.children[i].data.$angularWidth = 1000 json.children[i].data.dna = randomDNA(120+i*10) json.children[i].name = '120bp DNA' json.children[i].id = i i++ json.children[i] = {} json.children[i].data = {} json.children[i].children = [] json.children[i].data.description = site.zincFingerDescription json.children[i].data.$color = '#FF0000' json.children[i].data.length = site.zincFingerLength json.children[i].data.$angularWidth = 1000 json.children[i].data.dna = site.zincFinger json.children[i].name = site.zincFingerDescription.split('|')[0]+'|'+site.zincFingerDescription.split('|')[1] json.children[i].id = i i++ json.children[i] = {} json.children[i].data = {} json.children[i].children = [] json.children[i].data.description = '120bp random DNA' json.children[i].data.$color = '#FFFF00' json.children[i].data.length = 120 json.children[i].data.$angularWidth = 1000 json.children[i].data.dna = randomDNA(120) json.children[i].name = '120bp DNA' json.children[i].id = i i++ json.children[i] = {} json.children[i].data = {} json.children[i].children = [] json.children[i].data.description = 'Methyltransferase: '+site.methyltransferaseDescription json.children[i].data.$color = '#0000CD' json.children[i].data.length = site.methyltransferaseLength json.children[i].data.$angularWidth = 1000 json.children[i].data.dna = site.methyltransferase json.children[i].data.sensor = site.sensor json.children[i].name = site.methyltransferaseDescription.split('|')[0] json.children[i].id = i i++ json.children[i] = {} json.children[i].data = {} json.children[i].children = [] json.children[i].data.description = '120bp random DNA' json.children[i].data.$color = '#FFFF00' json.children[i].data.length = 120 json.children[i].data.$angularWidth = 1000 json.children[i].data.dna = randomDNA(120) json.children[i].name = '120bp DNA' json.children[i].id = i i++ json.children[i] = {} json.children[i].data = {} json.children[i].children = [] json.children[i].data.description = site.zincFingerDescription json.children[i].data.$color = '#FF0000' json.children[i].data.length = site.zincFingerLength json.children[i].data.$angularWidth = 1000 json.children[i].data.dna = site.zincFinger json.children[i].name = site.zincFingerDescription.split('|')[0]+'|'+site.zincFingerDescription.split('|')[1] json.children[i].id = i i++ } return json } function createJSONMemory(number){ var json = {} json = { "children": [], "data": { "$type": "none", }, "id": "Source", "name": "Memory Plasmid" }; 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].data.dna = memoryPlasmid.dna json.children[0].children = [] json.children[0].name = memoryPlasmid.features[1].description json.children[0].id = memoryPlasmid.features[1].description i = 1 for (memoryObject in memoryPlasmid.memoryObjects){ for (item in memoryPlasmid.memoryObjects[memoryObject]){ json.children[i] = {} json.children[i].children = [] json.children[i].data = {} json.children[i].data.description = memoryPlasmid.memoryObjects[memoryObject][item].description type = memoryPlasmid.memoryObjects[memoryObject][item].type if (type == 'Sensor'){ color = '#00FFFF' } else if (type == 'RBS'){ color = '#FFFF00' } else if (type == 'Zinc Finger'){ color = '#800080' } else if (type == 'Linker'){ color = '#00FF00' } else if (type == 'Myc Tag'){ color = '#FF00FF' } else if (type == 'Methyltransferase'){ color = '#FFA500' } else if (type == 'Terminator'){ color = '#FF0000' } else{ color = '#B2ABF4' } json.children[i].data.$color = color json.children[i].data.length = memoryPlasmid.memoryObjects[memoryObject][item].end - memoryPlasmid.memoryObjects[memoryObject][item].start json.children[i].data.$angularWidth = 1000 json.children[i].data.type = type json.children[i].data.dna = memoryPlasmid.memoryObjects[memoryObject][item].sequence json.children[i].id = i if (memoryPlasmid.memoryObjects[memoryObject][item].description.length > 14){ json.children[i].name = memoryPlasmid.memoryObjects[memoryObject][item].description.substring(0,14) } else{ json.children[i].name = memoryPlasmid.memoryObjects[memoryObject][item].description } i++ } } return json //end }
Parts registry sensors: Madras | ||||
Parts registry sensors: Phage | ||||
Parts registry sensors: Metal sensitive | ||||
Parts registry sensors: Cell signalling | ||||