Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openbis
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sispub
openbis
Commits
5a7cb166
Commit
5a7cb166
authored
11 years ago
by
barillac
Browse files
Options
Downloads
Patches
Plain Diff
modified to account for missing labels in xml template file
SVN: 30344
parent
4e8c3ceb
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
plasmid/source/drop-boxes/ylab-dropbox/xml_import-Yeasts-dropbox-plasmidParents-v2.py
+68
-45
68 additions, 45 deletions
...ab-dropbox/xml_import-Yeasts-dropbox-plasmidParents-v2.py
with
68 additions
and
45 deletions
plasmid/source/drop-boxes/ylab-dropbox/xml_import-Yeasts-dropbox-plasmidParents-v2.py
+
68
−
45
View file @
5a7cb166
...
...
@@ -143,43 +143,64 @@ def process(transaction):
else
:
node
.
text
=
""
for
path
in
[
'
./Yeast_Parents
'
]:
node
=
tree
.
find
(
path
)
if
node
.
text
!=
""
:
yeast_parents
=
node
.
text
else
:
node
.
text
=
""
yeast_parents_found
=
False
for
child
in
root
.
getchildren
():
if
child
.
tag
==
'
Yeast_Parents
'
:
pombe_parents_found
=
True
for
path
in
[
'
./Yeast_Parents
'
]:
node
=
tree
.
find
(
path
)
if
node
.
text
!=
""
:
yeast_parents
=
node
.
text
else
:
node
.
text
=
""
if
not
yeast_parents_found
:
yeast_parents
=
None
plasmids
=
""
def
Plasmids
():
for
path
in
[
'
./Plasmids
'
]:
node
=
tree
.
find
(
path
)
if
node
.
text
is
not
None
:
plasmids
=
node
.
text
relationship_list
=
[]
annotation_list
=
[]
plasmids_list
=
[]
tokens
=
plasmids
.
split
(
'
,
'
)
for
token
in
tokens
:
print
"
token
"
,
token
if
re
.
search
(
'
:
'
,
token
):
token
=
token
.
split
(
'
:
'
)
plasmid_name
=
token
[
0
][:
-
4
]
plasmid_relationship
=
token
[
0
][
-
3
:]
plasmid_annotation
=
token
[
1
][:
-
1
]
plasmids_list
.
append
(
plasmid_name
)
relationship_list
.
append
(
plasmid_relationship
)
annotation_list
.
append
(
plasmid_annotation
)
else
:
plasmid_name
=
token
plasmid_relationship
=
""
plasmid_annotation
=
""
plasmids_list
.
append
(
plasmid_name
)
relationship_list
.
append
(
plasmid_relationship
)
annotation_list
.
append
(
plasmid_annotation
)
else
:
plasmids_found
=
False
for
child
in
root
.
getchildren
():
if
child
.
tag
==
'
Plasmids
'
:
plasmids_found
=
True
def
Plasmids
():
for
path
in
[
'
./Plasmids
'
]:
node
=
tree
.
find
(
path
)
if
node
.
text
is
not
None
:
plasmids
=
node
.
text
relationship_list
=
[]
annotation_list
=
[]
plasmids_list
=
[]
tokens
=
plasmids
.
split
(
'
,
'
)
for
token
in
tokens
:
if
re
.
search
(
'
:
'
,
token
):
token
=
token
.
split
(
'
:
'
)
plasmid_name
=
token
[
0
][:
-
4
]
plasmid_relationship
=
token
[
0
][
-
3
:]
plasmid_annotation
=
token
[
1
][:
-
1
]
plasmids_list
.
append
(
plasmid_name
)
relationship_list
.
append
(
plasmid_relationship
)
annotation_list
.
append
(
plasmid_annotation
)
else
:
plasmid_name
=
token
plasmid_relationship
=
""
plasmid_annotation
=
""
plasmids_list
.
append
(
plasmid_name
)
relationship_list
.
append
(
plasmid_relationship
)
annotation_list
.
append
(
plasmid_annotation
)
else
:
plasmids
=
None
plasmid_name
=
None
plasmid_relationship
=
None
plasmid_annotation
=
None
plasmids_list
=
None
relationship_list
=
None
annotation_list
=
None
return
plasmids
,
plasmids_list
,
relationship_list
,
annotation_list
Plasmids
()
plasmids
=
Plasmids
()[
0
]
if
not
plasmids_found
:
plasmids
=
None
plasmid_name
=
None
plasmid_relationship
=
None
...
...
@@ -188,19 +209,21 @@ def process(transaction):
relationship_list
=
None
annotation_list
=
None
return
plasmids
,
plasmids_list
,
relationship_list
,
annotation_list
Plasmids
()
plasmids
=
Plasmids
()[
0
]
for
path
in
[
'
./XMLCOMMENTS
'
]:
node
=
tree
.
find
(
path
)
if
node
.
text
is
not
None
:
comment_text_list
=
node
.
text
else
:
comment_text_list
=
None
xmlcomments_found
=
False
for
child
in
root
.
getchildren
():
if
child
.
tag
==
'
XMLCOMMENTS
'
:
xmlcomments_found
=
True
for
path
in
[
'
./XMLCOMMENTS
'
]:
node
=
tree
.
find
(
path
)
if
node
.
text
is
not
None
:
comment_text_list
=
node
.
text
else
:
comment_text_list
=
None
if
not
xmlcomments_found
:
comment_text_list
=
None
elementFactory
=
ElementFactory
()
...
...
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