Skip to content
Snippets Groups Projects
Commit 7da6e2d2 authored by Shaman Narayanasamy's avatar Shaman Narayanasamy
Browse files

change default test input folder

parent 61ccdf30
No related branches found
No related tags found
No related merge requests found
{
"threads": 4,
"datadir": "TEST_DATA",
"datadir": "TEST_DATA/raw",
"sample": "test",
"outputdir": "build",
"db_path": "db",
......
......@@ -72,12 +72,17 @@ def prepare_input_files(input, rtype):
p, fname = os.path.split(inp)
outfilename = os.path.join(P_OUT, tmp)
print(inp, '=>', outfilename)
import bz2
# ungunzip
if os.path.splitext(fname)[-1] in ['.gz', '.gzip']:
with open(outfilename, 'wb') as whandle:
with gzip.open(inp, 'rb') as rhandle:
whandle.write(rhandle.read())
# copy
elif os.path.splitext(fname)[-1] in ['.bz2', '.bzip2']:
with open(outfilename, 'wb') as whandle:
with bz2.BZ2File(inp, 'r') as rhandle:
whandle.write(rhandle)
else:
shutil.copy(inp, outfilename)
......
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