Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
sra
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
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
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
UNLOCK
sra
Commits
8635d28a
Commit
8635d28a
authored
3 years ago
by
Jasper Koehorst
Browse files
Options
Downloads
Patches
Plain Diff
fixed metadata field issues
parent
2b2923a6
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
study_creator.py
+11
-11
11 additions, 11 deletions
study_creator.py
with
11 additions
and
11 deletions
study_creator.py
+
11
−
11
View file @
8635d28a
...
...
@@ -164,7 +164,7 @@ def setup_study(content):
if
type
(
organization
[
'
Contact
'
])
==
list
:
print
(
"
MULTIPLE CONTACTS DETECTED... -.-
"
)
print
(
organization
[
'
Contact
'
])
study
[
'
e
mail
'
]
=
organization
[
'
Contact
'
][
'
@email
'
]
study
[
'
E
mail
address
'
]
=
organization
[
'
Contact
'
][
'
@email
'
]
# organization['Contact']['@sec_email']
if
'
Name
'
in
organization
[
'
Contact
'
]:
...
...
@@ -189,11 +189,11 @@ def setup_study(content):
study_object
=
content
[
'
STUDY
'
]
study
[
'
Study identifier
'
]
=
study_object
[
'
@accession
'
]
study
[
'
alias
'
]
=
study_object
[
'
@alias
'
]
study
[
'
Study
T
itle
'
]
=
study_object
[
'
DESCRIPTOR
'
][
'
STUDY_TITLE
'
]
study
[
'
Study
t
itle
'
]
=
study_object
[
'
DESCRIPTOR
'
][
'
STUDY_TITLE
'
]
if
'
STUDY_ABSTRACT
'
in
study_object
[
'
DESCRIPTOR
'
]:
study
[
'
Study
D
escription
'
]
=
study_object
[
'
DESCRIPTOR
'
][
'
STUDY_ABSTRACT
'
]
study
[
'
Study
d
escription
'
]
=
study_object
[
'
DESCRIPTOR
'
][
'
STUDY_ABSTRACT
'
]
else
:
study
[
'
Study
D
escription
'
]
=
"
No study description available for
"
+
study_object
[
'
@accession
'
]
study
[
'
Study
d
escription
'
]
=
"
No study description available for
"
+
study_object
[
'
@accession
'
]
if
'
STUDY_TYPE
'
in
study_object
[
'
DESCRIPTOR
'
]:
study
[
'
type
'
]
=
study_object
[
'
DESCRIPTOR
'
][
'
STUDY_TYPE
'
][
'
@existing_study_type
'
]
...
...
@@ -218,11 +218,11 @@ def setup_observation_unit(content):
observation_unit
[
'
Study identifier
'
]
=
experiment
[
'
STUDY_REF
'
][
'
@accession
'
]
if
"
TITLE
"
in
sample
:
observation_unit
[
'
Observational description
'
]
=
sample
[
'
TITLE
'
]
observation_unit
[
'
Observational name
'
]
=
sample
[
'
TITLE
'
]
observation_unit
[
'
Observational
unit
description
'
]
=
sample
[
'
TITLE
'
]
observation_unit
[
'
Observational
unit
name
'
]
=
sample
[
'
TITLE
'
]
else
:
observation_unit
[
'
Observational description
'
]
=
'
Automatic OU title from SRA
'
+
sample
[
'
@accession
'
]
observation_unit
[
'
Observational name
'
]
=
'
Automatic OU title from SRA
'
+
sample
[
'
@accession
'
]
observation_unit
[
'
Observational
unit
description
'
]
=
'
Automatic OU title from SRA
'
+
sample
[
'
@accession
'
]
observation_unit
[
'
Observational
unit
name
'
]
=
'
Automatic OU title from SRA
'
+
sample
[
'
@accession
'
]
return
observation_unit
...
...
@@ -246,10 +246,10 @@ def setup_sample(content):
# TODO check which name is used in the end
if
"
TITLE
"
in
sample_object
:
sample
[
'
Sample title
'
]
=
sample_object
[
'
TITLE
'
]
sample
[
'
S
ample name
'
]
=
sample_object
[
'
TITLE
'
]
sample
[
'
s
ample name
'
]
=
sample_object
[
'
TITLE
'
]
else
:
sample
[
'
Sample title
'
]
=
'
Automatic sample title from SRA
'
+
sample
[
'
Sample identifier
'
]
sample
[
'
S
ample name
'
]
=
'
Automatic sample title from SRA
'
+
sample
[
'
Sample identifier
'
]
sample
[
'
s
ample name
'
]
=
'
Automatic sample title from SRA
'
+
sample
[
'
Sample identifier
'
]
sample
[
'
NCBI taxonomy ID
'
]
=
sample_object
[
'
SAMPLE_NAME
'
][
'
TAXON_ID
'
]
...
...
@@ -331,7 +331,7 @@ def setup_assay(content):
assay
[
'
Library layout
'
]
=
list
(
dict
(
library
[
'
LIBRARY_LAYOUT
'
]).
keys
())
# Machine
assay
[
'
Instument model
'
]
=
content
[
'
EXPERIMENT
'
][
'
PLATFORM
'
][
'
ILLUMINA
'
][
'
INSTRUMENT_MODEL
'
]
assay
[
'
Inst
r
ument model
'
]
=
content
[
'
EXPERIMENT
'
][
'
PLATFORM
'
][
'
ILLUMINA
'
][
'
INSTRUMENT_MODEL
'
]
if
'
ILLUMINA
'
in
content
[
'
EXPERIMENT
'
][
'
PLATFORM
'
]:
assay
[
'
Platform
'
]
=
'
Illumina
'
...
...
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