Skip to content
This repository has been archived by the owner on Jan 20, 2022. It is now read-only.

Commit

Permalink
idseq dedup cluster header bugfix (#52)
Browse files Browse the repository at this point in the history
  • Loading branch information
morsecodist authored Oct 10, 2020
1 parent 8155c10 commit 55c1c6c
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
The first column contains the representative read id of
a cluster, and the second column contains the read id.
"""
from csv import reader
from csv import DictReader
from typing import Dict, Optional, Tuple


Expand All @@ -12,7 +12,8 @@ def parse_clusters_file(
) -> Dict[str, Optional[Tuple]]:
clusters_dict = {}
with open(idseq_dedup_clusters_path) as f:
for r_read_id, read_id in reader(f):
for row in DictReader(f):
r_read_id, read_id = row["representative read id"], row["read id"]
if r_read_id not in clusters_dict:
clusters_dict[r_read_id] = (1,)
else:
Expand Down

0 comments on commit 55c1c6c

Please sign in to comment.