Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gga_load_data
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
abims
e-infra
gga_load_data
Commits
c7175f83
Commit
c7175f83
authored
May 4, 2021
by
Loraine Gueguen
Browse files
Options
Downloads
Patches
Plain Diff
Keep species with best assembly in get_uniq_species_dict_list() (will be main jbrowse url).
parent
050ba27e
No related branches found
No related tags found
2 merge requests
!9
Release 2.0 (merge dev to master)
,
!6
Todo release 1.1
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
gga_init.py
+1
-0
1 addition, 0 deletions
gga_init.py
utilities.py
+15
-5
15 additions, 5 deletions
utilities.py
with
16 additions
and
5 deletions
gga_init.py
+
1
−
0
View file @
c7175f83
...
@@ -393,6 +393,7 @@ if __name__ == "__main__":
...
@@ -393,6 +393,7 @@ if __name__ == "__main__":
# Starting
# Starting
logging
.
info
(
"
gga_init.py called for %s %s
"
,
deploy_stack_for_current_organism
.
genus
,
deploy_stack_for_current_organism
.
species
)
logging
.
info
(
"
gga_init.py called for %s %s
"
,
deploy_stack_for_current_organism
.
genus
,
deploy_stack_for_current_organism
.
species
)
logging
.
debug
(
"
Jbrowse url to %s %s %s %s
"
,
deploy_stack_for_current_organism
.
genus
,
deploy_stack_for_current_organism
.
species
,
deploy_stack_for_current_organism
.
sex
,
deploy_stack_for_current_organism
.
strain
)
# Make/update directory tree
# Make/update directory tree
deploy_stack_for_current_organism
.
make_directory_tree
()
deploy_stack_for_current_organism
.
make_directory_tree
()
...
...
This diff is collapsed.
Click to expand it.
utilities.py
+
15
−
5
View file @
c7175f83
...
@@ -123,6 +123,16 @@ def get_species_history_id(instance, full_name):
...
@@ -123,6 +123,16 @@ def get_species_history_id(instance, full_name):
return
[
history_id
,
show_history
]
return
[
history_id
,
show_history
]
def
get_gspecies_string_from_sp_dict
(
sp_dict
):
gspecies
=
""
for
k
,
v
in
sp_dict
.
items
():
for
k2
,
v2
in
v
.
items
():
if
k2
==
"
genus
"
:
gspecies
=
gspecies
.
lower
()
+
v2
elif
k2
==
"
species
"
:
gspecies
=
gspecies
.
lower
()
+
"
_
"
+
v2
return
gspecies
def
get_unique_species_str_list
(
sp_dict_list
):
def
get_unique_species_str_list
(
sp_dict_list
):
"""
"""
...
@@ -165,7 +175,7 @@ def get_unique_species_dict_list(sp_dict_list):
...
@@ -165,7 +175,7 @@ def get_unique_species_dict_list(sp_dict_list):
unique_species_genus_species
=
get_unique_species_str_list
(
sp_dict_list
=
sp_dict_list
)
unique_species_genus_species
=
get_unique_species_str_list
(
sp_dict_list
=
sp_dict_list
)
for
sp
in
sp_dict_list
:
for
sp
in
sp_dict_list
:
for
gspecies
in
unique_species_genus_species
:
gspecies
=
get_gspecies_string_from_sp_dict
(
sp
)
if
gspecies
not
in
unique_species_dict
.
keys
()
or
sp
[
"
description
"
][
"
main_species
"
]
==
"
yes
"
:
if
gspecies
not
in
unique_species_dict
.
keys
()
or
sp
[
"
description
"
][
"
main_species
"
]
==
"
yes
"
:
unique_species_dict
[
gspecies
]
=
sp
unique_species_dict
[
gspecies
]
=
sp
else
:
else
:
...
...
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