projects
/
htsworkflow.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Initial port to python3
[htsworkflow.git]
/
htsworkflow
/
util
/
validate.py
diff --git
a/htsworkflow/util/validate.py
b/htsworkflow/util/validate.py
index 959acc281db0b951d0d0dc2dec17023eddc9be47..93842c7ad4e7fe4e4d3c28c9948c6ccd6a68845e 100644
(file)
--- a/
htsworkflow/util/validate.py
+++ b/
htsworkflow/util/validate.py
@@
-19,7
+19,7
@@
def main(cmdline=None):
opts.uniform_lengths,
opts.max_errors)
if errors > 0:
opts.uniform_lengths,
opts.max_errors)
if errors > 0:
- print
"%s failed validation" % (filename,
)
+ print
("%s failed validation" % (filename,)
)
error_happened = True
stream.close()
error_happened = True
stream.close()
@@
-110,7
+110,7
@@
def validate_fastq(stream, format='phred33', uniform_length=False, max_errors=No
def validate_re(pattern, line, line_number, errmsg):
if pattern.match(line) is None:
def validate_re(pattern, line, line_number, errmsg):
if pattern.match(line) is None:
- print
errmsg, "[%d]: %s" % (line_number, line
)
+ print
(errmsg, "[%d]: %s" % (line_number, line)
)
return 1
else:
return 0
return 1
else:
return 0
@@
-123,7
+123,7
@@
def validate_length(line, line_length, line_number, errmsg):
if line_length is None:
line_length = len(line)
elif len(line) != line_length:
if line_length is None:
line_length = len(line)
elif len(line) != line_length:
- print
errmsg, "%d: %s" %(line_number, line
)
+ print
(errmsg, "%d: %s" %(line_number, line)
)
error_count = 1
return line_length, error_count
error_count = 1
return line_length, error_count