Skip to content

Commit

Permalink
start convert to junction assembler
Browse files Browse the repository at this point in the history
  • Loading branch information
camillescott committed Oct 16, 2016
1 parent 7ced7d3 commit 44d792c
Showing 1 changed file with 3 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,9 @@ def main():
args = p.parse_args()

cg = create_countgraph(args)
asm = khmer.JunctionCountAssembler(cg)

kept = 0
hdn = khmer.HashSet(args.ksize)
lh = khmer._GraphLabels(cg)
next_label = 1
next_contig = 1
next_orf = 1
output = set()
Expand All @@ -100,22 +98,13 @@ def main():
continue

cov, _, _ = cg.get_median_count(record.sequence)
if cov < 20:
if cov < 30:
kept += 1
cg.consume(record.sequence)
statswriter.writerow({'read_n': n, 'action': 'c', 'cov': cov,
'n_hdn': None, 'contig_n': None,
'orf_n': None, 'new': None})
elif cov < 30:
#print('intermediate', next_label, file=sys.stderr)
seq, pos = cg.trim_on_abundance(record.sequence, 3)
if len(seq) < args.ksize:
continue

cg.consume(seq)
hdn = cg.find_high_degree_nodes(seq)
lh.label_across_high_degree_nodes(seq, hdn, next_label)
next_label += 1
asm.consume(seq)
statswriter.writerow({'read_n': n, 'action': 'l', 'cov': cov,
'n_hdn': len(hdn), 'contig_n': None,
'orf_n': None, 'new': None})
Expand Down

0 comments on commit 44d792c

Please sign in to comment.