Commit 6f2308b8 authored by Raphael Müller's avatar Raphael Müller
Browse files

lanes are calculated automatically

parent 832f9325
......@@ -24,6 +24,12 @@
<div style="height:150px">
<genome-viewer :genome-stats="genome_stats" :lanes="3" :color-map="{'xRNA':'#CC0000'}" :feature-data="feature_data3"></genome-viewer>
</div>
<h1>Genome 3</h1>
<h2><i>Bacillus exampelaris I</i></h2>
<div style="height:150px">
<genome-viewer :genome-stats="genome_stats" :lanes="3" :color-map="{'xRNA':'#CC0000'}" :feature-data="feature_data"></genome-viewer>
</div>
</div>
<script src="js/axis.js"></script>
<script src="js/feature.js"></script>
......
......@@ -124,18 +124,6 @@ Vue.component("genome-viewer",{
this.y = svg_el.y
this.width = svg_el.width
this.height = svg_el.height
//this.height / length([axis and lanes * 2])
// lanes are twize as big as the axis
// so height / (1 + no_of_lanes * 2)
//var one_height = this.svg_size[1]/(1 + 2 * this.lanes.length)
//let svg_el = this.$refs.genomeVuer.getBoundingClientRect()
//console.log(svg_el)
////console.log(svg_el)
//this.width = svg_el.width
//this.height = svg_el.height
////return [svg_el.clientWidth, svg_el.clientHeight]
//this.one_height = this.height/(1 + 2 * this.lanes.length)
},
created(){
window.addEventListener('resize', this.handleResize, false);
......@@ -152,8 +140,6 @@ Vue.component("genome-viewer",{
this.y = svg_el.y
this.width = svg_el.width
this.height = svg_el.height
//#this.width = window.innerWidth;
//#this.height = window.innerHeight;
},
getColor(feature){
if(feature.hasOwnProperty("color")){
......@@ -176,10 +162,9 @@ Vue.component("genome-viewer",{
}
},
lane(feat){
l = feat.lane ? feat.lane : 1
l = feat.lane ? feat.lane : feat.start%this.lanes+1
l = l* ((feat.strand=="+")? -1 : +1)
return l
//return (str=="+")? -1 : +1
},
to_h(param){
//param is a value between -n and +n, where n is the number of lanes divided by 2
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment