Skip to content

Commit

Permalink
Correct previous and next column in the output
Browse files Browse the repository at this point in the history
  • Loading branch information
bvalot committed Dec 2, 2019
1 parent de73475 commit f7264e1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions annotateISresult.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ def searchSurround(chrom, start, end, gffs):
next_ = g
return prev_, next_

def printResult(res, inside, next_, prev_, ident, annot):
def printResult(res, inside, prev_, next_, ident, annot):
"""Add information of ID, start, stop, strand, annotation"""
res2 = list(res)
addAnnot(res2, next_, ident, annot)
addAnnot(res2, inside, ident, annot)
addAnnot(res2, prev_, ident, annot)
addAnnot(res2, inside, ident, annot)
addAnnot(res2, next_, ident, annot)
return res2

def addAnnot(res2, gff, ident, annot):
Expand Down Expand Up @@ -107,4 +107,4 @@ def headerOut(header):
else:
prev_, next_ = searchSurround(res[1], int(res[2]), int(res[3]), gffs)
# print(res[1] + "|" + res[2] + " " + str(prev_) + " " + str(next_))
output.write("\t".join(printResult(res, None, next_, prev_, args.id, args.annote)) + "\n")
output.write("\t".join(printResult(res, None, prev_, next_, args.id, args.annote)) + "\n")

0 comments on commit f7264e1

Please sign in to comment.