}
public static void findActivityInOtherTissue() throws Throwable
{
// TabDelimitedFileParser p = new TabDelimitedFileParser("resource/factors/AR-select-small.txt");
TabDelimitedFileParser p = new TabDelimitedFileParser("resource/NuclearReceptors.txt");
Set<String> tarNames = p.getColumnSet(0);
tarNames.add("AR");
Set<String> tarIDs = IDUtil.covertSym2Gene(tarNames);
String dir = "resource/expdata/expo/";
Map<String, Gene> geneMap = ExpDataReader.readGenes(tarIDs, dir, 0, 0);
boolean[][] pos = StageAnalyzer.getPos(dir);
String[] stgNm = StageAnalyzer.getStageNames(dir);
int indBr = ArrayUtils.getIndexOf(stgNm, "Breast");
int indPr = ArrayUtils.getIndexOf(stgNm, "Prostate");
List<Gene> genes = Gene.sortWithSym(geneMap.values());
Gene ar = genes.get(5);
int cnt = 0;
tarNames.clear();
for (Gene g : genes)
{
g.takeLog();
double globMean = g.calcMean();
double meanPr = g.calcMean(pos[indPr]);
double meanBr = g.calcMean(pos[indBr]);
double varBr = g.calcVariance(pos[indBr]);
boolean select = meanBr > globMean && varBr > 1;
double cor = Pearson.calcCorrelation(g.value, ar.value, pos[indBr]);
if (select)
{
System.out.println(g.getSymbol() + "\t" + globMean + "\t" +
meanPr + "\t" + meanBr + "\t" + varBr + "\t" + cor);
cnt++;
tarNames.add(g.getSymbol());
}
}
System.out.println("cnt = " + cnt);
p = new TabDelimitedFileParser("resource/NuclearReceptors.txt");
Set<String> nucres = p.getColumnSet(0);
// TripletMaker.make("AR", HPRDParser.readFor(Collections.singleton("AR")).get("AR"), tarNames,
// TripletMaker.make("AR", nucres, tarNames,
// "resource/tartrips/breast-AR-trips.txt");
Map<String, Gene> symMap = Gene.getSymMap(genes);