Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
metaclade2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Riccardo Vicedomini
metaclade2
Commits
4cdba9e5
Commit
4cdba9e5
authored
Mar 18, 2020
by
Riccardo Vicedomini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
filter_hits now works even if input files do not exist
parent
8f9ed6a3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
filter_hits.py
scripts/filter_hits.py
+4
-0
No files found.
scripts/filter_hits.py
View file @
4cdba9e5
...
...
@@ -8,6 +8,8 @@ from collections import defaultdict
from
mclade_utils
import
*
script_name
=
os
.
path
.
splitext
(
os
.
path
.
basename
(
__file__
)
)[
0
]
# ARGUMENTS
RESULT_FILE
=
"result_file"
OUT_RESULT_FILE
=
"out_result_files"
...
...
@@ -30,6 +32,8 @@ def main():
# load results file and sort the hits by decreasing score
results
=
[]
for
result_filename
in
args
[
RESULT_FILE
]:
if
not
os
.
path
.
isfile
(
result_filename
):
continue
with
open
(
result_filename
,
'r'
)
as
result_file
:
for
line
in
result_file
:
results
.
append
(
line
.
rstrip
(
'
\n\r
'
)
.
split
(
'
\t
'
)
)
...
...
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