Sleipnir
src/seekquery.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 SEEKQUERY_H
00023 #define SEEKQUERY_H
00024 
00025 #include "seekbasic.h"
00026 
00027 namespace Sleipnir {
00028     
00045 class CSeekQuery{
00046 public:
00047     
00065     enum PartitionMode{
00066         LEAVE_ONE_IN = 0,
00067         LEAVE_ONE_OUT = LEAVE_ONE_IN + 1,
00068         CUSTOM_PARTITION = LEAVE_ONE_OUT + 1
00069     };
00070     
00074     CSeekQuery();
00075 
00079     ~CSeekQuery();
00080 
00084     bool Reset();
00085 
00098     bool InitializeQuery(const vector<char>&);
00099     
00115     bool InitializeQuery(const vector<utype>&, const utype &);
00116 
00121     utype GetNumFold() const;
00122     
00127     const vector<utype>& GetQuery() const;
00128     
00133     const vector<char>& GetQueryPresence() const;
00134     
00146     const vector<utype>& GetCVQuery(utype&) const;
00147     
00167     bool CreateCVPartitions(const gsl_rng*, \
00168         const enum PartitionMode &, const utype=-1);
00169 
00170 private:
00171     vector<utype> queryGenes;
00172     vector<char> queryGenePresence;
00173 
00174     vector<utype> *crossValGenes;
00175     utype iNumFold;
00176     utype iFoldSize;
00177     utype qSize;
00178 
00179 };
00180 
00181 }
00182 #endif