Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
import sys
if len(sys.argv) == 1:
print("Please give the name of the gfa file to increment then the output file name")
sys.exit()
in_file = sys.argv[1]
out_file = sys.argv[2]
out_file = open(out_file, "w")
with open(in_file, "r") as in_lines:
for line in in_lines:
line = line.strip().split("\t")
if line[0] == "S":
line[1] = str(int(line[1]) + 1)
elif line[0] == "L":
line[1] = str(int(line[1]) + 1)
line[3] = str(int(line[3]) + 1)
out_file.write("\t".join(line))
out_file.write("\n")
out_file.close()
print("Done!")