Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gga_load_data
Manage
Activity
Members
Labels
Plan
Issues
12
Issue boards
Milestones
Wiki
Code
Merge requests
5
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
abims
e-infra
gga_load_data
Commits
e3684af9
Commit
e3684af9
authored
4 years ago
by
Arthur Le Bars
Browse files
Options
Downloads
Patches
Plain Diff
Delete toolrunner.py
parent
881397a2
No related branches found
No related tags found
1 merge request
!1
Release 1.0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
toolrunner.py
+0
-153
0 additions, 153 deletions
toolrunner.py
with
0 additions
and
153 deletions
toolrunner.py
deleted
100644 → 0
+
0
−
153
View file @
881397a2
from
bioblend
import
galaxy
from
bioblend.galaxy
import
GalaxyInstance
import
os
"""
Methods to run all Chado and Tripal tools on galaxy
"""
class
ToolRunner
:
def
__init__
(
self
,
parameters_dict
,
instance
,
history
):
self
.
history
=
history
self
.
instance
=
instance
self
.
parameters_dict
=
parameters_dict
self
.
genus
=
parameters_dict
[
"
genus
"
]
self
.
species
=
parameters_dict
[
"
species
"
]
self
.
strain
=
parameters_dict
[
"
strain
"
]
self
.
common
=
parameters_dict
[
"
common
"
]
self
.
performed
=
parameters_dict
[
"
performed by
"
]
self
.
genome_version
=
parameters_dict
[
"
genome version
"
]
self
.
ogs_version
=
parameters_dict
[
"
ogs version
"
]
self
.
sex
=
parameters_dict
[
"
sex
"
]
self
.
date
=
parameters_dict
[
"
date
"
]
self
.
custom_ga_file
=
None
self
.
custom_ga_file_path
=
None
self
.
preset_ga_file
=
None
self
.
analysis
=
None
self
.
organism
=
None
self
.
program
=
None
if
self
.
strain
!=
""
:
self
.
abbr
=
self
.
genus
[
0
].
lower
()
+
"
_
"
+
self
.
species
+
"
_
"
+
self
.
strain
self
.
full
=
"
_
"
.
join
([
self
.
genus
,
self
.
species
,
self
.
strain
,
self
.
sex
])
else
:
self
.
abbr
=
self
.
genus
[
0
].
lower
()
+
"
_
"
+
self
.
species
self
.
full
=
"
_
"
.
join
([
self
.
genus
,
self
.
species
,
self
.
strain
,
self
.
sex
])
self
.
ogs
=
str
(
"
OGS
"
+
self
.
ogs_version
)
self
.
genome
=
str
(
self
.
full
+
"
genome v
"
+
self
.
genome_version
)
def
show_tool
(
self
,
tool_id
):
print
(
self
.
instance
.
tools
.
show_tool
(
tool_id
=
tool_id
,
io_details
=
True
))
return
self
.
instance
.
tools
.
show_tool
(
tool_id
=
tool_id
,
io_details
=
True
)
def
purge_organism
(
self
):
self
.
show_tool
(
tool_id
=
"
toolshed.g2.bx.psu.edu/repos/gga/chado_organism_delete_organisms/organism_delete_organisms/2.3.2
"
)
self
.
instance
.
tools
.
run_tool
(
tool_id
=
"
toolshed.g2.bx.psu.edu/repos/gga/chado_organism_delete_organisms/organism_delete_organisms/2.3.2
"
,
history_id
=
self
.
history
,
tool_inputs
=
{
"
name
"
:
self
.
organism
})
def
purge_analyses
(
self
):
return
None
def
get_organism
(
self
):
"""
Tool invocation must be as return (or else it executes but returns nothing when called)
:return:
"""
return
self
.
instance
.
tools
.
run_tool
(
tool_id
=
"
toolshed.g2.bx.psu.edu/repos/gga/chado_organism_get_organisms/organism_get_organisms/2.3.2
"
,
history_id
=
self
.
history
,
tool_inputs
=
{
"
genus
"
:
self
.
genus
,
"
species
"
:
self
.
species
})
def
get_ogs_analysis
(
self
):
"""
Tool invocation must be as return (or else it executes but returns nothing when called)
:return:
"""
return
self
.
instance
.
tools
.
run_tool
(
tool_id
=
"
toolshed.g2.bx.psu.edu/repos/gga/chado_analysis_get_analyses/analysis_get_analyses/2.3.2
"
,
history_id
=
self
.
history
,
tool_inputs
=
{
"
name
"
:
self
.
genus
+
"
"
+
self
.
species
+
"
OGS
"
+
self
.
ogs_version
})
def
get_genome_analysis
(
self
):
"""
Tool invocation must be as return (or else it executes but returns nothing when called)
:return:
"""
return
self
.
instance
.
tools
.
run_tool
(
tool_id
=
"
toolshed.g2.bx.psu.edu/repos/gga/chado_analysis_get_analyses/analysis_get_analyses/2.3.2
"
,
history_id
=
self
.
history
,
tool_inputs
=
{
"
name
"
:
self
.
genus
+
"
"
+
self
.
species
+
"
genome v
"
+
self
.
genome_version
})
def
add_organism
(
self
):
"""
Tool invocation must be as return (or else it executes but returns nothing when called)
:return:
"""
return
self
.
instance
.
tools
.
run_tool
(
tool_id
=
"
toolshed.g2.bx.psu.edu/repos/gga/chado_organism_add_organism/organism_add_organism/2.3.2
"
,
history_id
=
self
.
history
,
tool_inputs
=
{
"
abbr
"
:
self
.
abbr
,
"
genus
"
:
self
.
genus
,
"
species
"
:
self
.
species
,
"
common
"
:
self
.
common
})
def
add_ogs
(
self
):
"""
Tool invocation must be as return (or else it executes but returns nothing when called)
:return:
"""
return
self
.
instance
.
tools
.
run_tool
(
tool_id
=
"
toolshed.g2.bx.psu.edu/repos/gga/chado_analysis_add_analysis/analysis_add_analysis/2.3.2
"
,
history_id
=
self
.
history
,
tool_inputs
=
{
"
name
"
:
self
.
genus
+
"
"
+
self
.
species
+
"
OGS
"
+
self
.
ogs_version
,
"
program
"
:
"
Performed by Genoscope
"
,
"
programversion
"
:
str
(
"
OGS
"
+
self
.
genome_version
),
"
sourcename
"
:
"
Genoscope
"
,
"
date_executed
"
:
self
.
date
})
def
add_genome
(
self
):
"""
Tool invocation must be as return (or else it executes but returns nothing when called)
:return:
"""
return
self
.
instance
.
tools
.
run_tool
(
tool_id
=
"
toolshed.g2.bx.psu.edu/repos/gga/chado_analysis_add_analysis/analysis_add_analysis/2.3.2
"
,
history_id
=
self
.
history
,
tool_inputs
=
{
"
name
"
:
self
.
genus
+
"
"
+
self
.
species
+
"
genome v
"
+
self
.
genome_version
,
"
program
"
:
"
Performed by Genoscope
"
,
"
programversion
"
:
str
(
"
genome v
"
+
self
.
genome_version
),
"
sourcename
"
:
"
Genoscope
"
,
"
date_executed
"
:
self
.
date
})
def
add_jbrowse
(
self
,
datasets
):
return
self
.
instance
.
tools
.
run_tool
(
tool_id
=
"
toolshed.g2.bx.psu.edu/repos/iuc/jbrowse/jbrowse/1.16.5+galaxy7
"
,
history_id
=
self
.
history
,
tool_inputs
=
{
"
genomes
"
:
datasets
[
"
genome_file
"
]})
def
add_organism_jbrowse
(
self
):
return
self
.
instance
.
tools
.
run_tool
(
tool_id
=
"
toolshed.g2.bx.psu.edu/repos/gga/jbrowse_to_container/jbrowse_to_container/0.5.1
"
,
history_id
=
self
.
history
,
tool_inputs
=
{
"
multiple
"
:
"
false
"
,
"
name
"
:
"
foo
"
,
"
unique_id
"
:
"
bar
"
})
# Homo sapiens deletion TODO: concat the 2 calls
def
get_sapiens_id
(
self
):
"""
Tool invocation must be as return (or else it executes but returns nothing when called)
:return:
"""
return
self
.
instance
.
tools
.
run_tool
(
tool_id
=
"
toolshed.g2.bx.psu.edu/repos/gga/chado_organism_get_organisms/organism_get_organisms/2.3.2
"
,
history_id
=
self
.
history
,
tool_inputs
=
{
"
genus
"
:
"
Homo
"
,
"
species
"
:
"
species
"
})
def
delete_sapiens
(
self
,
hs_id
):
"""
Tool invocation must be as return (or else it executes but returns nothing when called)
:return:
"""
return
self
.
instance
.
tools
.
run_tool
(
tool_id
=
"
toolshed.g2.bx.psu.edu/repos/gga/chado_organism_delete_organisms/organism_delete_organisms/2.3.2
"
,
history_id
=
self
.
history
,
tool_inputs
=
{
"
organism
"
:
str
(
hs_id
)})
def
show_pannel
(
self
):
print
(
self
.
instance
.
tools
.
get_tool_panel
())
return
self
.
instance
.
tools
.
get_tool_panel
()
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment