Commit c39636ae authored by Marc Duez's avatar Marc Duez
parents 19344d67 1f088c09
......@@ -150,7 +150,7 @@
</div></div>
</div>
<div class="menu" onmouseover="showSelector('clusterSelector');" > cluster
<div class="menu" id="cluster_menu" onmouseover="showSelector('clusterSelector');" > cluster
<div id="clusterSelector" class="selector"><div>
<a class="buttonSelector" onclick="m.resetClusters();">reset all clusters</a>
<a class="buttonSelector" onclick="m.restoreClusters();">user</a>
......@@ -162,7 +162,7 @@
</div></div>
</div>
<div class="menu" onmouseover="showSelector('groupSelector');"> analysis
<div class="menu" id="analysis_menu" onmouseover="showSelector('groupSelector');"> analysis
<div id="groupSelector" class="selector">
<div>
<a class="buttonSelector" onclick="sp.changeSplitMethod('gene_v', 'gene_j');">V / J (genes)</a>
......@@ -180,7 +180,7 @@
</div>
</div>
<div class="menu" onmouseover="showSelector('colorSelector');" > color
<div class="menu" id="color_menu" onmouseover="showSelector('colorSelector');" > color
<div id="colorSelector" class="selector"><div>
<a class="buttonSelector" onclick="m.changeColorMethod('Tag');">by tag</a>
<a class="buttonSelector" onclick="m.changeColorMethod('V');">by V</a>
......
......@@ -308,6 +308,12 @@ Graph.prototype = {
d.type = "axis_v";
d.text = time_name;
// Warns when there are very few segmented reads
var percent = (this.m.reads.segmented[this.m.t] / this.m.reads.total[this.m.t]) * 100;
if (percent < 10)
d.text += " !" ;
d.orientation = "vert";
if (this.drag_on && i == this.dragged_time_point) {
var coordinates = [0, 0];
......
......@@ -800,13 +800,8 @@ ScatterPlot.prototype = {
}
if (this.splitY != "bar" && this.use_system_grid && this.m.system_available.length > 1 ){
if (this.m.system_selected.length >1){
this.gridSizeW = 0.8*this.resizeW;
this.gridSizeH = 1*this.resizeH;
}else{
this.gridSizeW = 0.92*this.resizeW;
this.gridSizeH = 1*this.resizeH;
}
}else{
this.gridSizeW = this.resizeW;
this.gridSizeH = this.resizeH;
......@@ -840,7 +835,6 @@ ScatterPlot.prototype = {
if (this.m.system_selected.indexOf(system) != -1 ) enabled = true
var xpos = 0.8
if (this.m.system_selected.length <= 1) xpos=0.92
if (system != this.m.germlineV.system){
this.systemGrid["label"].push( {"text": system, "enabled": enabled, "x" : xpos+0.01, "y" : ((i*2)+1)/(n*2) })
......
This diff is collapsed.
# coding: utf-8
require 'watir-webdriver'
class VidjilBrowser < Watir::Browser
# Return the text field that allows to edit a clone name
def clone_name_editor
return text_field(:id => 'new_name')
end
# Buttons that allows to save a name change
def clone_name_saver
return a(:id => 'btnSave')
end
# Return the clone in the list
def clone_in_list(id, extra={})
return list.li(extra.merge(:id => id))
end
# Return the info on the clone in the list (one item of a list)
# A hash with keys cluster, system, name, info, star and size defined with
# the corresponding elements in the list.
def clone_info(id, extra={})
clone = clone_in_list(id, extra)
return {cluster: clone.element(:class => 'clusterBox'), system: clone.element(:class => "nameBox"),
name: clone.element(:class => 'nameBox'), info: clone.element(:class => 'infoBox'),
star: clone.element(:class => 'starBox'), size: clone.element(:class => 'sizeBox')}
end
# Return a hash with information on the sequence in the segmenter
# A hash with keys name, star and size defined with
# the corresponding elements in the segmenter.
def clone_info_segmenter(id, extra={})
item = clone_in_segmenter(id, extra)
return {name: item.element(:class => 'nameBox'), star: item.element(:class => 'starBox'),
size: item.element(:class => 'sizeBox')}
end
# Return the clone on the scatterplot
def clone_in_scatterplot(id, extra={})
return element(extra.merge(:id => "circle"+id))
end
# Return the clone in the graph
def clone_in_graph(id, extra={})
return element(extra.merge(:id => "polyline"+id))
end
# Return the item of clone id in segmenter (may not exist…)
def clone_in_segmenter(id, extra={})
return element(extra.merge(:id => 'seq'+id))
end
# Return the div containing the information (status bar)
def infoline
return div(:id => 'bot-container').div(:class => 'focus')
end
def menu_patient
return div(:id => 'db_menu')
end
def menu_import_export
return div(:id => 'demo_file_menu')
end
def menu_cluster
return div(:id => 'cluster_menu')
end
def menu_analysis
return div(:id => 'analysis_menu')
end
def menu_color
return div(:id => 'color_menu')
end
def menu_filter
return div(:id => 'filter_menu')
end
def menu_settings
return div(:id => 'settings_menu')
end
# Return the element corresponding to the x axis of the scatterplot
def scatterplot_x
return scatterplot('x')
end
# Return the element corresponding to the legend of the x axis of the scatterplot
def scatterplot_x_legend(index)
return scatterplot_legend('x', index)
end
# Return the element corresponding to the x axis of the scatterplot
def scatterplot_y
return scatterplot('y')
end
# Return the element corresponding to the legend of the y axis of the scatterplot
def scatterplot_y_legend(index)
return scatterplot_legend('y', index)
end
# Return the span containing elements of the sequence in the scatterplot
def sequence(id)
return element(:id => 'm'+id)
end
# Return the V sequence of the clone id
def sequence_V(id)
return sequence(id).element(:class => 'V')
end
# Return the N1 sequence of the clone id
def sequence_N1(id)
return sequence(id).element(:class => 'N', :index => 0)
end
# Return the N2 sequence of the clone id
def sequence_N2(id)
return sequence(id).element(:class => 'N', :index => 1)
end
# Return the D sequence of the clone id
def sequence_D(id)
return sequence(id).element(:class => 'D')
end
# Return the J sequence of the clone id
def sequence_J(id)
return sequence(id).element(:class => 'J')
end
# Return the div containing stats information on selected clone(s)
def statsline
div(:id => 'bot-container').div(:class => 'stats')
end
# Return an item from a tag selector split in a hash.
# The hash contains the following keys:
def tag_item(id)
ts = tag_selector
return {color: ts.span(:class => 'tagColor'+id),
name: ts.span(:class => 'tagName'+id),
edit: ts.li(:index => id.to_i).span(:class => 'edit_button')}
end
# Return the div containing the tag selector
def tag_selector
return div(:id => 'tagSelector')
end
# Return the close button for tag selector
def tag_selector_close
return tag_selector.span(:class => 'closeButton')
end
# Return the field for editing tag name in the tag selector
def tag_selector_edit_name
return tag_selector.text_field(:id => 'new_tag_name')
end
# Return the field for editing tag name in the tag selector
def tag_selector_edit_normalisation
return tag_selector.text_field(:id => 'normalized_size')
end
# Return the button that validates the changes in the tag selector
def tag_selector_name_validator
return tag_selector.a(:id => 'btnSaveTag')
end
# Return the button that validates the changes in the tag selector
def tag_selector_normalisation_validator
return tag_selector.button(:text => 'ok')
end
# Click in the back so that we unselect everything
def unselect
element(:id => "visu_back" ).click
end
# Return the div of the list of clones
def list
return div(:id => 'list_clones')
end
private
def scatterplot(axis)
return element(:id => 'visu_axis_'+axis+'_container')
end
def scatterplot_legend(axis, index)
return scatterplot(axis).element(:class => 'sp_legend', :index => index)
end
end
......@@ -216,16 +216,11 @@ def add_form():
user_group = auth.user_group(auth.user.id)
admin_group = db(db.auth_group.role=='admin').select().first().id
#patient creator automaticaly have all rights
#patient creator automaticaly has all rights
auth.add_permission(user_group, 'admin', db.patient, id)
auth.add_permission(user_group, 'read', db.patient, id)
auth.add_permission(user_group, 'anon', db.patient, id)
#tmp: share rights with users of the same group
for g in auth.user_groups :
auth.add_permission(g, 'admin', db.patient, id)
auth.add_permission(g, 'read', db.patient, id)
patient_name = request.vars["first_name"] + ' ' + request.vars["last_name"]
res = {"redirect": "patient/info",
......
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