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
from Graph import Graph
import find_components
import functions
if len(sys.argv) != 4:
print("You need to give the following arguments <input_gfa> <k> <output_file>")
sys.exit(0)
print("reading files")
new_graph = Graph()
new_graph.read_gfa(sys.argv[1])
new_graph.k = int(sys.argv[2])
nodes_to_remove = []
for n in new_graph.nodes.values():
if (len(n.start) == 0) and (len(n.end) == 0):
nodes_to_remove.append(n.id)
for i in nodes_to_remove:
del new_graph.nodes[i]
functions.write_gfa(nodes=new_graph.nodes, k = new_graph.k, output_file=str(sys.argv[3]))