Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
autoassembly
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
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
Aflitos, Saulo Alves
autoassembly
Commits
cddbd280
Commit
cddbd280
authored
12 years ago
by
Aflitos, Saulo Alves
Browse files
Options
Downloads
Patches
Plain Diff
2012-10-25_00_55_01_02_00 :: 1 :: M => 1
parent
933c8956
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
pipeline/progs/Quake/bin/quake.py
+83
-56
83 additions, 56 deletions
pipeline/progs/Quake/bin/quake.py
with
83 additions
and
56 deletions
pipeline/progs/Quake/bin/quake.py
+
83
−
56
View file @
cddbd280
...
...
@@ -530,74 +530,101 @@ def runAnalysis(setup):
if
key
==
'
data
'
:
continue
print
'
%s :: correcting :: %-16s: %s
'
%
(
listFileName
,
key
,
setup
[
key
]
)
resp
=
[]
if
model_gc
:
# run correct C++ code
listFileNameCmd
=
"
-f
"
if
readsf
:
listFileNameCmd
=
"
-r
"
listFileNameCmd
+=
listFileName
#cmd = '%s/correct %s %s -m %s -a cutoffs.gc.txt -q %d' % (quake_dir, correct_options, listFileNameCmd, ctsf, quality_scale)
cmd
=
'
%s/correct %s %s -m %s -a cutoffs.gc.txt -q %d
'
%
(
'
/home/assembly/bin/Quake/bin
'
,
correct_options
,
listFileNameCmd
,
ctsf
,
quality_scale
)
allOk
=
True
nfo
=
data
[
listFileName
]
if
nfo
is
not
None
:
#data[newListFileName][fileTmpPath].append( [ outFile, dstFile ] )
for
fileTmpPath
in
nfo
:
for
outFiles
in
nfo
[
fileTmpPath
]:
tmpFile
,
dstFile
,
compulsory
=
outFiles
if
compulsory
:
if
not
os
.
path
.
exists
(
dstFile
):
allOk
=
False
print
"
%s :: correcting :: %s
"
%
(
listFileName
,
cmd
)
if
os
.
path
.
exists
(
dstFile
+
'
.ok
'
):
allOk
=
False
p
=
subprocess
.
Popen
(
cmd
,
shell
=
True
)
pid
,
status
=
os
.
waitpid
(
p
.
pid
,
0
)
print
"
%s :: correcting :: finished %d
"
%
(
listFileName
,
status
)
resp
=
[
data
,
listFileName
,
status
]
if
allOk
:
print
'
%s :: correcting :: %-16s: %s : !! already corrected. skipping !!
'
%
(
listFileName
,
key
,
setup
[
key
]
)
return
[
data
,
listFileName
,
0
]
else
:
listFileNameCmd
=
"
-f
"
if
readsf
:
listFileNameCmd
=
"
-r
"
listFileNameCmd
+=
listFileName
# run correct C++ code
#cmd = '%s/correct %s %s -q %d -b bithash.bh' % (quake_dir, correct_options, listFileNameCmd, quality_scale)
cmd
=
'
%s/correct %s %s -b bithash.bh -q %d
'
%
(
'
/home/assembly/bin/Quake/bin
'
,
correct_options
,
listFileNameCmd
,
quality_scale
)
print
"
%s :: correcting :: %s
"
%
(
listFileName
,
cmd
)
p
=
subprocess
.
Popen
(
cmd
,
stdout
=
sys
.
stdout
,
stderr
=
sys
.
stderr
,
shell
=
True
)
pid
,
status
=
os
.
waitpid
(
p
.
pid
,
0
)
#pid, status = 123, 0
print
"
%s :: correcting :: finished %d
"
%
(
listFileName
,
status
)
resp
=
[
data
,
listFileName
,
status
]
resp
=
[]
if
model_gc
:
# run correct C++ code
listFileNameCmd
=
"
-f
"
if
readsf
:
listFileNameCmd
=
"
-r
"
listFileNameCmd
+=
listFileName
#cmd = '%s/correct %s %s -m %s -a cutoffs.gc.txt -q %d' % (quake_dir, correct_options, listFileNameCmd, ctsf, quality_scale)
cmd
=
'
%s/correct %s %s -m %s -a cutoffs.gc.txt -q %d
'
%
(
'
/home/assembly/bin/Quake/bin
'
,
correct_options
,
listFileNameCmd
,
ctsf
,
quality_scale
)
print
"
%s :: correcting :: %s
"
%
(
listFileName
,
cmd
)
p
=
subprocess
.
Popen
(
cmd
,
shell
=
True
)
pid
,
status
=
os
.
waitpid
(
p
.
pid
,
0
)
data
,
listFileName
,
response
=
resp
print
"
%s :: correcting :: finished %d
"
%
(
listFileName
,
status
)
resp
=
[
data
,
listFileName
,
status
]
print
'
%s :: callback :: response (%d)
'
%
(
listFileName
,
response
)
else
:
listFileNameCmd
=
"
-f
"
if
readsf
:
listFileNameCmd
=
"
-r
"
listFileNameCmd
+=
listFileName
# run correct C++ code
#cmd = '%s/correct %s %s -q %d -b bithash.bh' % (quake_dir, correct_options, listFileNameCmd, quality_scale)
cmd
=
'
%s/correct %s %s -b bithash.bh -q %d
'
%
(
'
/home/assembly/bin/Quake/bin
'
,
correct_options
,
listFileNameCmd
,
quality_scale
)
print
"
%s :: correcting :: %s
"
%
(
listFileName
,
cmd
)
p
=
subprocess
.
Popen
(
cmd
,
stdout
=
sys
.
stdout
,
stderr
=
sys
.
stderr
,
shell
=
True
)
pid
,
status
=
os
.
waitpid
(
p
.
pid
,
0
)
#pid, status = 123, 0
print
"
%s :: correcting :: finished %d
"
%
(
listFileName
,
status
)
resp
=
[
data
,
listFileName
,
status
]
data
,
listFileName
,
response
=
resp
print
'
%s :: callback :: response (%d)
'
%
(
listFileName
,
response
)
if
response
!=
0
:
print
"
%s :: callback :: finished with value %d
"
%
(
listFileName
,
response
)
#sys.exit(response)
return
resp
nfo
=
data
[
listFileName
]
if
nfo
is
not
None
:
#data[newListFileName][fileTmpPath].append( [ outFile, dstFile ] )
for
fileTmpPath
in
nfo
:
for
outFiles
in
nfo
[
fileTmpPath
]:
tmpFile
,
dstFile
,
compulsory
=
outFiles
if
compulsory
:
if
not
os
.
path
.
exists
(
tmpFile
):
print
"
did not create tmp file: %s
"
%
tmpFile
print
"
creating dummy
"
with
open
(
tmpFile
,
'
w
'
)
as
t
:
t
.
write
(
'
@dummy
\n
'
)
t
.
write
(
'
N
\n
'
)
t
.
write
(
'
+dummy
\n
'
)
t
.
write
(
'
%s
\n
'
%
chr
(
quality_scale
))
if
os
.
path
.
exists
(
tmpFile
):
print
"
%s :: callback :: moving %s to %s
"
%
(
listFileName
,
tmpFile
,
dstFile
)
try
:
shutil
.
copy
(
tmpFile
,
dstFile
)
except
:
return
[
data
,
listFileName
,
333
]
with
open
(
dstFile
+
"
.ok
"
,
"
w
"
)
as
d
:
d
.
write
(
"
ok
"
)
if
response
!=
0
:
print
"
%s :: callback :: finished with value %d
"
%
(
listFileName
,
response
)
#sys.exit(response)
return
resp
nfo
=
data
[
listFileName
]
if
nfo
is
not
None
:
#data[newListFileName][fileTmpPath].append( [ outFile, dstFile ] )
for
fileTmpPath
in
nfo
:
for
outFiles
in
nfo
[
fileTmpPath
]:
tmpFile
,
dstFile
,
compulsory
=
outFiles
if
compulsory
:
if
not
os
.
path
.
exists
(
tmpFile
):
print
"
did not create tmp file: %s
"
%
tmpFile
print
"
creating dummy
"
with
open
(
tmpFile
,
'
w
'
)
as
t
:
t
.
write
(
'
@dummy
\n
'
)
t
.
write
(
'
N
\n
'
)
t
.
write
(
'
+dummy
\n
'
)
t
.
write
(
'
%s
\n
'
%
chr
(
quality_scale
))
if
os
.
path
.
exists
(
tmpFile
):
print
"
%s :: callback :: moving %s to %s
"
%
(
listFileName
,
tmpFile
,
dstFile
)
shutil
.
copy
(
tmpFile
,
dstFile
)
return
[
data
,
listFileName
,
0
]
def
preexec_function
():
signal
.
signal
(
signal
.
SIGINT
,
signal
.
SIG_IGN
)
...
...
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