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
08074e9b
Commit
08074e9b
authored
3 years ago
by
Arthur Le Bars
Browse files
Options
Downloads
Patches
Plain Diff
reworked datasets and Chado IDs assignation
parent
6af39982
No related branches found
No related tags found
2 merge requests
!9
Release 2.0 (merge dev to master)
,
!5
Workflow v2
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
gga_get_data.py
+14
-8
14 additions, 8 deletions
gga_get_data.py
run_workflow_phaeoexplorer.py
+260
-273
260 additions, 273 deletions
run_workflow_phaeoexplorer.py
with
274 additions
and
281 deletions
gga_get_data.py
+
14
−
8
View file @
08074e9b
...
@@ -124,12 +124,18 @@ class GetData(speciesData.SpeciesData):
...
@@ -124,12 +124,18 @@ class GetData(speciesData.SpeciesData):
# search_excluded_datasets = ["interpro_path", "orthofinder_path", "blastp_path", "blastx_path"]
# search_excluded_datasets = ["interpro_path", "orthofinder_path", "blastp_path", "blastx_path"]
# # These datasets will not be searched if missing in the input file
# # These datasets will not be searched if missing in the input file
dataset_shortname
=
""
if
self
.
sex
is
not
None
or
self
.
sex
!=
""
:
dataset_shortname
=
self
.
genus
[
0
].
lower
()
+
"
_
"
+
self
.
species
.
lower
()
+
"
_
"
+
self
.
sex
[
0
].
lower
()
else
:
dataset_shortname
=
self
.
genus
[
0
].
lower
()
+
"
_
"
+
self
.
species
.
lower
()
# Copy datasets in the organism src_data dir tree correct folder
# Copy datasets in the organism src_data dir tree correct folder
for
k
,
v
in
datasets_to_get
.
items
():
for
k
,
v
in
datasets_to_get
.
items
():
if
v
:
# If dataset is not present in input file, skip copy
if
v
:
# If dataset is not present in input file, skip copy
if
k
in
genome_datasets
:
if
k
in
genome_datasets
:
logging
.
info
(
"
Copying {0} ({1}) into {2}
"
.
format
(
k
,
v
,
organism_genome_dir
))
logging
.
info
(
"
Copying {0} ({1}) into {2}
"
.
format
(
k
,
v
,
organism_genome_dir
))
genome_fname
=
"
v%s.fasta
"
%
self
.
genome_version
genome_fname
=
"
{0}_v{1}.fasta
"
.
format
(
dataset_shortname
,
self
.
genome_version
)
try
:
try
:
shutil
.
copyfile
(
os
.
path
.
abspath
(
v
),
os
.
path
.
join
(
organism_genome_dir
,
genome_fname
))
shutil
.
copyfile
(
os
.
path
.
abspath
(
v
),
os
.
path
.
join
(
organism_genome_dir
,
genome_fname
))
except
Exception
as
exc
:
except
Exception
as
exc
:
...
@@ -137,19 +143,19 @@ class GetData(speciesData.SpeciesData):
...
@@ -137,19 +143,19 @@ class GetData(speciesData.SpeciesData):
elif
k
in
annotation_datasets
:
elif
k
in
annotation_datasets
:
dataset_fname
=
""
dataset_fname
=
""
if
k
==
"
gff_path
"
:
if
k
==
"
gff_path
"
:
dataset_fname
=
"
OGS%s.gff
"
%
self
.
ogs
_version
dataset_fname
=
"
{0}_OGS{1}.gff
"
.
format
(
dataset_shortname
,
self
.
genome
_version
)
elif
k
==
"
transcripts_path
"
:
elif
k
==
"
transcripts_path
"
:
dataset_fname
=
"
OGS%s
_transcripts.fasta
"
%
self
.
ogs
_version
dataset_fname
=
"
{0}_OGS{1}
_transcripts.fasta
"
.
format
(
dataset_shortname
,
self
.
genome
_version
)
elif
k
==
"
proteins_path
"
:
elif
k
==
"
proteins_path
"
:
dataset_fname
=
"
OGS%s
_proteins.fasta
"
%
self
.
ogs
_version
dataset_fname
=
"
{0}_OGS{1}
_proteins.fasta
"
.
format
(
dataset_shortname
,
self
.
genome
_version
)
elif
k
==
"
orthofinder_path
"
:
elif
k
==
"
orthofinder_path
"
:
dataset_fname
=
"
OGS%s
_orthofinder.tsv
"
%
self
.
ogs
_version
dataset_fname
=
"
{0}_OGS{1}
_orthofinder.tsv
"
.
format
(
dataset_shortname
,
self
.
genome
_version
)
elif
k
==
"
interpro_path
"
:
elif
k
==
"
interpro_path
"
:
dataset_fname
=
"
OGS%s
_interproscan.xml
"
%
self
.
ogs
_version
dataset_fname
=
"
{0}_OGS{1}
_interproscan.xml
"
.
format
(
dataset_shortname
,
self
.
genome
_version
)
elif
k
==
"
blastp_path
"
:
elif
k
==
"
blastp_path
"
:
dataset_fname
=
"
OGS%s
_blastp.xml
"
%
self
.
ogs
_version
dataset_fname
=
"
{0}_OGS{1}
_blastp.xml
"
.
format
(
dataset_shortname
,
self
.
genome
_version
)
elif
k
==
"
blastx_path
"
:
elif
k
==
"
blastx_path
"
:
dataset_fname
=
"
OGS%s
_blastx.xml
"
%
self
.
ogs
_version
dataset_fname
=
"
{0}_OGS{1}
_blastx.xml
"
.
format
(
dataset_shortname
,
self
.
genome
_version
)
logging
.
info
(
"
Copying {0} ({1}) into {2}
"
.
format
(
k
,
v
,
organism_annotation_dir
))
logging
.
info
(
"
Copying {0} ({1}) into {2}
"
.
format
(
k
,
v
,
organism_annotation_dir
))
try
:
try
:
shutil
.
copyfile
(
os
.
path
.
abspath
(
v
),
os
.
path
.
join
(
organism_annotation_dir
,
dataset_fname
))
shutil
.
copyfile
(
os
.
path
.
abspath
(
v
),
os
.
path
.
join
(
organism_annotation_dir
,
dataset_fname
))
...
...
This diff is collapsed.
Click to expand it.
run_workflow_phaeoexplorer.py
+
260
−
273
View file @
08074e9b
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