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 Graph
import functions
import sys
if len(sys.argv) < 4:
print("You need to give the following arguments <graph.gfa> <k> <output_file>")
sys.exit()
new_graph = Graph.Graph()
new_graph.read_gfa(sys.argv[1])
new_graph.k = int(sys.argv[2])
nodes_to_remove = []
for node in new_graph.nodes.values():
if (len(node.start) == 0) or (len(node.end) == 0):
if node.seq_len < (2*new_graph.k - 1):
nodes_to_remove.append(node.id)
functions.remove_nodes(new_graph, nodes_to_remove)
functions.write_gfa(nodes=new_graph.nodes, k=new_graph.k, output_file=sys.argv[3])