text: user4001: I wish to conduct WGCNA on a single cell RNASeq dataset and, when choosing the optimal beta parameter after running pickSoftThreshold am presented with a rather strange plot: 
  
  I have normalized the data using NormalizeData in Seurat using the LogNormalize method.
  One of my colleagues suggested using hclust as a method for outlier detection to see potential cells/samples that could be excluded. I think this makes sense however I haven't found much information on such procedures besides the following paper: https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5845381/.
  My question would be, is this procedure just be as simple as running a hierarchical clustering on the data and seeing which samples cluster by themselves (and then removing those based on a minimum cluster size criteria) or is their more to it? Also, for those familiar with WGCNA, why does the scale-free topolgy plot generate such strange looking values, is this indicative of outliers being present in the data?
  Thank you for your time.
  
  user851: For outlier identification I suggest using the sample network approach developed by Oldham et al. It basically amounts to constructing a inter-sample connectivity (assuming normalizedData contains the log-normalized data with genes in colunms and samples in rows)
  k = colSums(cor(t(normalizedData))), 
  scaling the connectivities 
  Z.k = scale(k) 
  and then removing samples with high negative Z.k (e.g. Z.k < -4). 
  A slightly different approach is based on euclidean distances rather than correlations, 
  Z.k = scale(as.matrix(dist(normalizedData))) 
  and removing samples with high positive Z.k (since distance is a measure of dissimilarity). 
  Regarding the scale-free topology fit plot, I wouldn't worry about it too much, the fit index sometimes jumps around a bit. It certainly does not look like you have strong outliers or very heterogeneous data. But it is always a good idea to plot the sample clustering tree to check (1) that there are no strong clusters, and (2) that the outlier identification did something reasonable. 
  
original_text: 4001: <p>I wish to conduct WGCNA on a single cell RNASeq dataset and, when choosing the optimal beta parameter after running <code>pickSoftThreshold</code> am presented with a rather strange plot: 
  <a href="https://i.stack.imgur.com/GkqGL.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/GkqGL.jpg" alt="enter image description here"></a></p>
  
  <p>I have normalized the data using <code>NormalizeData</code> in <code>Seurat</code> using the LogNormalize method.</p>
  
  <p>One of my colleagues suggested using <code>hclust</code> as a method for outlier detection to see potential cells/samples that could be excluded. I think this makes sense however I haven't found much information on such procedures besides the following paper: <a href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5845381/" rel="nofollow noreferrer">https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5845381/</a>.</p>
  
  <p>My question would be, is this procedure just be as simple as running a hierarchical clustering on the data and seeing which samples cluster by themselves (and then removing those based on a minimum cluster size criteria) or is their more to it? Also, for those familiar with WGCNA, why does the scale-free topolgy plot generate such strange looking values, is this indicative of outliers being present in the data?</p>
  
  <p>Thank you for your time.</p>
   851: <p>For outlier identification I suggest using the <a href="https://bmcsystbiol.biomedcentral.com/articles/10.1186/1752-0509-6-63" rel="nofollow noreferrer">sample network approach</a> developed by Oldham et al. It basically amounts to constructing a inter-sample connectivity (assuming <code>normalizedData</code> contains the log-normalized data with genes in colunms and samples in rows)</p>
  
  <p><code>k = colSums(cor(t(normalizedData)))</code>, </p>
  
  <p>scaling the connectivities </p>
  
  <p><code>Z.k = scale(k)</code> </p>
  
  <p>and then removing samples with high negative Z.k (e.g. Z.k &lt; -4). </p>
  
  <p>A slightly different approach is based on euclidean distances rather than correlations, </p>
  
  <p><code>Z.k = scale(as.matrix(dist(normalizedData)))</code> </p>
  
  <p>and removing samples with high <em>positive</em> Z.k (since distance is a measure of dissimilarity). </p>
  
  <p>Regarding the scale-free topology fit plot, I wouldn't worry about it too much, the fit index sometimes jumps around a bit. It certainly does not look like you have strong outliers or very heterogeneous data. But it is always a good idea to plot the sample clustering tree to check (1) that there are no strong clusters, and (2) that the outlier identification did something reasonable. </p>
  