// Path: src/main/java/org/panda/causalpath/data/ExperimentData.java
// public abstract class ExperimentData
// {
// 	/**
// 	 * ID of the measurement. This can be an identifier of the antibody in an RPPA experiment, or gene symbol for a
// 	 * mutation, or an identifier for a mass spectometry peak.
// 	 */
// 	public String id;
// 
// 	/**
// 	 * List of gene symbols that the measurement applies.
// 	 */
// 	protected Set<String> geneSymbols;
// 
// 	/**
// 	 * How does a positive value in this experiment data affects the gene's activity? Only negative example is
// 	 * methylation so far.
// 	 */
// 	public int getEffect()
// 	{
// 		return 1;
// 	}
// 
// 	/**
// 	 * A plug-in detector for the change in the experiment data. This detector may compare a test and a control group,
// 	 * or can decide based on a threshold, etc.
// 	 */
// 	protected OneDataChangeDetector chDet;
// 
// 	/**
// 	 * Repeat of the same experiments, if available.
// 	 */
// 	protected Set<ExperimentData> repeatData;
// 
// 	public ExperimentData(String id, Set<String> geneSymbols)
// 	{
// 		this.id = id;
// 		this.geneSymbols = geneSymbols;
// 	}
// 
// 	public ExperimentData(String id, String geneSymbol)
// 	{
// 		this(id, Collections.singleton(geneSymbol));
// 	}
// 
// 	public int getChangeSign()
// 	{
// 		if (chDet == null)
// 		{
// 			throw new RuntimeException("getChangeSign can be called only after setting the change detector.");
// 		}
// 
// 		return chDet.getChangeSign(this);
// 	}
// 
// 	public double getChangeValue()
// 	{
// 		if (chDet == null)
// 		{
// 			throw new RuntimeException("getChangeValue can be called only after setting the change detector.");
// 		}
// 
// 		return chDet.getChangeValue(this);
// 	}
// 
// 	public Set<String> getGeneSymbols()
// 	{
// 		return geneSymbols;
// 	}
// 
// 	public void setChDet(OneDataChangeDetector chDet)
// 	{
// 		this.chDet = chDet;
// 	}
// 
// 	public OneDataChangeDetector getChDet()
// 	{
// 		return chDet;
// 	}
// 
// 	public String getId()
// 	{
// 		return id;
// 	}
// 
// 	public boolean hasChangeDetector()
// 	{
// 		return this.chDet != null;
// 	}
// 
// 	@Override
// 	public int hashCode()
// 	{
// 		return id.hashCode();
// 	}
// 
// 	@Override
// 	public boolean equals(Object obj)
// 	{
// 		return obj instanceof ExperimentData && ((ExperimentData) obj).id.equals(id);
// 	}
// 
// 	/**
// 	 * An experiment data is not site specific by default.
// 	 */
// 	public boolean isSiteSpecific()
// 	{
// 		return false;
// 	}
// 
// 	/**
// 	 * Generates a copy of the object.
// 	 */
// 	public abstract ExperimentData copy();
// 
// 	public abstract DataType getType();
// 
// 	@Override
// 	public String toString()
// 	{
// 		return id;
// 	}
// 
// 	public void addRepeatData(ExperimentData data)
// 	{
// 		if (this.repeatData == null) this.repeatData = new HashSet<>();
// 		this.repeatData.add(data);
// 	}
// 
// 	public boolean hasRepeatData()
// 	{
// 		return this.repeatData != null && !this.repeatData.isEmpty();
// 	}
// 
// 	public Set<ExperimentData> getRepeatData()
// 	{
// 		return repeatData;
// 	}
// }


import org.panda.causalpath.data.ExperimentData;
package org.panda.causalpath.analyzer;


/**
 * This two-data change detector checks if the data changed in similar (1) or opposite (-1) directions. 0 means at least
 * one data is not changed. This class helps causality detection when controls and tests are compared.
 */
public class CausalityHelper implements TwoDataChangeDetector
{
	@Override
// Path: src/main/java/org/panda/causalpath/data/ExperimentData.java
// public abstract class ExperimentData
// {
// 	/**
// 	 * ID of the measurement. This can be an identifier of the antibody in an RPPA experiment, or gene symbol for a
// 	 * mutation, or an identifier for a mass spectometry peak.
// 	 */
// 	public String id;
// 
// 	/**
// 	 * List of gene symbols that the measurement applies.
// 	 */
// 	protected Set<String> geneSymbols;
// 
// 	/**
// 	 * How does a positive value in this experiment data affects the gene's activity? Only negative example is
// 	 * methylation so far.
// 	 */
// 	public int getEffect()
// 	{
// 		return 1;
// 	}
// 
// 	/**
// 	 * A plug-in detector for the change in the experiment data. This detector may compare a test and a control group,
// 	 * or can decide based on a threshold, etc.
// 	 */
// 	protected OneDataChangeDetector chDet;
// 
// 	/**
// 	 * Repeat of the same experiments, if available.
// 	 */
// 	protected Set<ExperimentData> repeatData;
// 
// 	public ExperimentData(String id, Set<String> geneSymbols)
// 	{
// 		this.id = id;
// 		this.geneSymbols = geneSymbols;
// 	}
// 
// 	public ExperimentData(String id, String geneSymbol)
// 	{
// 		this(id, Collections.singleton(geneSymbol));
// 	}
// 
// 	public int getChangeSign()
// 	{
// 		if (chDet == null)
// 		{
// 			throw new RuntimeException("getChangeSign can be called only after setting the change detector.");
// 		}
// 
// 		return chDet.getChangeSign(this);
// 	}
// 
// 	public double getChangeValue()
// 	{
// 		if (chDet == null)
// 		{
// 			throw new RuntimeException("getChangeValue can be called only after setting the change detector.");
// 		}
// 
// 		return chDet.getChangeValue(this);
// 	}
// 
// 	public Set<String> getGeneSymbols()
// 	{
// 		return geneSymbols;
// 	}
// 
// 	public void setChDet(OneDataChangeDetector chDet)
// 	{
// 		this.chDet = chDet;
// 	}
// 
// 	public OneDataChangeDetector getChDet()
// 	{
// 		return chDet;
// 	}
// 
// 	public String getId()
// 	{
// 		return id;
// 	}
// 
// 	public boolean hasChangeDetector()
// 	{
// 		return this.chDet != null;
// 	}
// 
// 	@Override
// 	public int hashCode()
// 	{
// 		return id.hashCode();
// 	}
// 
// 	@Override
// 	public boolean equals(Object obj)
// 	{
// 		return obj instanceof ExperimentData && ((ExperimentData) obj).id.equals(id);
// 	}
// 
// 	/**
// 	 * An experiment data is not site specific by default.
// 	 */
// 	public boolean isSiteSpecific()
// 	{
// 		return false;
// 	}
// 
// 	/**
// 	 * Generates a copy of the object.
// 	 */
// 	public abstract ExperimentData copy();
// 
// 	public abstract DataType getType();
// 
// 	@Override
// 	public String toString()
// 	{
// 		return id;
// 	}
// 
// 	public void addRepeatData(ExperimentData data)
// 	{
// 		if (this.repeatData == null) this.repeatData = new HashSet<>();
// 		this.repeatData.add(data);
// 	}
// 
// 	public boolean hasRepeatData()
// 	{
// 		return this.repeatData != null && !this.repeatData.isEmpty();
// 	}
// 
// 	public Set<ExperimentData> getRepeatData()
// 	{
// 		return repeatData;
// 	}
// }


// Path: src/main/java/org/panda/causalpath/analyzer/CausalityHelper.java
import org.panda.causalpath.data.ExperimentData;

package org.panda.causalpath.analyzer;


/**
 * This two-data change detector checks if the data changed in similar (1) or opposite (-1) directions. 0 means at least
 * one data is not changed. This class helps causality detection when controls and tests are compared.
 */
public class CausalityHelper implements TwoDataChangeDetector
{
	@Override
	public int getChangeSign(ExperimentData data1, ExperimentData data2)