本文整理汇总了C++中Gene::setGene方法的典型用法代码示例。如果您正苦于以下问题:C++ Gene::setGene方法的具体用法?C++ Gene::setGene怎么用?C++ Gene::setGene使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Gene
的用法示例。
在下文中一共展示了Gene::setGene方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int main(int argc, char * argv[])
{
int c;
int option_index = 0;
string truth_file="";
string result_file="";
string gene_file="";
string output_file="";
string rule_file="";
int base_resolution=1;
int max_diff=20;
string pseudo_counts="0,0,0,0,0,0";
int print_num=0;
static struct option long_options[] = {
{"truth-file", required_argument, 0, 't' },
{"result-file", required_argument, 0, 'r' },
{"gene-annotation-file", required_argument, 0, 'g' },
{"output-file", required_argument, 0, 'o' },
{"subsetting-rule-file", required_argument, 0, 's' },
{"base-resolution", required_argument, 0, 'b' },
{"max-diff", required_argument, 0, 'm' },
{"pseudo-counts", required_argument, 0, 'p' },
{"use-number", no_argument, 0, 'u' },
{"help", no_argument, 0, 'h' },
{0, 0, 0, 0}
};
while(1)
{
c = getopt_long(argc, argv, "t:r:g:o:s:b:m:p:uh",
long_options, &option_index);
if (c==-1)
{
break;
}
switch(c)
{
case 'h':
usage();
exit(0);
case 't':
truth_file=optarg;
break;
case 'r':
result_file=optarg;
break;
case 'g':
gene_file=optarg;
break;
case 'o':
output_file=optarg;
break;
case 's':
rule_file=optarg;
break;
case 'b':
base_resolution=atoi(optarg);
break;
case 'm':
max_diff=atoi(optarg);
break;
case 'p':
pseudo_counts=optarg;
break;
case 'u':
print_num=1;
break;
default:
break;
}
}
if(truth_file.compare("")==0 || result_file.compare("")==0 || gene_file.compare("")==0 || output_file.compare("")==0|| rule_file.compare("")==0)
{
usage();
exit(0);
}
pseudo_counts_t pct;
get_pseudo_counts(pseudo_counts, pct);
cerr<<"loading gene annotation file..."<<endl;
Gene g;
g.loadGenesFromFile((char*)gene_file.c_str());
g.setGene();
cerr<<"loading result file..."<<endl;
Bedpe res;
res.loadFromFile((char *)result_file.c_str());
cerr<<"removing duplicate results..."<<endl;
res.uniq();
//.........这里部分代码省略.........