本文整理汇总了C++中Progress::init方法的典型用法代码示例。如果您正苦于以下问题:C++ Progress::init方法的具体用法?C++ Progress::init怎么用?C++ Progress::init使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Progress
的用法示例。
在下文中一共展示了Progress::init方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: sorting_count
//.........这里部分代码省略.........
}
}
int64_t estimated_NbReads = Sequences->estimate_nb_reads();
char * rseq;
int readlen;
int64_t NbSolid = 0;
int64_t * NbSolid_omp = (int64_t *) calloc(nb_threads,sizeof(int64_t));
//long total_kmers_per_partition[nb_partitions]; //guillaume probably commented it because updating this variable would require synchronization
long distinct_kmers_per_partition[nb_partitions];
uint64_t * histo_count = (uint64_t *) calloc(10001,sizeof(uint64_t));
#if OMP
uint64_t ** histo_count_omp = (uint64_t **) calloc(nb_threads,sizeof(uint64_t *));
for(int ii=0;ii<nb_threads;ii++)
{
histo_count_omp[ii]= (uint64_t *) calloc(10001,sizeof(uint64_t));
}
#endif
//start by the conversion of the file to binary format
if(use_compressed_reads)
{
char * pt_begin;
int idx =0 ;
int64_t NbRead = 0;
Progress progress_conversion;
// progress_conversion.timer_mode=1; // to switch to timer mode (show elapsed and estimated remaining time)
progress_conversion.init(estimated_NbReads,"First step: Converting input file into Binary format");
Sequences->rewind_all();
while(1)
{
if(! Sequences->get_next_seq(&rseq,&readlen)) break; // read original fasta file
if(readlen > max_read_length) // realloc kmer_table_seq if needed
{
max_read_length = 2*readlen;
kmer_table_seq = (kmer_type * ) realloc(kmer_table_seq,sizeof(kmer_type)*max_read_length);
kmer_length_table_seq = (kmer_type * ) realloc(kmer_length_table_seq,sizeof(kmer_type)*max_read_length);
}
pt_begin = rseq;
//should be ok
while (pt_begin < (rseq+ readlen))
{
idx=0; // start a new read
//skips NN
while (*pt_begin =='N' && pt_begin < (rseq+ readlen))
{
pt_begin ++;
}
// goes to next N or end of seq
while ( (pt_begin[idx] !='N') && ((pt_begin +idx) < (rseq+ readlen)) )
{
idx++;
}
//we have a seq beginning at pt_begin of size idx ,without any N, will be treated as a read:
binread->write_read(pt_begin,idx);
revcomp_sequence(pt_begin,idx); // reverse complement the string