Skip to content
Permalink
e37ee19ff8
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
46 lines (40 sloc) 1.8 KB
package edu.uconn.tripoint.export;
import edu.uconn.tripoint.triangulation.TriangulatedGene;
public class PathwayGeneCytoscapeNode extends CytoscapeNode {
private String _pathway;
private TriangulatedGene _tg;
private int _noncodingcount;
public PathwayGeneCytoscapeNode(int id, String pathway, TriangulatedGene tg, int nccount){
super(id);
_pathway = pathway;
_tg = tg;
_noncodingcount = nccount;
}
@Override
public String toJSON(){
StringBuilder sb = new StringBuilder();
sb.append("{\n");
sb.append("\"data\" : {\n");
sb.append("\"id\" : \""+getId()+"\",\n");
sb.append("\"type\" : \"Pathway Gene\",\n");
sb.append("\"name\" : \""+_tg.getGene().getId()+"\",\n");
sb.append("\"pathway\" : \""+_pathway+"\",\n");
sb.append("\"expression\" : "+_tg.getGene().getValue()+",\n");
sb.append("\"inconsistency\" : "+_tg.getInconsistencyScore(_pathway)+",\n");
sb.append("\"inconsistency_pval\" : "+_tg.getInconsistencyPValue(_pathway)+",\n");
sb.append("\"inconsistency_qval\" : "+_tg.getInconsistencyFDR(_pathway)+",\n");
sb.append("\"support\" : "+_tg.getSupportScore(_pathway)+",\n");
sb.append("\"support_pval\" : "+_tg.getSupportPValue(_pathway)+",\n");
sb.append("\"support_qval\" : "+_tg.getSupportFDR(_pathway)+",\n");
sb.append("\"consistency\" : "+_tg.getConsistencyScore(_pathway)+",\n");
sb.append("\"consistency_pval\" : "+_tg.getConsistencyPValue(_pathway)+",\n");
sb.append("\"consistency_qval\" : "+_tg.getConsistencyFDR(_pathway)+",\n");
sb.append("\"impact\" : "+_tg.getImpactScore(_pathway)+",\n");
sb.append("\"impact_pval\" : "+_tg.getImpactPValue(_pathway)+",\n");
sb.append("\"impact_qval\" : "+_tg.getImpactFDR(_pathway)+",\n");
sb.append("\"noncoding_count\" : "+_noncodingcount+"\n");
sb.append("}\n");
sb.append("}\n");
return sb.toString();
}
}