本文整理汇总了C++中Genome::readRFPData方法的典型用法代码示例。如果您正苦于以下问题:C++ Genome::readRFPData方法的具体用法?C++ Genome::readRFPData怎么用?C++ Genome::readRFPData使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Genome
的用法示例。
在下文中一共展示了Genome::readRFPData方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int main()
{
std::string pathBegin = "/home/nax/Work/biolab/TestingIn/";
unsigned numMixtures = 1;
std::vector<double> sphi_init(numMixtures, 2);
std::vector<std::vector<unsigned> > mixtureDefinitionMatrix;
// SIMULATE GENOME: RFP
Genome genome;
//if(testEqualityGenome(genome, genome)){
// my_print("So far so good\n");
//}
//exit(1);
genome.readRFPData(pathBegin + "rfp_file_20positions_20genes.csv", false);
exit(0);
/*genome.readFasta(pathBegin + "RibModelDev/data/singleMixture/genome_2000.fasta", false);
std::vector<unsigned> geneAssignment(genome.getGenomeSize());
for (unsigned i = 0u; i < genome.getGenomeSize(); i++)
{
geneAssignment[i] = 0u;
}
PAParameter parameter(sphi_init, numMixtures, geneAssignment, mixtureDefinitionMatrix, true, "allUnique");
PAModel model;
//ROCParameter parameter(sphi_init, numMixtures, geneAssignment, mixtureDefinitionMatrix, true, "allUnique");
//ROCModel model;
model.setParameter(parameter);
model.simulateGenome(genome);
genome.writeRFPData(pathBegin + "labbooks/Denizhan.Pak/Log_Files/sim_genomes/PASim.csv", true);
genome.writeRFPData(pathBegin + "labbooks/Denizhan.Pak/Log_Files/sim_genomes/PANotSim.csv", false);
exit(1);*/
// UNIT TESTING
//testUtility();
//testSequenceSummary();
//testGene();
//testGenome(pathBegin + "RibModelFramework/tests/testthat/UnitTestingData");
//testCovarianceMatrix();
//testParameter();
//testParameterWithFile(pathBegin + "HollisFile.txt");
//testPAParameter();
//testMCMCAlgorithm();
//exit(0);
std::string modelToRun = "PANSE"; //can be RFP, ROC or FONSE
bool withPhi = false;
bool fromRestart = false;
my_print("Initializing MCMCAlgorithm object---------------\n");
unsigned samples = 100;
unsigned thinning = 100;
int useSamples = 1000;
my_print("\t# Samples: %\n", samples);
my_print("\tThinning: %\n", thinning);
my_print("\t # Samples used: %\n", useSamples);
MCMCAlgorithm mcmc = MCMCAlgorithm(samples, thinning, 10, true, true, true);
mcmc.setRestartFileSettings(pathBegin + "RestartFile.txt", 20, true);
my_print("Done!-------------------------------\n\n\n");
if (modelToRun == "ROC")
{
my_print("Initializing Genome object--------------------------\n");
Genome genome;
genome.readFasta(pathBegin + "RibModelDev/data/twoMixtures/simulatedAllUniqueR.fasta");
if (withPhi)
{
genome.readObservedPhiValues(pathBegin + "RibModelFramework/ribModel/data/simulatedAllUniqueR_phi.csv", false);
}
my_print("Done!-------------------------------\n\n\n");
my_print("Initializing shared parameter variables---------------\n");
std::vector<unsigned> geneAssignment(genome.getGenomeSize());
std::vector<double> sphi_init(numMixtures, 1);
if (numMixtures == 1)
{
for (unsigned i = 0u; i < genome.getGenomeSize(); i++)
{
geneAssignment[i] = 0u;
}
}
else if (numMixtures == 3)
{
for (unsigned i = 0u; i < genome.getGenomeSize(); i++)
{
if (i < 961) geneAssignment[i] = 0u;
else if (i < 1418) geneAssignment[i] = 1u;
else geneAssignment[i] = 0u;
}
//.........这里部分代码省略.........