Skip to content
Snippets Groups Projects
Commit 3d5bd437 authored by Yohan Jarosz's avatar Yohan Jarosz
Browse files

rm some comments + fix PEP8

parent 2e687c4e
No related branches found
No related tags found
No related merge requests found
......@@ -25,8 +25,6 @@ RUN cd /home/imp/tmp \
&& cd trimmomatic-0.32 \
&& ant \
&& cp dist/jar/trimmomatic-0.32.jar /home/imp/lib/. \
#&& mkdir -p /usr/db/trimmomatic \
#&& cp adapters/* /usr/db/trimmomatic/. \
&& cd .. && rm -rf *rimmomatic*
## idba ud
......@@ -157,14 +155,6 @@ RUN cd /home/imp/lib \
&& cd Platypus_0.8.1 \
&& bash buildPlatypus.sh
## Megahit
#RUN cd /home/imp/lib \
# && git clone https://git-r3lab.uni.lu/R3/megahit.git \
# && cd megahit \
# && git checkout v0.2.1 \
# && make \
# && mv megahit* /usr/bin/. \
# && mv sdbg_builder_cpu /usr/bin/.
RUN cd /home/imp/lib \
&& rm -rf megahit \
......@@ -189,13 +179,6 @@ RUN cd /home/imp/lib \
&& cd quast-release_3.1 \
&& ln -s $PWD/metaquast.py /usr/bin/metaquast
######################
# ship pipeline code #
######################
# (commented for now)
#RUN cd /home/imp \
# && git clone https://git-r3lab.uni.lu/shaman.narayanasamy/IMP.git
######################
# set up environment #
######################
......
......@@ -74,6 +74,7 @@ text_type = str
getcwdu = os.getcwd
u = lambda x: x
def surrogate_escape(error):
"""
Simulate the Python 3 ``surrogateescape`` handler, but for Python 2 only.
......@@ -92,6 +93,7 @@ if PY2:
u = lambda x: codecs.unicode_escape_decode(x)[0]
codecs.register_error('surrogateescape', surrogate_escape)
@contextlib.contextmanager
def io_error_compat():
try:
......@@ -1346,7 +1348,7 @@ class Path(text_type):
# http://www.zopatista.com/python/2013/11/26/inplace-file-rewriting/
@contextlib.contextmanager
def in_place(self, mode='r', buffering=-1, encoding=None, errors=None,
newline=None, backup_extension=None):
newline=None, backup_extension=None):
"""
A context in which a file may be re-written in-place with new content.
......@@ -1384,21 +1386,21 @@ class Path(text_type):
pass
os.rename(self, backup_fn)
readable = io.open(backup_fn, mode, buffering=buffering,
encoding=encoding, errors=errors, newline=newline)
encoding=encoding, errors=errors, newline=newline)
try:
perm = os.fstat(readable.fileno()).st_mode
except OSError:
writable = open(self, 'w' + mode.replace('r', ''),
buffering=buffering, encoding=encoding, errors=errors,
newline=newline)
buffering=buffering, encoding=encoding, errors=errors,
newline=newline)
else:
os_mode = os.O_CREAT | os.O_WRONLY | os.O_TRUNC
if hasattr(os, 'O_BINARY'):
os_mode |= os.O_BINARY
fd = os.open(self, os_mode, perm)
writable = io.open(fd, "w" + mode.replace('r', ''),
buffering=buffering, encoding=encoding, errors=errors,
newline=newline)
buffering=buffering, encoding=encoding, errors=errors,
newline=newline)
try:
if hasattr(os, 'chmod'):
os.chmod(self, perm)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment