YosefLab / scone

53 stars 12 forks source link

bug in scone_eval #65

Closed allonw closed 8 years ago

allonw commented 8 years ago

In scone_eval:

      BATCH_SIL <- summary(cluster::silhouette(as.numeric(na.omit(batch)),
                                               dd[!is.na(batch),!is.na(batch)]))$avg.width

throws exception: Error in summary(cluster::silhouette(as.numeric(na.omit(batch)), dd[!is.na(batch), : $ operator is invalid for atomic vectors

when batch is one-dimensional

allonw commented 8 years ago

turns out the bug occurred when batch/bio had only one factor left after cell filtering --> pushed fix