dab89c1682e091dfa3780ce95359ebea9f6b7d52 braney Thu May 18 09:49:17 2017 -0700 add licensing info to optimalLeaf library diff --git src/optimalLeaf/SimMat.cc src/optimalLeaf/SimMat.cc index 3b2e347..370f7a7 100644 --- src/optimalLeaf/SimMat.cc +++ src/optimalLeaf/SimMat.cc @@ -1,219 +1,225 @@ +/* This code provided by Ziv Bar-Joseph with the explicit understanding that + * no licensing is required for it to be used in the UCSC Genome Browser + * as long as reference is made to this paper: + * https://www.ncbi.nlm.nih.gov/pubmed/12801867 + */ + // -------------------------------------------------------- // SimMat.cc // Computes the similarity matrix, and writes ordered trees // to a .CDT files. // -------------------------------------------------------- #include #include #include #include #include #include "SimMat.hh" #include "readFile.hh" using namespace std; // read the input file SimMat::SimMat(char *filename,int orfL,int descL,int mZ) { meanZ = mZ; readFile myRead(filename,orfL,descL); genes = myRead.getNumGenes(); exp = myRead.getNumExp(); in = myRead.getVals(); geneNames = myRead.getNames(); geneDesc = myRead.getDesc(); expNames = myRead.getExp(); generateMat(); } SimMat::SimMat( int igenes, int iexp, int imeanZ, float **iin, char **igeneNames, char **igeneDesc, char **iexpNames) { genes = igenes; exp = iexp; meanZ = imeanZ; in = iin; geneNames = igeneNames; geneDesc = igeneDesc; expNames = iexpNames; generateMat(); } // compute the siimlarity matrix void SimMat::generateMat() { int i,j; mat = new float*[genes+1]; means = compMean(genes,exp,1); std = compStd(genes,exp,1); for(i=1;i