Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
vidjil
vidjil
Commits
c432b581
Commit
c432b581
authored
Jun 18, 2016
by
Mikaël Salson
Browse files
pear: Remove temporary results that take lots of space.
Those files could quickly saturate disk space
parent
08eccac4
Changes
2
Hide whitespace changes
Inline
Side-by-side
server/web2py/applications/vidjil/models/task.py
View file @
c432b581
...
...
@@ -720,6 +720,9 @@ def run_pre_process(pre_process_id, sequence_file_id, clean_before=True, clean_a
log_file
.
close
()
for
l
in
open
(
out_log
):
print
l
,
# Remove data file from disk to save space (it is now saved elsewhere)
os
.
remove
(
filepath
)
if
clean_after
:
clean_cmd
=
"rm -rf "
+
out_folder
...
...
tools/pear.py
View file @
c432b581
...
...
@@ -16,6 +16,7 @@ parser.add_argument("output_file", help="output file")
parser
.
add_argument
(
"-r1"
,
"--keep_r1"
,
help
=
"keep unmerged reverse reads"
,
action
=
"store_true"
)
parser
.
add_argument
(
"-r2"
,
"--keep_r2"
,
help
=
"keep unmerged forward reads"
,
action
=
"store_true"
)
parser
.
add_argument
(
"-p"
,
"--pear-options"
,
help
=
"additional options passed to PEAR"
,
default
=
""
)
parser
.
add_argument
(
"-k"
,
"--keep"
,
help
=
"keep temporary files (may take lots of disk space in the end)"
,
action
=
'store_true'
)
args
=
parser
.
parse_args
()
...
...
@@ -43,6 +44,10 @@ try :
if
(
args
.
keep_r2
):
with
open
(
f_out
+
'.unassembled.forward.fastq'
,
'rb'
)
as
f3
:
shutil
.
copyfileobj
(
f3
,
outFile
)
if
not
args
.
keep
:
os
.
remove
(
f_out
+
'.assembled.fastq'
)
os
.
remove
(
f_out
+
'.unassembled.reverse.fastq'
)
os
.
remove
(
f_out
+
'.unassembled.forward.fastq'
)
except
IOError
:
os
.
remove
(
f_out
)
raise
IOError
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