本文整理汇总了C++中StringHash::Add方法的典型用法代码示例。如果您正苦于以下问题:C++ StringHash::Add方法的具体用法?C++ StringHash::Add怎么用?C++ StringHash::Add使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StringHash
的用法示例。
在下文中一共展示了StringHash::Add方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int main(int argc, char ** argv)
{
printf("glfMultiples -- SNP calls based on .glf or .glz files\n");
printf("(c) 2008-2011 Goncalo Abecasis, Sebastian Zoellner, Yun Li\n\n");
String pedfile;
String positionfile;
String callfile;
String glfAliases;
String glfPrefix;
String glfSuffix;
ParameterList pl;
double posterior = 0.50;
int mapQuality = 0;
int minTotalDepth = 1;
int maxTotalDepth = INT_MAX;
bool verbose = false;
bool mapQualityStrict = false;
bool hardFilter = false;
bool smartFilter = false;
bool softFilter = true;
bool robustPrior = true;
bool uniformPrior = false;
String xLabel("X"), yLabel("Y"), mitoLabel("MT");
int xStart = 2699520, xStop = 154931044;
BEGIN_LONG_PARAMETERS(longParameters)
LONG_PARAMETER_GROUP("Pedigree File")
LONG_STRINGPARAMETER("ped", &pedfile)
LONG_PARAMETER_GROUP("Map Quality Filter")
LONG_INTPARAMETER("minMapQuality", &mapQuality)
LONG_PARAMETER("strict", &mapQualityStrict)
LONG_PARAMETER_GROUP("Total Depth Filter")
LONG_INTPARAMETER("minDepth", &minTotalDepth)
LONG_INTPARAMETER("maxDepth", &maxTotalDepth)
LONG_PARAMETER_GROUP("Position Filter")
LONG_STRINGPARAMETER("positionFile", &positionfile)
LONG_PARAMETER_GROUP("Chromosome Labels")
LONG_STRINGPARAMETER("xChr", &xLabel)
LONG_STRINGPARAMETER("yChr", &yLabel)
LONG_STRINGPARAMETER("mito", &mitoLabel)
LONG_INTPARAMETER("xStart", &xStart)
LONG_INTPARAMETER("xStop", &xStop)
LONG_PARAMETER_GROUP("Filtering Options")
EXCLUSIVE_PARAMETER("hardFilter", &hardFilter)
EXCLUSIVE_PARAMETER("smartFilter", &smartFilter)
EXCLUSIVE_PARAMETER("softFilter", &softFilter)
LONG_PARAMETER_GROUP("Prior Options")
EXCLUSIVE_PARAMETER("uniformPrior", &uniformPrior)
EXCLUSIVE_PARAMETER("robustPrior", &robustPrior)
LONG_PARAMETER_GROUP("Output")
LONG_PARAMETER("verbose", &verbose)
LONG_PARAMETER_GROUP("Sample Names")
LONG_STRINGPARAMETER("glfAliases", &glfAliases)
LONG_PARAMETER_GROUP("Prefixes and Suffixes")
LONG_STRINGPARAMETER("glfPrefix",&glfPrefix)
LONG_STRINGPARAMETER("glfSuffix",&glfSuffix)
END_LONG_PARAMETERS();
pl.Add(new StringParameter('b', "Base Call File", callfile));
pl.Add(new DoubleParameter('p', "Posterior Threshold", posterior));
pl.Add(new LongParameters("Additional Options", longParameters));
int argstart = pl.ReadWithTrailer(argc, argv) + 1;
pl.Status();
if (posterior < 0.50)
error("Posterior threshold for genotype calls (-p option) must be > 0.50.");
time_t t;
time(&t);
printf("Analysis started on %s\n", ctime(&t));
fflush(stdout);
int n = argc - argstart;
argv += argstart;
Pedigree ped;
if (!pedfile.IsEmpty())
{
ped.pd.AddStringColumn("glfFile");
ped.Load(pedfile);
n = ped.count;
}
else
if (n == 0)
error("No pedigree file present and no glf files listed at the end of command line\n");
// Prior for finding difference from the reference at a particular site
//BgzfFileType::setRequireEofBlock(false);
double prior = 0.0;
for (int i = 1; i <= 2 * n; i++)
prior += 1.0 / i;
prior *= 0.001;
glfHandler * glf = new glfHandler[n];
//.........这里部分代码省略.........