本文整理汇总了C++中Blocks::AddGeneBlockGraphByClippedAlignments方法的典型用法代码示例。如果您正苦于以下问题:C++ Blocks::AddGeneBlockGraphByClippedAlignments方法的具体用法?C++ Blocks::AddGeneBlockGraphByClippedAlignments怎么用?C++ Blocks::AddGeneBlockGraphByClippedAlignments使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Blocks
的用法示例。
在下文中一共展示了Blocks::AddGeneBlockGraphByClippedAlignments方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
//.........这里部分代码省略.........
}
else
{
char buffer[255] ;
prefix = strdup( "rascaf" ) ;
sprintf( buffer, "%s.out", prefix ) ;
fpOut = fopen( buffer, "w" ) ;
}
if ( genomeFile != NULL )
{
genome.Open( alignments, genomeFile ) ;
alignments.Rewind() ;
}
if ( outputConnectionSequence == true && genomeFile == NULL )
{
fprintf( stderr, "Must use -f to specify assembly file when using -cs\n" ) ;
exit( EXIT_FAILURE ) ;
}
// 74619
//printf( "%c\n", genome.GetNucleotide( 74619, 4 ) ) ;
//exit(0) ;
// Build the graph
ret = blocks.BuildExonBlocks( alignments, genome ) ;
alignments.Rewind() ;
fprintf( stderr, "Found %d exon blocks.\n", ret ) ;
if ( clippedAlignments.IsOpened() )
{
fprintf( stderr, "Extend exon blocks with clipped alignments.\n" ) ;
Blocks extendBlocks ;
extendBlocks.BuildExonBlocks( clippedAlignments, genome ) ;
clippedAlignments.Rewind() ;
ret = blocks.ExtendExonBlocks( extendBlocks ) ;
fprintf( stderr, "Found %d exon blocks after extension.\n", ret ) ;
}
blocks.GetAlignmentsInfo( alignments ) ;
alignments.Rewind() ;
ret = blocks.BuildGeneBlocks( alignments, genome ) ;
alignments.Rewind() ;
fprintf( stderr, "Found %d gene blocks.\n", ret ) ;
blocks.BuildGeneBlockGraph( alignments ) ;
if ( clippedAlignments.IsOpened() )
{
blocks.AddGeneBlockGraphByClippedAlignments( clippedAlignments ) ;
}
// Cleaning
blocks.CleanGeneBlockGraph( alignments, genome ) ;
// Scaffolding
Scaffold scaffold( blocks, genome ) ;
//scaffold.Init( blocks ) ;
int componentCnt = scaffold.BuildComponent() ;
fprintf( stderr, "Found %d non-trivial gene block components.\n", componentCnt ) ;
// Possible for parallelization
for ( i = 0 ; i < componentCnt ; ++i )
{
scaffold.ScaffoldComponent( i ) ;
}
scaffold.ScaffoldGenome() ;
// Output the command line
fprintf( fpOut, "command line: " ) ;
char *fullpath = (char *)malloc( sizeof( char ) * 4096 ) ;
for ( i = 0 ; i < argc ; ++i )
{
char c = ' ' ;
if ( i == argc - 1 )
c = '\n' ;
if ( i > 0 && !strcmp( argv[i - 1], "-b" ) )
{
if ( realpath( argv[i], fullpath ) == NULL )
{
fprintf( stderr, "Failed to resolve the path of file %s.\n", argv[i] ) ;
exit( 1 ) ;
}
fprintf( fpOut, "%s%c", fullpath, c ) ;
}
else if ( i > 0 && !strcmp( argv[i - 1], "-f" ) )
{
if ( realpath( argv[i], fullpath ) == NULL )
{
fprintf( stderr, "Failed to resolve the path of file %s.\n", argv[i] ) ;
exit( 1 ) ;
}
fprintf( fpOut, "%s%c", fullpath, c ) ;
}
else
fprintf( fpOut, "%s%c", argv[i], c ) ;
}
free( fullpath ) ;
scaffold.Output( fpOut, alignments ) ;
return 0 ;
}