public PHYNetwork collapseClusterNodes(PHYNode n1, PHYNode n2) {	
		SNVGroup g = n1.getSNVGroup();
		Cluster c1 = n1.getCluster();
		Cluster c2 = n2.getCluster();
		
		// collapse c1 and c2
		Cluster union = new AAFClusterer().new Cluster(c1.getCentroid().clone(), new ArrayList<Integer>(c1.getMembership()), c1.getId());
		union.setStdDev(c1.getStdDev());
		for(Integer obs : c2.getMembership()) {
			union.addMember(obs);
		}
		union.recomputeCentroidAndStdDev(g.alleleFreqBySample, g.getSNVs().size(), g.getNumSamples());
		
		SNVGroup newG = null;
		Set<SNVGroup> groups = new HashSet<SNVGroup>();
		for(PHYNode n : nodesById.values()) {
			SNVGroup group = n.getSNVGroup();
			if(group != null) {
				if(!group.equals(g)) {
					if(!groups.contains(g)) {
						groups.add(n.getSNVGroup());	
					}
				} else {
					if(newG == null) {
						newG = new SNVGroup(g.getTag(), g.getSNVs(), g.isRobust());
						newG.subPopulations = g.subPopulations.clone();
						newG.removeCluster(c1);
						newG.removeCluster(c2);
						newG.addCluster(union);
						groups.add(newG);
					}
				}
			}
		}
		return new PHYNetwork(new ArrayList<SNVGroup>(groups), numSamples);
	}