mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Merge branch 'dev' into replace_history_import
This commit is contained in:
@@ -47,21 +47,22 @@ window.app = function app(options, bootstrapped) {
|
||||
"(/)tours(/)(:tour_id)": "show_tours",
|
||||
"(/)user(/)": "show_user",
|
||||
"(/)user(/)(:form_id)": "show_user_form",
|
||||
"(/)workflow(/)": "show_workflows",
|
||||
"(/)workflow/run(/)": "show_run",
|
||||
"(/)pages(/)create(/)": "show_pages_create",
|
||||
"(/)pages(/)edit(/)": "show_pages_edit",
|
||||
"(/)pages(/)(:action_id)": "show_pages",
|
||||
"(/)visualizations(/)edit(/)": "show_visualizations_edit",
|
||||
"(/)visualizations/(:action_id)": "show_visualizations",
|
||||
"(/)workflows/import_workflow": "show_import_workflow",
|
||||
"(/)workflows/run(/)": "show_run",
|
||||
"(/)workflows(/)list": "show_workflows",
|
||||
"(/)workflows/list_published(/)": "show_workflows_published",
|
||||
"(/)histories(/)import": "show_histories_import",
|
||||
"(/)workflows/create(/)": "show_workflows_create",
|
||||
"(/)histories(/)citations(/)": "show_history_citations",
|
||||
"(/)histories(/)rename(/)": "show_histories_rename",
|
||||
"(/)histories(/)import(/)": "show_histories_import",
|
||||
"(/)histories(/)permissions(/)": "show_histories_permissions",
|
||||
"(/)histories(/)(:action_id)": "show_histories",
|
||||
"(/)datasets(/)list(/)": "show_datasets",
|
||||
"(/)workflow/import_workflow": "show_import_workflow",
|
||||
"(/)custom_builds": "show_custom_builds",
|
||||
"(/)datasets/edit": "show_dataset_edit_attributes",
|
||||
"(/)datasets/error": "show_dataset_error"
|
||||
@@ -197,6 +198,15 @@ window.app = function app(options, bootstrapped) {
|
||||
this.page.display(new Workflows.View());
|
||||
},
|
||||
|
||||
show_workflows_create: function() {
|
||||
this.page.display(
|
||||
new FormWrapper.View({
|
||||
url: `workflow/create`,
|
||||
redirect: "workflow/editor"
|
||||
})
|
||||
);
|
||||
},
|
||||
|
||||
show_run: function() {
|
||||
this._loadWorkflow();
|
||||
},
|
||||
|
||||
@@ -66,7 +66,7 @@ var ToolPanel = Backbone.View.extend({
|
||||
self.$("#internal-workflows").append(
|
||||
self._templateWorkflowLink({
|
||||
title: menu_entry.stored_workflow.name,
|
||||
href: `workflow/run?id=${menu_entry.encoded_stored_workflow_id}`
|
||||
href: `workflows/run?id=${menu_entry.encoded_stored_workflow_id}`
|
||||
})
|
||||
);
|
||||
});
|
||||
|
||||
@@ -39,7 +39,7 @@ var Collection = Backbone.Collection.extend({
|
||||
title: _l("Workflow"),
|
||||
tooltip: _l("Chain tools into workflows"),
|
||||
disabled: !Galaxy.user.id,
|
||||
url: "workflow"
|
||||
url: "workflows/list"
|
||||
});
|
||||
|
||||
//
|
||||
|
||||
@@ -58,13 +58,18 @@ var View = Backbone.View.extend({
|
||||
contentType: "application/json"
|
||||
})
|
||||
.done(response => {
|
||||
var success_message = {
|
||||
message: response.message,
|
||||
status: "success",
|
||||
persistent: false
|
||||
};
|
||||
var params = {};
|
||||
if (response.id) {
|
||||
params.id = response.id;
|
||||
} else {
|
||||
params = {
|
||||
message: response.message,
|
||||
status: "success",
|
||||
persistent: false
|
||||
}
|
||||
}
|
||||
if (self.redirect) {
|
||||
window.location = `${Galaxy.root + self.redirect}?${$.param(success_message)}`;
|
||||
window.location = `${Galaxy.root + self.redirect}?${$.param(params)}`;
|
||||
} else {
|
||||
form.data.matchModel(response, (input, input_id) => {
|
||||
form.field_list[input_id].value(input.value);
|
||||
|
||||
@@ -103,7 +103,7 @@ var TagsEditor = Backbone.View.extend(baseMVC.LoggableMixin)
|
||||
|
||||
_renderTags: function() {
|
||||
var tags = this.model.get("tags");
|
||||
var addButton = "static/images/fugue/tag--plus.png";
|
||||
var addButton = `${Galaxy.root}static/images/fugue/tag--plus.png`;
|
||||
var renderedArray = [];
|
||||
_.each(tags, tag => {
|
||||
tag = tag.indexOf("name:") == 0 ? tag.slice(5) : tag;
|
||||
|
||||
@@ -296,7 +296,7 @@ export default Backbone.View.extend({
|
||||
Save: save_current_workflow,
|
||||
"Save As": workflow_save_as,
|
||||
Run: function() {
|
||||
window.location = `${Galaxy.root}workflow/run?id=${self.options.id}`;
|
||||
window.location = `${Galaxy.root}workflows/run?id=${self.options.id}`;
|
||||
},
|
||||
"Edit Attributes": function() {
|
||||
self.workflow.clear_active_node();
|
||||
|
||||
@@ -36,7 +36,7 @@ var WorkflowItemView = Backbone.View.extend({
|
||||
this.model.save();
|
||||
// This reloads the whole page, so that the workflow appears in the tool panel.
|
||||
// Ideally we would notify only the tool panel of a change
|
||||
window.location = `${Galaxy.root}workflow`;
|
||||
window.location = `${Galaxy.root}workflows/list`;
|
||||
},
|
||||
|
||||
removeWorkflow: function() {
|
||||
@@ -127,7 +127,7 @@ var WorkflowItemView = Backbone.View.extend({
|
||||
if (this.model.get("owner") === Galaxy.user.attributes.username) {
|
||||
return `<ul class="dropdown-menu action-dpd"><li><a href="${Galaxy.root}workflow/editor?id=${
|
||||
this.model.id
|
||||
}">Edit</a></li><li><a href="${Galaxy.root}workflow/run?id=${this.model.id}">Run</a></li><li><a href="${
|
||||
}">Edit</a></li><li><a href="${Galaxy.root}workflows/run?id=${this.model.id}">Run</a></li><li><a href="${
|
||||
Galaxy.root
|
||||
}workflow/sharing?id=${this.model.id}">Share</a></li><li><a href="${Galaxy.root}api/workflows/${
|
||||
this.model.id
|
||||
@@ -141,7 +141,7 @@ var WorkflowItemView = Backbone.View.extend({
|
||||
Galaxy.root
|
||||
}workflow/display_by_username_and_slug?username=${this.model.get("owner")}&slug=${this.model.get(
|
||||
"slug"
|
||||
)}">View</a></li><li><a href="${Galaxy.root}workflow/run?id=${
|
||||
)}">View</a></li><li><a href="${Galaxy.root}workflows/run?id=${
|
||||
this.model.id
|
||||
}">Run</a></li><li><a id="copy-workflow" style="cursor: pointer;">Copy</a></li><li><a class="link-confirm-shared-${
|
||||
this.model.id
|
||||
@@ -305,9 +305,9 @@ var WorkflowListView = Backbone.View.extend({
|
||||
_templateActionButtons: function() {
|
||||
return `<ul class="manage-table-actions"><li><input class="search-wf form-control" type="text" autocomplete="off" placeholder="search for workflow..."></li><li><a class="action-button fa fa-plus wf-action" id="new-workflow" title="Create new workflow" href="${
|
||||
Galaxy.root
|
||||
}workflow/create"></a></li><li><a class="action-button fa fa-upload wf-action" id="import-workflow" title="Upload or import workflow" href="${
|
||||
}workflows/create"></a></li><li><a class="action-button fa fa-upload wf-action" id="import-workflow" title="Upload or import workflow" href="${
|
||||
Galaxy.root
|
||||
}workflow/import_workflow"></a></li></ul>`;
|
||||
}workflows/import_workflow"></a></li></ul>`;
|
||||
},
|
||||
|
||||
/** Template for workflow table */
|
||||
|
||||
@@ -643,6 +643,19 @@
|
||||
<datatype extension="pttgf" type="galaxy.datatypes.plant_tribes:PlantTribesTargetedGeneFamilies" />
|
||||
<datatype extension="pttree" type="galaxy.datatypes.plant_tribes:PlantTribesPhylogeneticTree" />
|
||||
<datatype extension="smat" type="galaxy.datatypes.plant_tribes:Smat" display_in_upload="true" />
|
||||
<!-- Start Haplotype / LOD Datatypes -->
|
||||
<datatype extension="alohomora_gts" type="galaxy.datatypes.genetics:GenotypeMatrix" />
|
||||
<datatype extension="alohomora_map" type="galaxy.datatypes.tabular:Tabular" subclass="true" />
|
||||
<datatype extension="alohomora_maf" type="galaxy.datatypes.tabular:Tabular" subclass="true" />
|
||||
<datatype extension="alohomora_ped" type="galaxy.datatypes.tabular:Tabular" subclass="true" />
|
||||
<!-- Common input formats: Generated by alohomora, but user may also upload these manually -->
|
||||
<datatype extension="linkage_pedin" type="galaxy.datatypes.tabular:Tabular" subclass="true" />
|
||||
<datatype extension="linkage_datain" type="galaxy.datatypes.genetics:DataIn" />
|
||||
<datatype extension="linkage_map" type="galaxy.datatypes.genetics:MarkerMap" />
|
||||
<!-- All output linkage is converted into the Allegro output format -->
|
||||
<datatype extension="allegro_ihaplo" type="galaxy.datatypes.tabular:Tabular" />
|
||||
<datatype extension="allegro_descent" type="galaxy.datatypes.tabular:Tabular" />
|
||||
<datatype extension="allegro_fparam" type="galaxy.datatypes.genetics:AllegroLOD" />
|
||||
</registration>
|
||||
<sniffers>
|
||||
<!--
|
||||
@@ -756,6 +769,10 @@
|
||||
<sniffer type="galaxy.datatypes.text:Ipynb"/>
|
||||
<sniffer type="galaxy.datatypes.text:Biom1"/>
|
||||
<sniffer type="galaxy.datatypes.text:Json"/>
|
||||
<sniffer type="galaxy.datatypes.genetics:GenotypeMatrix" />
|
||||
<sniffer type="galaxy.datatypes.genetics:DataIn" />
|
||||
<sniffer type="galaxy.datatypes.genetics:MarkerMap" />
|
||||
<sniffer type="galaxy.datatypes.genetics:AllegroLOD" />
|
||||
<sniffer type="galaxy.datatypes.sequence:RNADotPlotMatrix"/>
|
||||
<sniffer type="galaxy.datatypes.sequence:DotBracket"/>
|
||||
<sniffer type="galaxy.datatypes.tabular:ConnectivityTable"/>
|
||||
|
||||
@@ -20,6 +20,7 @@ from cgi import escape
|
||||
from six.moves.urllib.parse import quote_plus
|
||||
|
||||
from galaxy.datatypes import metadata
|
||||
from galaxy.datatypes.data import Text
|
||||
from galaxy.datatypes.metadata import MetadataElement
|
||||
from galaxy.datatypes.tabular import Tabular
|
||||
from galaxy.datatypes.text import Html
|
||||
@@ -31,6 +32,7 @@ verbose = False
|
||||
|
||||
# https://genome.ucsc.edu/goldenpath/help/hgGenomeHelp.html
|
||||
VALID_GENOME_GRAPH_MARKERS = re.compile('^(chr.*|RH.*|rs.*|SNP_.*|CN.*|A_.*)')
|
||||
VALID_GENOTYPES_LINE = re.compile('^([a-zA-Z0-9]+)(\\s([0-9]{2}|[A-Z]{2}|NC|\?\?))+\\s*$')
|
||||
|
||||
|
||||
class GenomeGraphs(Tabular):
|
||||
@@ -827,6 +829,281 @@ class MAlist(RexpBase):
|
||||
substitute_name_with_metadata='base_name', is_binary=True)
|
||||
|
||||
|
||||
class LinkageStudies(Text):
|
||||
"""
|
||||
superclass for classical linkage analysis suites
|
||||
"""
|
||||
test_files = [
|
||||
'linkstudies.allegro_fparam', 'linkstudies.alohomora_gts',
|
||||
'linkstudies.linkage_datain', 'linkstudies.linkage_map'
|
||||
]
|
||||
|
||||
def __init__(self, **kwd):
|
||||
Text.__init__(self, **kwd)
|
||||
self.max_lines = 10
|
||||
|
||||
|
||||
class GenotypeMatrix(LinkageStudies):
|
||||
"""
|
||||
Sample matrix of genotypes
|
||||
- GTs as columns
|
||||
"""
|
||||
file_ext = "alohomora_gts"
|
||||
|
||||
def __init__(self, **kwd):
|
||||
super(GenotypeMatrix, self).__init__(**kwd)
|
||||
self.num_cols = -1
|
||||
|
||||
def header_check(self, fio):
|
||||
header_elems = fio.readline().split('\t')
|
||||
|
||||
if header_elems[0] != "Name":
|
||||
return False
|
||||
|
||||
try:
|
||||
return all([int(sid) > 0 for sid in header_elems[1:]])
|
||||
except ValueError:
|
||||
return False
|
||||
|
||||
return True
|
||||
|
||||
def sniff(self, filename):
|
||||
"""
|
||||
>>> classname = GenotypeMatrix
|
||||
>>> from galaxy.datatypes.sniff import get_test_fname
|
||||
>>> extn_true = classname().file_ext
|
||||
>>> file_true = get_test_fname("linkstudies." + extn_true)
|
||||
>>> classname().sniff(file_true)
|
||||
True
|
||||
|
||||
>>> false_files = list(LinkageStudies.test_files)
|
||||
>>> false_files.remove("linkstudies." + extn_true)
|
||||
>>> result_true = []
|
||||
>>> for fname in false_files:
|
||||
... file_false = get_test_fname(fname)
|
||||
... res = classname().sniff(file_false)
|
||||
... if res:
|
||||
... result_true.append(fname)
|
||||
>>>
|
||||
>>> result_true
|
||||
[]
|
||||
"""
|
||||
with open(filename, "r") as fio:
|
||||
|
||||
if not self.header_check(fio):
|
||||
return False
|
||||
|
||||
for lcount, line in enumerate(fio):
|
||||
if lcount > self.max_lines:
|
||||
return True
|
||||
|
||||
tokens = line.split('\t')
|
||||
|
||||
if self.num_cols == -1:
|
||||
self.num_cols = len(tokens)
|
||||
elif self.num_cols != len(tokens):
|
||||
return False
|
||||
if not VALID_GENOTYPES_LINE.match(line):
|
||||
return False
|
||||
|
||||
return True
|
||||
|
||||
|
||||
class MarkerMap(LinkageStudies):
|
||||
"""
|
||||
Map of genetic markers including physical and genetic distance
|
||||
Common input format for linkage programs
|
||||
|
||||
chrom, genetic pos, markername, physical pos, Nr
|
||||
"""
|
||||
file_ext = "linkage_map"
|
||||
|
||||
def header_check(self, fio):
|
||||
headers = fio.readline().split()
|
||||
|
||||
if len(headers) == 5 and headers[0] == "#Chr":
|
||||
return True
|
||||
|
||||
return False
|
||||
|
||||
def sniff(self, filename):
|
||||
"""
|
||||
>>> classname = MarkerMap
|
||||
>>> from galaxy.datatypes.sniff import get_test_fname
|
||||
>>> extn_true = classname().file_ext
|
||||
>>> file_true = get_test_fname("linkstudies." + extn_true)
|
||||
>>> classname().sniff(file_true)
|
||||
True
|
||||
|
||||
>>> false_files = list(LinkageStudies.test_files)
|
||||
>>> false_files.remove("linkstudies." + extn_true)
|
||||
>>> result_true = []
|
||||
>>> for fname in false_files:
|
||||
... file_false = get_test_fname(fname)
|
||||
... res = classname().sniff(file_false)
|
||||
... if res:
|
||||
... result_true.append(fname)
|
||||
>>>
|
||||
>>> result_true
|
||||
[]
|
||||
"""
|
||||
with open(filename, "r") as fio:
|
||||
|
||||
if not self.header_check(fio):
|
||||
return False
|
||||
|
||||
for lcount, line in enumerate(fio):
|
||||
if lcount > self.max_lines:
|
||||
return True
|
||||
|
||||
try:
|
||||
chrm, gpos, nam, bpos, row = line.split()
|
||||
float(gpos)
|
||||
int(bpos)
|
||||
|
||||
try:
|
||||
int(chrm)
|
||||
except ValueError:
|
||||
if not chrm.lower()[0] in ('x', 'y', 'm'):
|
||||
return False
|
||||
|
||||
except ValueError:
|
||||
return False
|
||||
|
||||
return True
|
||||
|
||||
|
||||
class DataIn(LinkageStudies):
|
||||
"""
|
||||
Common linkage input file for intermarker distances
|
||||
and recombination rates
|
||||
"""
|
||||
file_ext = "linkage_datain"
|
||||
|
||||
def __init__(self, **kwd):
|
||||
super(DataIn, self).__init__(**kwd)
|
||||
self.num_markers = None
|
||||
self.intermarkers = 0
|
||||
|
||||
def eof_function(self):
|
||||
return self.intermarkers > 0
|
||||
|
||||
def sniff(self, filename):
|
||||
"""
|
||||
>>> classname = DataIn
|
||||
>>> from galaxy.datatypes.sniff import get_test_fname
|
||||
>>> extn_true = classname().file_ext
|
||||
>>> file_true = get_test_fname("linkstudies." + extn_true)
|
||||
>>> classname().sniff(file_true)
|
||||
True
|
||||
|
||||
>>> false_files = list(LinkageStudies.test_files)
|
||||
>>> false_files.remove("linkstudies." + extn_true)
|
||||
>>> result_true = []
|
||||
>>> for fname in false_files:
|
||||
... file_false = get_test_fname(fname)
|
||||
... res = classname().sniff(file_false)
|
||||
... if res:
|
||||
... result_true.append(fname)
|
||||
>>>
|
||||
>>> result_true
|
||||
[]
|
||||
"""
|
||||
with open(filename, "r") as fio:
|
||||
|
||||
for lcount, line in enumerate(fio):
|
||||
if lcount > self.max_lines:
|
||||
return self.eof_function()
|
||||
|
||||
tokens = line.split()
|
||||
try:
|
||||
if lcount == 0:
|
||||
self.num_markers = int(tokens[0])
|
||||
map(int, tokens[1:])
|
||||
elif lcount == 1:
|
||||
map(float, tokens)
|
||||
|
||||
if len(tokens) != 4:
|
||||
return False
|
||||
elif lcount == 2:
|
||||
map(int, tokens)
|
||||
last_token = int(tokens[-1])
|
||||
|
||||
if self.num_markers is None:
|
||||
return False
|
||||
if len(tokens) != last_token:
|
||||
return False
|
||||
if self.num_markers != last_token:
|
||||
return False
|
||||
elif tokens[0] == "3" and tokens[1] == "2":
|
||||
self.intermarkers += 1
|
||||
|
||||
except (ValueError, IndexError):
|
||||
return False
|
||||
|
||||
return self.eof_function()
|
||||
|
||||
|
||||
class AllegroLOD(LinkageStudies):
|
||||
"""
|
||||
Allegro output format for LOD scores
|
||||
"""
|
||||
file_ext = "allegro_fparam"
|
||||
|
||||
def header_check(self, fio):
|
||||
header = fio.readline().splitlines()[0].split()
|
||||
if len(header) == 4 and header == [
|
||||
"family", "location", "LOD", "marker"
|
||||
]:
|
||||
return True
|
||||
|
||||
return False
|
||||
|
||||
def sniff(self, filename):
|
||||
"""
|
||||
>>> classname = AllegroLOD
|
||||
>>> from galaxy.datatypes.sniff import get_test_fname
|
||||
>>> extn_true = classname().file_ext
|
||||
>>> file_true = get_test_fname("linkstudies." + extn_true)
|
||||
>>> classname().sniff(file_true)
|
||||
True
|
||||
|
||||
>>> false_files = list(LinkageStudies.test_files)
|
||||
>>> false_files.remove("linkstudies." + extn_true)
|
||||
>>> result_true = []
|
||||
>>> for fname in false_files:
|
||||
... file_false = get_test_fname(fname)
|
||||
... res = classname().sniff(file_false)
|
||||
... if res:
|
||||
... result_true.append(fname)
|
||||
>>>
|
||||
>>> result_true
|
||||
[]
|
||||
"""
|
||||
with open(filename, "r") as fio:
|
||||
|
||||
if not self.header_check(fio):
|
||||
return False
|
||||
|
||||
for lcount, line in enumerate(fio):
|
||||
if lcount > self.max_lines:
|
||||
return True
|
||||
|
||||
tokens = line.split()
|
||||
|
||||
try:
|
||||
int(tokens[0])
|
||||
float(tokens[1])
|
||||
|
||||
if tokens[2] != "-inf":
|
||||
float(tokens[2])
|
||||
|
||||
except (ValueError, IndexError):
|
||||
return False
|
||||
|
||||
return True
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
import doctest
|
||||
doctest.testmod(sys.modules[__name__])
|
||||
|
||||
@@ -0,0 +1,100 @@
|
||||
family location LOD marker
|
||||
1 0.000 -inf rs9617264
|
||||
1 0.180 -5.9958 rs5746647
|
||||
1 0.233 -inf rs5747988
|
||||
1 2.123 -9.4599 rs4819979
|
||||
1 2.198 -5.2942 rs4266110
|
||||
1 2.253 -5.0474 rs5748981
|
||||
1 2.358 -4.9631 rs12483926
|
||||
1 2.539 -inf rs17807605
|
||||
1 2.685 -inf rs5749001
|
||||
1 2.741 -5.4371 rs5749010
|
||||
1 2.851 -5.1217 rs4819994
|
||||
1 2.906 -5.1123 rs9617982
|
||||
1 2.996 -5.2452 rs9619055
|
||||
1 3.101 -inf rs361626
|
||||
1 3.232 -5.3301 rs5994287
|
||||
1 3.293 -inf rs9604737
|
||||
1 3.451 -8.1586 rs5747087
|
||||
1 3.507 -24.9936 rs7286310
|
||||
1 3.557 -inf rs2189077
|
||||
1 3.609 -8.2376 rs5747183
|
||||
1 3.861 -11.0094 rs174293
|
||||
1 3.927 -inf rs1296805
|
||||
1 4.024 -inf rs5992746
|
||||
1 4.086 -9.0399 rs3747023
|
||||
1 4.138 -inf rs5747339
|
||||
1 4.232 -inf rs5747351
|
||||
1 4.375 -inf rs443627
|
||||
1 4.524 -inf rs389496
|
||||
1 4.586 -inf rs5992854
|
||||
1 4.649 -inf rs2587115
|
||||
1 4.702 -inf rs5992126
|
||||
1 4.753 -inf rs443983
|
||||
1 4.972 -inf rs390495
|
||||
1 5.041 -inf rs462904
|
||||
1 5.187 -22.4923 rs5992985
|
||||
1 5.279 -inf rs462055
|
||||
1 5.358 -7.3545 rs362043
|
||||
1 5.441 -6.9638 rs2540620
|
||||
1 6.072 -inf rs2543958
|
||||
1 6.158 -11.2824 rs418623
|
||||
1 6.219 -6.9834 rs759406
|
||||
1 6.293 -6.9610 rs5747950
|
||||
1 6.360 -7.0468 rs5993463
|
||||
1 6.471 -11.2945 rs737923
|
||||
1 21.656 -17.9844 rs2187966
|
||||
1 22.016 -8.9528 rs9624813
|
||||
1 22.162 -inf rs742030
|
||||
1 22.221 -inf rs1467387
|
||||
1 22.334 -8.9315 rs542162
|
||||
1 22.457 -inf rs12627968
|
||||
1 22.551 -inf rs133885
|
||||
1 22.633 -25.6794 rs713816
|
||||
1 22.688 -inf rs6004774
|
||||
1 22.756 -inf rs2301492
|
||||
1 22.911 -inf rs2157538
|
||||
1 23.108 -8.8047 rs8137311
|
||||
1 23.211 -inf rs1013815
|
||||
1 23.322 -inf rs4820663
|
||||
1 23.395 -inf rs9620577
|
||||
1 23.624 -7.6981 rs8136102
|
||||
1 23.760 -inf rs12628683
|
||||
1 23.908 -inf rs5752264
|
||||
1 24.053 -inf rs134760
|
||||
1 24.111 -10.3274 rs2331215
|
||||
1 24.164 -inf rs667270
|
||||
1 24.240 -9.4447 rs8138440
|
||||
1 24.318 -inf rs633132
|
||||
1 24.393 -7.3251 rs4822702
|
||||
1 24.515 -7.1150 rs5761487
|
||||
1 24.608 -inf rs1941126
|
||||
1 24.856 -7.2865 rs600878
|
||||
1 24.946 -22.4631 rs134157
|
||||
1 25.003 -inf rs9613212
|
||||
1 25.054 -11.5789 rs2071862
|
||||
1 25.106 -inf rs4822768
|
||||
1 25.215 -14.0176 rs2001121
|
||||
1 25.420 -8.4477 rs6005159
|
||||
1 25.492 -8.6606 rs4820706
|
||||
1 25.622 -inf rs4822791
|
||||
1 25.865 -inf rs1476033
|
||||
1 25.997 -inf rs6005189
|
||||
1 26.105 -8.1743 rs5761777
|
||||
1 26.193 -8.0074 rs5761805
|
||||
1 26.372 -8.2580 rs6005232
|
||||
1 26.447 -inf rs7290832
|
||||
1 26.674 -20.6108 rs6005254
|
||||
1 26.803 -18.5282 rs2516082
|
||||
1 26.906 -inf rs6005266
|
||||
1 27.050 -inf rs4418
|
||||
1 27.198 -inf rs79037
|
||||
1 27.268 -inf rs5761937
|
||||
1 27.358 -inf rs5761957
|
||||
1 27.483 -inf rs134949
|
||||
1 37.021 -inf rs5749711
|
||||
1 37.135 -10.6102 rs242990
|
||||
1 37.204 -10.3303 rs12485116
|
||||
1 37.277 -inf rs5999265
|
||||
1 37.363 -inf rs5755038
|
||||
1 37.474 -inf rs9621951
|
||||
@@ -0,0 +1,80 @@
|
||||
Name 206007 2060011 206004 2060010 2060016 2060012 2060017 2060013 206008 206001 206002 206
|
||||
rs3094315 AA AB AB AA AA AB AA AB AA AB AA
|
||||
rs2073813 BB AB AB BB BB AB BB AB BB AB BB
|
||||
rs2905040 BB BB BB BB BB BB BB BB BB BB BB
|
||||
rs12124819 AA AA AA AB AB AA AB AB BB AB AB
|
||||
rs2980314 BB BB BB BB BB BB BB BB BB BB BB
|
||||
rs6684487 BB BB BB BB BB BB BB BB BB BB BB
|
||||
rs4245756 BB BB BB BB BB BB BB BB BB BB BB
|
||||
rs12086311 BB BB BB BB BB BB BB BB BB BB BB
|
||||
rs13303077 BB BB BB BB BB BB BB BB BB BB BB
|
||||
rs28625089 BB BB BB BB BB BB BB BB BB BB BB
|
||||
rs4475691 BB BB BB BB BB BB BB BB BB BB BB
|
||||
rs28587382 BB BB BB BB BB BB BB BB BB BB BB
|
||||
rs13303029 BB BB BB BB BB BB BB BB BB BB BB
|
||||
rs2340589 BB BB BB BB BB BB BB BB BB BB BB
|
||||
rs28576697 AA AB BB AA AA AB AA AB AA AB AB
|
||||
rs1110052 AA AB BB AA AA AB AA AB AA AB AB
|
||||
rs7523549 BB BB BB AB BB BB BB BB AB AB BB
|
||||
rs2272756 BB AB AA BB BB AB BB AB BB AB AB
|
||||
rs28711536 BB BB BB BB BB BB BB BB BB BB BB
|
||||
rs13303010 AA AA AA AB AA AA AA AA AB AB AA
|
||||
rs3935066 AA AA AA AB AA AA AA AA AB AB AA
|
||||
rs13302925 BB BB BB BB BB BB BB BB BB BB BB
|
||||
rs13303355 BB BB BB BB BB BB BB BB BB BB BB
|
||||
rs6693747 AB AB AA BB AB AB AB AB AB AB AA
|
||||
rs9777703 AA AA AA AA AA AA AA AA AA AA AA
|
||||
rs9697457 BB BB BB BB BB BB BB BB BB BB BB
|
||||
rs28360890 BB BB BB BB BB BB BB BB BB BB BB
|
||||
rs3128117 AB AB BB AB AB AB AB AB BB BB BB
|
||||
rs28446115 BB BB BB BB BB BB BB BB BB BB BB
|
||||
rs28555183 BB BB BB BB BB BB BB BB BB BB BB
|
||||
rs4970393 AB AB BB AB AB AB AB AB BB BB BB
|
||||
rs4970349 AB AB BB AB AB AB AB AB BB BB BB
|
||||
rs17160776 BB BB BB BB BB BB BB BB BB BB BB
|
||||
rs2245754 AA AA AB AA AB AA AB AB AB AB AB
|
||||
rs7526076 AB AB AA AB AB AB AB AB AA AA AA
|
||||
rs3934834 BB BB BB BB AB BB AB BB BB BB BB
|
||||
rs3766191 BB BB BB BB AB BB AB BB BB BB BB
|
||||
rs9442372 AB AB AA AB AA AB AA AB AA AA AA
|
||||
rs3737728 AB AB AA AB AB AB AB AB AA AA AA
|
||||
rs10907178 AA AA AA AA AB AA AB AA AA AA AA
|
||||
rs6687776 BB AB AB BB AB AB AB BB BB BB AB
|
||||
rs11579015 AA AA AA AA AA AA AA AA AA AA AA
|
||||
rs6671356 AA AA AA AA AB AA AB AA AA AA AA
|
||||
rs11811175 BB BB BB BB BB BB BB BB BB BB BB
|
||||
rs4970405 AA AA AA AA AA AA AA AA AA AA AA
|
||||
rs1105065 BB BB BB BB AB BB AB BB BB BB BB
|
||||
rs7540009 BB BB BB BB AB BB AB BB BB BB BB
|
||||
rs10907182 AB AB AB AB AA AB AA AB AA AB AA
|
||||
rs12737205 BB BB BB BB AB BB AB BB BB BB BB
|
||||
rs11579425 AB BB BB AB AB BB AB BB AA AB AB
|
||||
rs4970416 BB BB BB BB BB BB BB BB BB BB BB
|
||||
rs4970362 AB BB BB BB BB BB BB AB BB BB BB
|
||||
rs9660710 BB BB BB BB BB BB BB AB BB BB BB
|
||||
rs4442317 AA BB AB AA AA BB AA AB AA AA AB
|
||||
rs12092254 BB BB AB BB AB BB AB AB BB AB BB
|
||||
rs6668667 BB BB BB BB AB BB AB BB BB BB BB
|
||||
rs3813204 BB AB AB BB BB AB BB AB BB AB BB
|
||||
rs4314833 AA AB AB AA AA AB AA AB AA AB AA
|
||||
rs12060422 AB BB BB AB AB BB AB BB BB BB BB
|
||||
rs9729550 AB AB AB AB AB AB AB AB AA AB AA
|
||||
rs11466681 BB BB BB BB BB BB BB BB BB BB BB
|
||||
rs34945898 BB BB BB BB BB BB BB BB BB BB BB
|
||||
rs12036216 AB BB BB BB AB BB AB BB BB BB BB
|
||||
rs3813199 AB BB BB BB AB BB AB BB BB BB BB
|
||||
rs11260562 BB BB BB BB BB BB BB BB BB BB BB
|
||||
rs7528416 AB AA AA AA AB AA AB AA AA AA AA
|
||||
rs715643 BB BB BB BB BB BB BB BB BB BB BB
|
||||
rs12093154 AB BB BB BB AB BB AB BB BB BB BB
|
||||
rs6692115 NC NC NC NC NC NC NC NC NC NC NC
|
||||
rs7524470 AA AA AA AA AA AA AA AA AA AA AA
|
||||
rs6704013 BB BB BB BB BB BB BB BB BB BB BB
|
||||
rs4018608 AA AB AB AA AA AB AA AA AA AA AB
|
||||
rs12073590 AA AA AA AA AA AA AA AA AA AA AA
|
||||
rs6689813 AA AB AB AA AA AB AA AA AA AA AB
|
||||
rs34778240 BB BB BB BB BB BB BB BB BB BB BB
|
||||
rs12077700 BB AB AB BB BB AB BB BB BB BB AB
|
||||
rs1749951 BB BB BB BB BB BB BB BB BB BB BB
|
||||
rs11586188 BB BB BB BB BB BB BB BB BB BB BB
|
||||
rs35573647 BB BB BB BB BB BB BB BB BB BB BB
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,50 @@
|
||||
#Chr Genpos Marker Physpos Nr
|
||||
21 0.70496629 rs1296971 13609442 1
|
||||
21 0.77494263 rs468601 13769165 2
|
||||
21 0.85010932 rs2821973 13899316 3
|
||||
21 1.01291458 rs1929150 14051249 4
|
||||
21 1.07552959 rs2822124 14088675 5
|
||||
21 1.16577144 rs2775054 14121682 6
|
||||
21 1.34457997 rs7276618 14197852 7
|
||||
21 1.44169062 rs392812 14252347 8
|
||||
21 1.60661592 rs2822368 14311592 9
|
||||
21 1.73090413 rs6516610 14385827 10
|
||||
21 1.78470487 rs447455 14502698 11
|
||||
21 1.89865013 rs437521 14513560 12
|
||||
21 1.95928889 rs2822554 14585162 13
|
||||
21 2.00968909 rs2822572 14618073 14
|
||||
21 2.09569547 rs13050350 14653413 15
|
||||
21 2.14611500 rs2142236 14748155 16
|
||||
21 2.30459845 rs2822677 14767432 17
|
||||
21 2.35507107 rs2822696 14783326 18
|
||||
21 2.49458320 rs376635 14788185 19
|
||||
21 2.54981913 rs2822765 14843387 20
|
||||
21 2.69205997 rs2822780 14875052 21
|
||||
21 2.74542953 rs465340 14884525 22
|
||||
21 2.80926447 rs1888398 14981052 23
|
||||
21 2.86888387 rs458052 15013563 24
|
||||
21 2.93942924 rs2822907 15057767 25
|
||||
21 2.99612354 rs8129531 15061195 26
|
||||
21 3.15050759 rs12053660 15067326 27
|
||||
21 3.48398239 rs1883003 15147347 28
|
||||
21 3.62725156 rs2822974 15185311 29
|
||||
21 3.69755891 rs11088231 15247441 30
|
||||
21 3.83233721 rs2205239 15365789 31
|
||||
21 4.03050303 rs2823045 15382630 32
|
||||
21 4.11519240 rs926164 15435118 33
|
||||
21 4.17500340 rs2823139 15498654 34
|
||||
21 4.22973041 rs2823161 15515055 35
|
||||
21 4.31848934 rs2823194 15568649 36
|
||||
21 4.53372425 rs2049882 15633372 37
|
||||
21 4.62105207 rs1736148 15735083 38
|
||||
21 4.80636119 rs2823301 15780469 39
|
||||
21 4.88644465 rs6517467 15806025 40
|
||||
21 4.96357163 rs2064051 15860950 41
|
||||
21 5.04209154 rs9974915 15879012 42
|
||||
21 5.09648993 rs2823400 15922925 43
|
||||
21 5.28044978 rs726634 15952748 44
|
||||
21 5.33607360 rs7283707 16048865 45
|
||||
21 5.52020653 rs7283161 16247081 46
|
||||
21 5.60568022 rs9982633 16341775 47
|
||||
21 5.70676016 rs2823621 16453860 48
|
||||
21 5.81125072 rs2051347 16485140 49
|
||||
@@ -111,8 +111,6 @@ def paste_app_factory(global_conf, **kwargs):
|
||||
webapp.add_client_route('/tours/{tour_id}')
|
||||
webapp.add_client_route('/user')
|
||||
webapp.add_client_route('/user/{form_id}')
|
||||
webapp.add_client_route('/workflow')
|
||||
webapp.add_client_route('/workflows/list_published')
|
||||
webapp.add_client_route('/visualizations/list_published')
|
||||
webapp.add_client_route('/visualizations/list')
|
||||
webapp.add_client_route('/visualizations/edit')
|
||||
@@ -130,8 +128,11 @@ def paste_app_factory(global_conf, **kwargs):
|
||||
webapp.add_client_route('/datasets/list')
|
||||
webapp.add_client_route('/datasets/edit')
|
||||
webapp.add_client_route('/datasets/error')
|
||||
webapp.add_client_route('/workflow/run')
|
||||
webapp.add_client_route('/workflow/import_workflow')
|
||||
webapp.add_client_route('/workflows/list')
|
||||
webapp.add_client_route('/workflows/list_published')
|
||||
webapp.add_client_route('/workflows/create')
|
||||
webapp.add_client_route('/workflows/run')
|
||||
webapp.add_client_route('/workflows/import_workflow')
|
||||
webapp.add_client_route('/custom_builds')
|
||||
|
||||
# ==== Done
|
||||
|
||||
@@ -33,11 +33,9 @@ from galaxy.web.base.controller import (
|
||||
SharableMixin,
|
||||
UsesStoredWorkflowMixin
|
||||
)
|
||||
from galaxy.web.framework.formbuilder import form
|
||||
from galaxy.web.framework.helpers import (
|
||||
grids,
|
||||
time_ago,
|
||||
to_unicode
|
||||
)
|
||||
from galaxy.workflow.extract import (
|
||||
extract_workflow,
|
||||
@@ -385,28 +383,7 @@ class WorkflowController(BaseUIController, SharableMixin, UsesStoredWorkflowMixi
|
||||
# Redirect to load galaxy frames.
|
||||
return trans.show_ok_message(
|
||||
message="""Workflow "%s" has been imported. <br>You can <a href="%s">start using this workflow</a> or %s."""
|
||||
% (stored.name, web.url_for(controller='workflow'), referer_message), use_panels=True)
|
||||
|
||||
@web.expose
|
||||
@web.require_login("use Galaxy workflows")
|
||||
def rename(self, trans, id, new_name=None, **kwargs):
|
||||
stored = self.get_stored_workflow(trans, id)
|
||||
if new_name is not None:
|
||||
san_new_name = sanitize_html(new_name)
|
||||
stored.name = san_new_name
|
||||
stored.latest_workflow.name = san_new_name
|
||||
trans.sa_session.flush()
|
||||
message = 'Workflow renamed to: %s' % escape(san_new_name)
|
||||
trans.set_message(message)
|
||||
# Take care of proxy prefix in url as well
|
||||
redirect_url = url_for('/') + 'workflow?status=done&message=%s' % escape(message)
|
||||
return trans.response.send_redirect(redirect_url)
|
||||
else:
|
||||
return form(url_for(controller='workflow', action='rename', id=trans.security.encode_id(stored.id)),
|
||||
"Rename workflow",
|
||||
submit_text="Rename",
|
||||
use_panels=True) \
|
||||
.add_text("new_name", "Workflow Name", value=to_unicode(stored.name))
|
||||
% (stored.name, web.url_for('/workflows/list'), referer_message))
|
||||
|
||||
@web.expose
|
||||
@web.require_login("use Galaxy workflows")
|
||||
@@ -537,14 +514,26 @@ class WorkflowController(BaseUIController, SharableMixin, UsesStoredWorkflowMixi
|
||||
return_url = url_for('/') + 'workflow?status=done&message=%s' % escape(message)
|
||||
trans.response.send_redirect(return_url)
|
||||
|
||||
@web.expose
|
||||
@web.require_login("create workflows")
|
||||
def create(self, trans, workflow_name=None, workflow_annotation=""):
|
||||
"""
|
||||
Create a new stored workflow with name `workflow_name`.
|
||||
"""
|
||||
user = trans.get_user()
|
||||
if workflow_name is not None:
|
||||
@web.expose_api
|
||||
def create(self, trans, payload=None, **kwd):
|
||||
if trans.request.method == 'GET':
|
||||
return {
|
||||
'title' : 'Create Workflow',
|
||||
'inputs' : [{
|
||||
'name' : 'workflow_name',
|
||||
'label' : 'Name',
|
||||
'value' : 'Unnamed workflow'
|
||||
}, {
|
||||
'name' : 'workflow_annotation',
|
||||
'label' : 'Annotation',
|
||||
'help' : 'A description of the workflow; annotation is shown alongside shared or published workflows.'
|
||||
}]}
|
||||
else:
|
||||
user = trans.get_user()
|
||||
workflow_name = payload.get('workflow_name')
|
||||
workflow_annotation = payload.get('workflow_annotation')
|
||||
if not workflow_name:
|
||||
return self.message_exception(trans, 'Please provide a workflow name.')
|
||||
# Create the new stored workflow
|
||||
stored_workflow = model.StoredWorkflow()
|
||||
stored_workflow.name = workflow_name
|
||||
@@ -562,14 +551,7 @@ class WorkflowController(BaseUIController, SharableMixin, UsesStoredWorkflowMixi
|
||||
session = trans.sa_session
|
||||
session.add(stored_workflow)
|
||||
session.flush()
|
||||
return self.editor(trans, id=trans.security.encode_id(stored_workflow.id))
|
||||
else:
|
||||
return form(url_for(controller="workflow", action="create"), "Create New Workflow", submit_text="Create", use_panels=True) \
|
||||
.add_text("workflow_name", "Workflow Name", value="Unnamed workflow") \
|
||||
.add_text("workflow_annotation",
|
||||
"Workflow Annotation",
|
||||
value="",
|
||||
help="A description of the workflow; annotation is shown alongside shared or published workflows.")
|
||||
return {'id': trans.security.encode_id(stored_workflow.id), 'message': 'Workflow %s has been created.' % workflow_name}
|
||||
|
||||
@web.json
|
||||
def save_workflow_as(self, trans, workflow_name, workflow_data, workflow_annotation=""):
|
||||
@@ -922,12 +904,12 @@ class WorkflowController(BaseUIController, SharableMixin, UsesStoredWorkflowMixi
|
||||
id=repository_id,
|
||||
message=message,
|
||||
status=status))
|
||||
redirect_url = url_for('/') + 'workflow?status=' + status + '&message=%s' % escape(message)
|
||||
redirect_url = url_for('/') + 'workflows/list?status=' + status + '&message=%s' % escape(message)
|
||||
return trans.response.send_redirect(redirect_url)
|
||||
if cntrller == 'api':
|
||||
return status, message
|
||||
if status == 'error':
|
||||
redirect_url = url_for('/') + 'workflow?status=' + status + '&message=%s' % escape(message)
|
||||
redirect_url = url_for('/') + 'workflows/list?status=' + status + '&message=%s' % escape(message)
|
||||
return trans.response.send_redirect(redirect_url)
|
||||
else:
|
||||
return {
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
|
||||
{"version":3,"sources":["mvc/citation/citation-model.js"],"names":["bibtexParse","Citation","Backbone","Model","extend","_baseMvc2","default","LoggableMixin","_logNamespace","defaults","content","initialize","parsed","toJSON","this","attributes","err","log","_fields","entry","_","first","rawFields","entryTags","key","value","lowerKey","toLowerCase","entryType","undefined","fields","Collection","partial","model","HistoryCitationCollection","BaseCitationCollection","url","ToolCitationCollection","urlRoot","tool_id"],"mappings":"qKAAYA,oNAWRC,EAAWC,SAASC,MAAMC,OAAOC,EAAAC,QAAQC,eAAeH,QACxDI,cAPe,WASfC,UACIC,QAAS,IAGbC,WAAY,WACR,IAAIC,EACJ,IAEIA,EAASZ,EAAYa,OAAOC,KAAKC,WAAWL,SAC9C,MAAOM,GACLF,KAAKG,IAAI,yBAA2BD,GAKxC,GAFAF,KAAKI,WACLJ,KAAKK,MAAQC,EAAEC,MAAMT,GACjBE,KAAKK,MAAO,CACZ,IAAIG,EAAYR,KAAKK,MAAMI,UAC3B,IAAK,IAAIC,KAAOF,EAAW,CACvB,IAAIG,EAAQH,EAAUE,GAClBE,EAAWF,EAAIG,cA9BnCb,KAAAI,QAAAQ,GAAAD,KAIAG,UAAA,WAgCQ,OAAOd,KAAKK,MAAQL,KAAKK,MAAMS,eAAYC,GAE/CC,OAAQ,WA9BR7B,OAAAA,KAAWC,WAOXS,EAAYT,SAAA6B,WAAW3B,OAAAC,EAAAC,QAAAC,eAAAH,QACnBI,cAdW,WAiBPI,QAAAA,OAAAA,KAAAA,MACHoB,SAHD,EAIIC,MAAAhC,IAGJiC,EAAAC,EAAA/B,QAEAgC,IAAA,WACI,OAAAtB,KAAIQ,QAAJ,cAA2BC,KAAAA,WAA3B,gBAIIc,EAAKnB,EAALd,QAEPgC,IAAA,WACJ,OA1B8DtB,KAAAwB,QA0B9D,UA1B8DxB,KAAAyB,QA0B9D,cAEGP,SAAA,eAqCJ/B,SAAUA,EA9BdiC,0BAAAA,EACAG,uBAAAA","file":"../../../scripts/mvc/citation/citation-model.js","sourcesContent":["import * as bibtexParse from \"libs/bibtexParse\";\nimport baseMVC from \"mvc/base-mvc\";\n\n/* global Backbone */\n\nvar logNamespace = \"citation\";\n//==============================================================================\n/** @class model for tool citations.\n * @name Citation\n * @augments Backbone.Model\n */\nvar Citation = Backbone.Model.extend(baseMVC.LoggableMixin).extend({\n _logNamespace: logNamespace,\n\n defaults: {\n content: \"\"\n },\n\n initialize: function() {\n var parsed;\n try {\n // TODO: to model.parse/.validate\n parsed = bibtexParse.toJSON(this.attributes.content);\n } catch (err) {\n this.log(\"Error parsing bibtex: \" + err);\n }\n\n this._fields = {};\n this.entry = _.first(parsed);\n if (this.entry) {\n var rawFields = this.entry.entryTags;\n for (var key in rawFields) {\n var value = rawFields[key];\n var lowerKey = key.toLowerCase();\n this._fields[lowerKey] = value;\n }\n }\n },\n entryType: function() {\n return this.entry ? this.entry.entryType : undefined;\n },\n fields: function() {\n return this._fields;\n }\n});\n\n//==============================================================================\n/** @class Backbone collection of citations.\n */\nvar BaseCitationCollection = Backbone.Collection.extend(baseMVC.LoggableMixin).extend({\n _logNamespace: logNamespace,\n\n /** root api url */\n urlRoot: `${Galaxy.root}api`,\n partial: true, // Assume some tools in history/workflow may not be properly annotated yet.\n model: Citation\n});\n\nvar HistoryCitationCollection = BaseCitationCollection.extend({\n /** complete api url */\n url: function() {\n return `${this.urlRoot}/histories/${this.history_id}/citations`;\n }\n});\n\nvar ToolCitationCollection = BaseCitationCollection.extend({\n /** complete api url */\n url: function() {\n return `${this.urlRoot}/tools/${this.tool_id}/citations`;\n },\n partial: false // If a tool has citations, assume they are complete.\n});\n\n//==============================================================================\n\nexport default {\n Citation: Citation,\n HistoryCitationCollection: HistoryCitationCollection,\n ToolCitationCollection: ToolCitationCollection\n};\n"]}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
|
||||
{"version":3,"sources":["mvc/user/user_api_keys.js"],"names":["mod_toastr","UserAPIKeysView","Backbone","View","extend","initialize","options","timeOut","this","setElement","render","self","url","Galaxy","root","$el","empty","append","_template","fetchUsers","$","getJSON","users","setTimeout","applyVue","_vue2","default","el","methods","generateKey","id","success","_data","error"],"mappings":"8MACYA,6JAERC,EAAkBC,SAASC,KAAKC,QAChCC,WAAY,WACRL,EAAWM,QAAQC,QAAU,IAC7BC,KAAKC,WAAW,UAChBD,KAAKE,UAGTA,OAAQ,WACJ,IAAIC,EAAOH,KACPI,EAAMC,OAAOC,KAAO,sBACxBH,EAAKI,IAAIC,QAAQC,OAAON,EAAKO,aAC7BP,EAAKQ,WAAWP,IAIpBO,WAAY,SAASP,GACjB,IAAID,EAAOH,KACXY,EAAEC,QAAQT,EAAK,SAASU,GAIpBC,WAAW,WACPZ,EAAKa,SAASF,QAM1BE,SAAU,SAASF,GACA,IAAAG,EAAAC,SACXC,GAAI,iBA9BZ1B,MACAI,MAAYiB,GAERM,SAHmCC,YAAA,SAAAC,GAqCvB,IAAInB,EAAOH,KA7BnBG,EAAAA,MACME,IAAOC,OAAOA,KAAA,2BACfE,MAAQC,IAAON,GACnBQ,QAAL,SAAAG,GAXmCtB,EAAA+B,QAAA,qCAcvCpB,EAAAqB,MAAAV,MAAAA,GAEeW,MAAX,WACejC,EAASsB,QAAO,4CAQlCJ,UAzBsC,WAyDnC,MA9BJ,0jBA2DCjB","file":"../../../scripts/mvc/user/user_api_keys.js","sourcesContent":["import Vue from \"libs/vue\";\nimport * as mod_toastr from \"libs/toastr\";\n\nvar UserAPIKeysView = Backbone.View.extend({\n initialize: function() {\n mod_toastr.options.timeOut = 1000;\n this.setElement(\"<div/>\");\n this.render();\n },\n\n render: function() {\n var self = this,\n url = Galaxy.root + \"userskeys/all_users\";\n self.$el.empty().append(self._template());\n self.fetchUsers(url);\n },\n\n /** Load users and their keys */\n fetchUsers: function(url) {\n var self = this;\n $.getJSON(url, function(users) {\n // apply vue model on the dom\n // timeout is used to ensure dom is created first and then\n // vue model is applied with the required data\n setTimeout(function() {\n self.applyVue(users);\n });\n });\n },\n\n /** Create model for the view using vue */\n applyVue: function(users) {\n var form_vue = new Vue({\n el: \"#form-userkeys\",\n data: {\n users: users // data model\n },\n methods: {\n // bind event from view\n generateKey: function(id) {\n var self = this;\n // fetch fresh model\n $.ajax({\n url: Galaxy.root + \"userskeys/admin_api_keys\",\n data: { uid: id },\n success: function(users) {\n mod_toastr.success(\"Successfully generated a user key\");\n // refresh the model\n self._data.users = users;\n },\n error: function() {\n mod_toastr.success(\"Error occured while loading data\");\n }\n });\n }\n }\n });\n },\n\n _template: function() {\n return (\n '<div id=\"form-userkeys\" class=\"toolForm\" v-cloak>' +\n '<div class=\"toolFormTitle\">User Information</div>' +\n '<div v-if=\"users && users.length > 0\">' +\n '<table class=\"grid\">' +\n \"<thead><th>Encoded UID</th><th>Email</th><th>API Key</th><th>Actions</th></thead>\" +\n \"<tbody>\" +\n '<tr v-for=\"user in users\">' +\n \"<td>\" +\n \"{{ user.uid }}\" +\n \"</td>\" +\n \"<td>\" +\n \"{{ user.email }}\" +\n \"</td>\" +\n \"<td>\" +\n \"{{ user.key }}\" +\n \"</td>\" +\n \"<td>\" +\n '<input type=\"button\" value=\"Generate a new key now\" v-on:click=\"generateKey( user.uid )\" />' +\n \"</td>\" +\n \"</tbody>\" +\n \"</table>\" +\n \"</div>\" +\n \"<div v-else>\" +\n \"<div>No informations available</div>\" +\n \"</div>\" +\n '<div style=\"clear: both\"></div>' +\n \"</div>\"\n );\n }\n});\n\nexport default UserAPIKeysView;\n"]}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
define("mvc/form/form-wrapper",["exports","mvc/form/form-view","mvc/ui/ui-misc"],function(e,t,s){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(e,"__esModule",{value:!0});var a=i(t),n=i(s),o=Backbone.View.extend({initialize:function(e){this.model=new Backbone.Model(e),this.url=this.model.get("url"),this.redirect=this.model.get("redirect"),this.setElement("<div/>"),this.render()},render:function(){var e=this;$.ajax({url:Galaxy.root+this.url,type:"GET"}).done(function(t){var s=$.extend({},e.model.attributes,t),i=new a.default({title:s.title,message:s.message,status:s.status||"warning",icon:s.icon,inputs:s.inputs,buttons:{submit:new n.default.Button({tooltip:s.submit_tooltip,title:s.submit_title||"Save",icon:s.submit_icon||"fa-save",cls:"btn btn-primary ui-clear-float",onclick:function(){e._submit(i)}})}});e.$el.empty().append(i.$el)}).fail(function(t){e.$el.empty().append(new n.default.Message({message:"Failed to load resource "+e.url+".",status:"danger",persistent:!0}).$el)})},_submit:function(e){var t=this;$.ajax({url:Galaxy.root+t.url,data:JSON.stringify(e.data.create()),type:"PUT",contentType:"application/json"}).done(function(s){var i={message:s.message,status:"success",persistent:!1};t.redirect?window.location=Galaxy.root+t.redirect+"?"+$.param(i):(e.data.matchModel(s,function(t,s){e.field_list[s].value(t.value)}),t._showMessage(e,i))}).fail(function(s){t._showMessage(e,{message:s.responseJSON.err_msg,status:"danger",persistent:!1})})},_showMessage:function(e,t){e.$el.parents().filter(function(){return-1!=["auto","scroll"].indexOf($(this).css("overflow"))}).first().animate({scrollTop:0},500),e.message.update(t)}});e.default={View:o}});
|
||||
define("mvc/form/form-wrapper",["exports","mvc/form/form-view","mvc/ui/ui-misc"],function(e,t,s){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(e,"__esModule",{value:!0});var a=i(t),n=i(s),o=Backbone.View.extend({initialize:function(e){this.model=new Backbone.Model(e),this.url=this.model.get("url"),this.redirect=this.model.get("redirect"),this.setElement("<div/>"),this.render()},render:function(){var e=this;$.ajax({url:Galaxy.root+this.url,type:"GET"}).done(function(t){var s=$.extend({},e.model.attributes,t),i=new a.default({title:s.title,message:s.message,status:s.status||"warning",icon:s.icon,inputs:s.inputs,buttons:{submit:new n.default.Button({tooltip:s.submit_tooltip,title:s.submit_title||"Save",icon:s.submit_icon||"fa-save",cls:"btn btn-primary ui-clear-float",onclick:function(){e._submit(i)}})}});e.$el.empty().append(i.$el)}).fail(function(t){e.$el.empty().append(new n.default.Message({message:"Failed to load resource "+e.url+".",status:"danger",persistent:!0}).$el)})},_submit:function(e){var t=this;$.ajax({url:Galaxy.root+t.url,data:JSON.stringify(e.data.create()),type:"PUT",contentType:"application/json"}).done(function(s){var i={};s.id?i.id=s.id:i={message:s.message,status:"success",persistent:!1},t.redirect?window.location=Galaxy.root+t.redirect+"?"+$.param(i):(e.data.matchModel(s,function(t,s){e.field_list[s].value(t.value)}),t._showMessage(e,success_message))}).fail(function(s){t._showMessage(e,{message:s.responseJSON.err_msg,status:"danger",persistent:!1})})},_showMessage:function(e,t){e.$el.parents().filter(function(){return-1!=["auto","scroll"].indexOf($(this).css("overflow"))}).first().animate({scrollTop:0},500),e.message.update(t)}});e.default={View:o}});
|
||||
@@ -1 +1 @@
|
||||
define("mvc/tag",["exports","mvc/base-mvc","utils/localization"],function(t,e,i){"use strict";function s(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(t,"__esModule",{value:!0});var n=s(e),a=s(i),o=Backbone.View.extend(n.default.LoggableMixin).extend(n.default.HiddenUntilActivatedViewMixin).extend({tagName:"div",className:"tags-display",select_width:"100%",events:{},initialize:function(t){this.show_editor=!1,!1===t.usePrompt?this.label="":this.label='<label class="prompt">'+(0,a.default)("Tags")+"</label>",this.workflow_mode=t.workflow_mode||!1,this.workflow_mode&&(this.events.click="showEditor",this.events.keydown="keydownHandler"),this.hiddenUntilActivated(t.$activator,t)},render:function(){var t=this;return this.workflow_mode?this.$el.html(this._workflowTemplate()):this.$el.html(this._defaultTemplate()),this.$input().select2({placeholder:"Add tags",width:this.workflow_mode?this.width:this.select_width,tags:function(){return t._getTagsUsed()}}),this._setUpBehaviors(),this},_hashToName:function(t){return t.startsWith("#")?"name:"+t.slice(1):t},_nameToHash:function(t){return t.startsWith("name:")&&(t="#"+t.slice(5)),t},_defaultTemplate:function(){return[this.label,this._renderEditor()].join("")},_workflowTemplate:function(){return[this.show_editor?this._renderEditor():this._renderTags()].join(" ")},keydownHandler:function(t){switch(t.which){case 27:this.hideEditor()}},showEditor:function(){this.show_editor=!0,this.render()},hideEditor:function(){this.show_editor=!1,this.render()},_renderEditor:function(){return'<input class="tags-input" value="'+this.tagsToCSV()+'"/>'},_renderTags:function(){var t=this.model.get("tags"),e=[];return _.each(t,function(t){var i='<span class="label label-info">'+(t=0==t.indexOf("name:")?t.slice(5):t)+"</span>";e.push(i)}),0===e.length&&e.push('<img src=static/images/fugue/tag--plus.png class="add-tag-button" title="Add tags"/>'),e.join(" ")},tagsToCSV:function(){var t=this,e=this.model.get("tags");return!_.isArray(e)||_.isEmpty(e)?"":e.map(function(e){return _.escape(t._nameToHash(e))}).sort().join(",")},$input:function(){return this.$el.find("input.tags-input")},_getTagsUsed:function(){var t=this;return _.map(Galaxy.user.get("tags_used"),t._nameToHash)},_setUpBehaviors:function(){var t=this;this.$input().on("change",function(e){e.val=_.map(e.val,t._hashToName),t.model.save({tags:e.val}),e.added&&t._addNewTagToTagsUsed(""+e.added.text)})},_addNewTagToTagsUsed:function(t){var e=Galaxy.user.get("tags_used");_.contains(e,t)||(e.push(t),e.sort(),Galaxy.user.set("tags_used",e))},remove:function(){this.$input.off(),this.stopListening(this.model),Backbone.View.prototype.remove.call(this)},toString:function(){return["TagsEditor(",""+this.model,")"].join("")}});t.default={TagsEditor:o}});
|
||||
define("mvc/tag",["exports","mvc/base-mvc","utils/localization"],function(t,e,i){"use strict";function s(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(t,"__esModule",{value:!0});var a=s(e),n=s(i),o=Backbone.View.extend(a.default.LoggableMixin).extend(a.default.HiddenUntilActivatedViewMixin).extend({tagName:"div",className:"tags-display",select_width:"100%",events:{},initialize:function(t){this.show_editor=!1,!1===t.usePrompt?this.label="":this.label='<label class="prompt">'+(0,n.default)("Tags")+"</label>",this.workflow_mode=t.workflow_mode||!1,this.workflow_mode&&(this.events.click="showEditor",this.events.keydown="keydownHandler"),this.hiddenUntilActivated(t.$activator,t)},render:function(){var t=this;return this.workflow_mode?this.$el.html(this._workflowTemplate()):this.$el.html(this._defaultTemplate()),this.$input().select2({placeholder:"Add tags",width:this.workflow_mode?this.width:this.select_width,tags:function(){return t._getTagsUsed()}}),this._setUpBehaviors(),this},_hashToName:function(t){return t.startsWith("#")?"name:"+t.slice(1):t},_nameToHash:function(t){return t.startsWith("name:")&&(t="#"+t.slice(5)),t},_defaultTemplate:function(){return[this.label,this._renderEditor()].join("")},_workflowTemplate:function(){return[this.show_editor?this._renderEditor():this._renderTags()].join(" ")},keydownHandler:function(t){switch(t.which){case 27:this.hideEditor()}},showEditor:function(){this.show_editor=!0,this.render()},hideEditor:function(){this.show_editor=!1,this.render()},_renderEditor:function(){return'<input class="tags-input" value="'+this.tagsToCSV()+'"/>'},_renderTags:function(){var t=this.model.get("tags"),e=Galaxy.root+"static/images/fugue/tag--plus.png",i=[];return _.each(t,function(t){var e='<span class="label label-info">'+(t=0==t.indexOf("name:")?t.slice(5):t)+"</span>";i.push(e)}),0===i.length&&i.push("<img src="+e+' class="add-tag-button" title="Add tags"/>'),i.join(" ")},tagsToCSV:function(){var t=this,e=this.model.get("tags");return!_.isArray(e)||_.isEmpty(e)?"":e.map(function(e){return _.escape(t._nameToHash(e))}).sort().join(",")},$input:function(){return this.$el.find("input.tags-input")},_getTagsUsed:function(){var t=this;return _.map(Galaxy.user.get("tags_used"),t._nameToHash)},_setUpBehaviors:function(){var t=this;this.$input().on("change",function(e){e.val=_.map(e.val,t._hashToName),t.model.save({tags:e.val}),e.added&&t._addNewTagToTagsUsed(""+e.added.text)})},_addNewTagToTagsUsed:function(t){var e=Galaxy.user.get("tags_used");_.contains(e,t)||(e.push(t),e.sort(),Galaxy.user.set("tags_used",e))},remove:function(){this.$input.off(),this.stopListening(this.model),Backbone.View.prototype.remove.call(this)},toString:function(){return["TagsEditor(",""+this.model,")"].join("")}});t.default={TagsEditor:o}});
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -24,6 +24,7 @@ class WorkflowEditorTestCase(SeleniumTestCase):
|
||||
@selenium_test
|
||||
def test_data_input(self):
|
||||
self.workflow_create_new()
|
||||
self.sleep_for(self.wait_types.UX_TRANSITION)
|
||||
menu = self.wait_for_selector(".toolMenu")
|
||||
self.sleep_for(self.wait_types.UX_RENDER)
|
||||
inputs_section = menu.find_element_by_css_selector("#title___workflow__inputs__")
|
||||
@@ -86,18 +87,13 @@ steps:
|
||||
def workflow_create_new(self, name=None, annotation=None):
|
||||
self.workflow_index_open()
|
||||
self.click_button_new_workflow()
|
||||
|
||||
form_element = self.driver.find_element_by_css_selector("#center form")
|
||||
action = form_element.get_attribute("action")
|
||||
assert action.endswith("/workflow/create"), action
|
||||
|
||||
form_element = self.driver.find_element_by_id("submit")
|
||||
name = name or self._get_random_name()
|
||||
annotation = annotation or self._get_random_name()
|
||||
self.fill(form_element, {
|
||||
'workflow_name': name,
|
||||
'workflow_annotation': annotation,
|
||||
})
|
||||
self.click_submit(form_element)
|
||||
inputs = self.driver.find_elements_by_class_name("ui-input")
|
||||
inputs[0].send_keys(name)
|
||||
inputs[1].send_keys(annotation)
|
||||
form_element.click()
|
||||
|
||||
@retry_assertion_during_transitions
|
||||
def assert_modal_has_text(self, expected_text):
|
||||
|
||||
@@ -392,7 +392,7 @@ class ShedTwillTestCase(TwillTestCase):
|
||||
self.check_for_strings(strings_displayed, strings_not_displayed)
|
||||
|
||||
def display_all_workflows(self, strings_displayed=None, strings_not_displayed=None):
|
||||
url = '/workflow'
|
||||
url = '/workflows/list'
|
||||
self.visit_galaxy_url(url)
|
||||
self.check_for_strings(strings_displayed, strings_not_displayed)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user