Skip to content

Commit

Permalink
Fixed small bug (--sl merging)
Browse files Browse the repository at this point in the history
  • Loading branch information
felipelouza committed Sep 16, 2021
1 parent 2da5546 commit b190421
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions eGap
Original file line number Diff line number Diff line change
Expand Up @@ -203,9 +203,6 @@ def check_input(args):
if (args.sa):
print("SA construction not supported for merging BWT files!")
sys.exit(1)
if (args.sl):
print("SL construction not supported for merging BWT files!")
sys.exit(1)
args.basename = args.out
# ---- if the input are concatenated texts there is a single file
else:
Expand Down Expand Up @@ -283,6 +280,14 @@ def phase1(args,logfile, logfile_name):
filename = os.path.splitext(name)[0]+".{byts}.da".format(byts=args.dbytes)
with open(filename,'rb') as fd:
shutil.copyfileobj(fd, dablfile, 1024*1024*10) # 10 MBs buffer
if(args.sl):
# concatenate .sl files in a single .sl_bl file
print("==== creating .sl_bl file")
with open(args.basename+".{byts}.sl_bl".format(byts=args.slbytes),"wb") as slblfile:
for name in args.input:
filename = os.path.splitext(name)[0]+".{byts}.sl".format(byts=args.slbytes)
with open(filename,'rb') as fd:
shutil.copyfileobj(fd, slblfile, 1024*1024*10) # 10 MBs buffer
return True # everything fine
else:
# ---- gSACAK
Expand Down

0 comments on commit b190421

Please sign in to comment.