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
5e0fb690
Commit
5e0fb690
authored
3 years ago
by
Loraine Gueguen
Browse files
Options
Downloads
Patches
Plain Diff
fix Object-oriented galaxy instance (for get_previews())
parent
62a4ee33
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!10
Release 2.0
,
!9
Release 2.0 (merge dev to master)
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
gga_load_data.py
+10
-3
10 additions, 3 deletions
gga_load_data.py
with
10 additions
and
3 deletions
gga_load_data.py
+
10
−
3
View file @
5e0fb690
...
@@ -11,6 +11,7 @@ import json
...
@@ -11,6 +11,7 @@ import json
import
yaml
import
yaml
from
bioblend
import
galaxy
from
bioblend
import
galaxy
from
bioblend.galaxy.objects
import
GalaxyInstance
import
utilities
import
utilities
import
speciesData
import
speciesData
...
@@ -100,7 +101,7 @@ class LoadData(speciesData.SpeciesData):
...
@@ -100,7 +101,7 @@ class LoadData(speciesData.SpeciesData):
return
histories
return
histories
def
setup_library
(
self
,
instance
):
def
setup_library
(
self
,
instance
,
data_dir_root
=
'
./src_data
'
):
"""
"""
Create a
"
Project Data
"
library in galaxy, mirroring the
"
src_data
"
folder of the current organism
Create a
"
Project Data
"
library in galaxy, mirroring the
"
src_data
"
folder of the current organism
directory tree
directory tree
...
@@ -110,10 +111,16 @@ class LoadData(speciesData.SpeciesData):
...
@@ -110,10 +111,16 @@ class LoadData(speciesData.SpeciesData):
self
.
goto_species_dir
()
self
.
goto_species_dir
()
gio
=
GalaxyInstance
(
url
=
self
.
instance_url
,
email
=
self
.
config
[
"
galaxy_default_admin_email
"
],
password
=
self
.
config
[
"
galaxy_default_admin_password
"
]
)
logging
.
info
(
"
Looking for project data in %s
"
%
data_dir_root
)
folders
=
dict
()
folders
=
dict
()
post_renaming
=
{}
post_renaming
=
{}
for
root
,
dirs
,
files
in
os
.
walk
(
"
./src_data
"
,
followlinks
=
True
):
for
root
,
dirs
,
files
in
os
.
walk
(
data_dir_root
,
followlinks
=
True
):
file_list
=
[
os
.
path
.
join
(
root
,
filename
)
for
filename
in
files
]
file_list
=
[
os
.
path
.
join
(
root
,
filename
)
for
filename
in
files
]
folders
[
root
]
=
file_list
folders
[
root
]
=
file_list
...
@@ -132,7 +139,7 @@ class LoadData(speciesData.SpeciesData):
...
@@ -132,7 +139,7 @@ class LoadData(speciesData.SpeciesData):
for
fname
,
files
in
folders
.
items
():
for
fname
,
files
in
folders
.
items
():
if
fname
and
files
:
if
fname
and
files
:
folder_name
=
fname
[
len
(
"
./src_data
"
)
+
1
:]
folder_name
=
fname
[
len
(
data_dir_root
)
+
1
:]
logging
.
info
(
"
Creating folder: %s
"
%
folder_name
)
logging
.
info
(
"
Creating folder: %s
"
%
folder_name
)
folder
=
self
.
create_deep_folder
(
prj_lib
,
folder_name
)
folder
=
self
.
create_deep_folder
(
prj_lib
,
folder_name
)
...
...
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