Sleipnir
src/seekweight.h
00001 /*****************************************************************************
00002 * This file is provided under the Creative Commons Attribution 3.0 license.
00003 *
00004 * You are free to share, copy, distribute, transmit, or adapt this work
00005 * PROVIDED THAT you attribute the work to the authors listed below.
00006 * For more information, please see the following web page:
00007 * http://creativecommons.org/licenses/by/3.0/
00008 *
00009 * This file is a component of the Sleipnir library for functional genomics,
00010 * authored by:
00011 * Curtis Huttenhower (chuttenh@princeton.edu)
00012 * Mark Schroeder
00013 * Maria D. Chikina
00014 * Olga G. Troyanskaya (ogt@princeton.edu, primary contact)
00015 *
00016 * If you use this library, the included executable tools, or any related
00017 * code in your work, please cite the following publication:
00018 * Curtis Huttenhower, Mark Schroeder, Maria D. Chikina, and
00019 * Olga G. Troyanskaya.
00020 * "The Sleipnir library for computational functional genomics"
00021 *****************************************************************************/
00022 #ifndef SEEKWEIGHT_H
00023 #define SEEKWEIGHT_H
00024 
00025 #include "seekbasic.h"
00026 #include "seekreader.h"
00027 #include "seekquery.h"
00028 #include "seekevaluate.h"
00029 
00030 namespace Sleipnir {
00031 
00044 class CSeekWeighter{
00045 public:
00046 
00072     /*cv_query must be present in sDataset */
00073     static bool LinearCombine(vector<utype> &rank,
00074         const vector<utype> &cv_query, CSeekDataset &sDataset,
00075         const utype &, const bool &);
00076 
00115     static bool CVWeighting(CSeekQuery &sQuery, CSeekDataset &sDataset,
00116         const float &rate, const float &percent_required, const bool &bsquareZ,
00117         vector<utype> *rrank, const CSeekQuery *goldStd = NULL);
00118 
00150     static bool OrderStatisticsRankAggregation(const utype&, const utype&,
00151         utype**, const vector<utype> &, vector<float>&, const utype&);
00152     static bool OrderStatisticsPreCompute();
00153 
00154 
00189     static bool OneGeneWeighting(CSeekQuery&, 
00190         CSeekDataset&, const float&, const float&, const bool&, 
00191         vector<utype>*, const CSeekQuery*);
00192 
00193     static bool AverageWeighting(CSeekQuery &sQuery, CSeekDataset &sDataset,
00194         const float &percent_required, const bool &bSquareZ, float &w);
00195 };
00196 
00197 
00198 }
00199 #endif