本文整理汇总了C++中Genome::GetContigInfo方法的典型用法代码示例。如果您正苦于以下问题:C++ Genome::GetContigInfo方法的具体用法?C++ Genome::GetContigInfo怎么用?C++ Genome::GetContigInfo使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Genome
的用法示例。
在下文中一共展示了Genome::GetContigInfo方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
//.........这里部分代码省略.........
{
if ( isInCycle[i] )
{
for ( int dummy = 0 ; dummy <= 1 ; ++dummy )
{
int ncnt = contigGraph.GetNeighbors( i, dummy, neighbors, MAX_NEIGHBOR ) ;
for ( int j = 0 ; j < ncnt ; ++j )
{
if ( neighbors[j].a == i + 2 * dummy - 1 && neighbors[j].b != dummy
&& genome.GetChrIdFromContigId( i ) == genome.GetChrIdFromContigId( neighbors[j].a ) )
continue ; // the connection created by the raw assembly
else
contigGraph.RemoveEdge( i, dummy, neighbors[j].a, neighbors[j].b ) ;
}
}
}
}
memset( used, false, sizeof( bool ) * contigCnt ) ;
memset( visitTime, -1, sizeof( int ) * contigCnt ) ;
memset( visitDummy, -1, sizeof( int ) * contigCnt ) ;
memset( danglingVisitTime, -1, sizeof( int ) * contigCnt ) ;
memset( counter, -1, sizeof( int ) * contigCnt ) ;
memset( isInQueue, false, sizeof( bool ) * contigCnt ) ;
ContigGraph newGraph( contigCnt, edgeCnt ) ;
// Compute the gap size
int *gapSize = new int[contigCnt] ;
for ( i = 0 ; i < contigCnt - 1 ; ++i )
{
if ( genome.GetChrIdFromContigId( i ) == genome.GetChrIdFromContigId( i + 1 ) )
{
struct _contig c1 = genome.GetContigInfo( i ) ;
struct _contig c2 = genome.GetContigInfo( i + 1 ) ;
gapSize[i] = c2.start - c1.end - 1 ;
}
else
gapSize[i] = -1 ;
}
// Start search
int ncnt ;
struct _pair *queue = new struct _pair[ contigCnt ] ;
int head = 0, tail ;
int danglingTime = 0 ;
// Pre-allocate the subgraph.
ContigGraph subgraph( contigCnt, 3 * contigCnt ) ;
for ( i = 0 ; i < scafCnt ; ++i )
{
//if ( used[144281] == true )
// printf( "changed %d %d\n", i, scafInfo[i - 1].a ) ;
if ( scafInfo[i].a == -1 )
continue ;
int from, to ;
genome.GetChrContigRange( genome.GetChrIdFromContigId( scafInfo[i].a ), from, to ) ;
//printf( "%d: %d %d %d\n", i, scafInfo[i].b, from, to ) ;
ForwardSearch( from, 0, i, visitTime, counter, visitDummy, contigGraph ) ;
chosenCnt = 0 ;
BackwardSearch( to, 1, i, visitTime, counter, contigGraph, chosen, chosenCnt ) ;
/*printf( "%s %d (%d %d) %d\n", alignments.GetChromName( genome.GetChrIdFromContigId( scafInfo[i].a ) ), i, from, to, chosenCnt ) ;
if ( chosenCnt > 1 )
{
printf( "=== " ) ;