Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
ORG.Asm
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
23
Issues
23
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
ORG.Asm
ORG.Asm
Commits
7a429de1
Commit
7a429de1
authored
Apr 11, 2016
by
Eric Coissac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Checks for very old format of seeds
parent
7e7c2f13
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
2 deletions
+36
-2
python/orgasm/__init__.py
python/orgasm/__init__.py
+36
-2
No files found.
python/orgasm/__init__.py
View file @
7a429de1
...
...
@@ -15,10 +15,37 @@ def getOutput(config):
@param config: a configuration object
@return: the path for the output files
'''
logger
=
config
[
'orgasm'
][
'logger'
]
dirname
=
"%s.oas"
%
config
[
'orgasm'
][
'outputfilename'
]
if
not
os
.
path
.
exists
(
dirname
):
os
.
makedirs
(
dirname
)
if
os
.
path
.
exists
(
'%s.oax'
%
config
[
'orgasm'
][
'outputfilename'
]):
if
config
[
'buildgraph'
][
'reformat'
]:
#
# Reformating outpout according to the new format
#
os
.
makedirs
(
dirname
)
for
extension
in
[
'oax'
,
'omx'
,
'gml'
,
'stats'
,
'intermediate.gml'
,
'.intermediate.oax'
]:
if
os
.
path
.
exists
(
'%s.%s'
%
(
config
[
'orgasm'
][
'outputfilename'
],
extension
)):
os
.
renames
(
'%s.%s'
%
(
config
[
'orgasm'
][
'outputfilename'
],
extension
),
'%s.oas/assembling.%s'
%
(
config
[
'orgasm'
][
'outputfilename'
],
extension
))
sys
.
exit
(
0
)
else
:
#
# Exit with an error because the format is obsolete.
#
logger
.
error
(
"The %s assembly is not stored according to new format"
%
config
[
'orgasm'
][
'outputfilename'
])
logger
.
error
(
'Run the oa buildgraph command with the --reformat option'
)
sys
.
exit
(
1
)
else
:
os
.
makedirs
(
dirname
)
return
"%s/assembling"
%
dirname
...
...
@@ -120,7 +147,7 @@ def getSeeds(index,config):
forceseeds
=
config
[
'buildgraph'
][
'forceseeds'
]
filename
=
"%s.oas/assembling.omx"
filename
=
"%s.oas/assembling.omx"
%
output
#
# Check if the seeds are not correctly placed in the oas directory
...
...
@@ -154,6 +181,13 @@ def getSeeds(index,config):
probes
=
pickle
.
load
(
fseeds
)
logger
.
info
(
"Load matches from previous run : %d probe sets restored"
%
len
(
probes
))
if
not
isinstance
(
list
(
probes
.
values
())[
0
][
0
],
dict
):
logger
.
error
(
"Too old version of probes matches that cannot be reformated"
)
logger
.
error
(
"Generate a new probe match set using the command oa seeds --seeds command"
)
logger
.
error
(
"The old unsuable seed match has been erased"
)
os
.
remove
(
filename
)
sys
.
exit
(
1
)
oldversion
=
False
for
probename
in
probes
:
s
=
probes
[
probename
][
1
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment