Commit 5dd1cf01 authored by cmaffeo2's avatar cmaffeo2
Browse files

Fixed bug in how beads are assigned a type when clustering fails

parent 7212bdce
......@@ -1707,8 +1707,8 @@ class SegmentModel(ArbdModel):
clusters = hcluster.fclusterdata(data, float(max_basepairs_per_bead)/500, criterion="distance")
cluster_size = [np.mean(data[clusters == i]) for i in np.unique(clusters)]
except:
clusters = data
cluster_size = np.arange(len(data))+1
clusters = np.arange(len(data))+1
cluster_size = data.flatten()
for b,c in zip(beads,clusters):
_assign_bead_type(b, cluster_size[c-1], decimals=order)
......@@ -1719,8 +1719,8 @@ class SegmentModel(ArbdModel):
clusters = hcluster.fclusterdata(data, float(max_nucleotides_per_bead)/500, criterion="distance")
cluster_size = [np.mean(data[clusters == i]) for i in np.unique(clusters)]
except:
clusters = data
cluster_size = np.arange(len(data))+1
clusters = np.arange(len(data))+1
cluster_size = data.flatten()
for b,c in zip(beads,clusters):
_assign_bead_type(b, cluster_size[c-1], decimals=order)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment