diff --git a/falcon_kit/mains/fetch_reads.py b/falcon_kit/mains/fetch_reads.py index 9f7b4581..c5b1c185 100644 --- a/falcon_kit/mains/fetch_reads.py +++ b/falcon_kit/mains/fetch_reads.py @@ -64,10 +64,10 @@ def pid_to_oid(pid): with open(map_fn, 'r') as f: for row in f: row = row.strip().split() - hit_ctg = row[1] - hit_ctg = hit_ctg.split('-')[0] - if hit_ctg not in read_set and int(row[3]) == 0: - o_id = pid_to_oid(row[0]) + o_id = pid_to_oid(row[0]) + if o_id not in read_set and int(row[3]) == 0: + hit_ctg = row[1] + hit_ctg = hit_ctg.split("-")[0] read_set[o_id] = hit_ctg ctg_id_hits[hit_ctg] = ctg_id_hits.get(hit_ctg, 0) + 1 diff --git a/falcon_kit/mains/graph_to_contig.py b/falcon_kit/mains/graph_to_contig.py index d0048373..16fca04b 100644 --- a/falcon_kit/mains/graph_to_contig.py +++ b/falcon_kit/mains/graph_to_contig.py @@ -258,11 +258,11 @@ def main(argv=None): delta_len = len(seq) - len(base_seq) idt = 0.0 cov = 0.0 - if len(base_seq) > 2000 and len(seq) > 2000: - aln_data, x, y = get_aln_data(base_seq, seq) - if len( aln_data ) != 0: - idt = 1.0-1.0*aln_data[-1][-1] / aln_data[-1][-2] - cov = 1.0*(aln_data[-1][3]-aln_data[-1][2])/aln_data[-1][4] + #if len(base_seq) > 2000 and len(seq) > 2000: + # aln_data, x, y = get_aln_data(base_seq, seq) + # if len( aln_data ) != 0: + # idt = 1.0-1.0*aln_data[-1][-1] / aln_data[-1][-2] + # cov = 1.0*(aln_data[-1][3]-aln_data[-1][2])/aln_data[-1][4] atig_output.append( (v, w, atig_path, total_length, total_score, seq, atig_path_edges, delta_len, idt, cov) )