Ejemplo n.º 1
0
int call_align ( int argc, char ** argv )
{
	time_t start_t, stop_t, time_bef, time_aft;
	time ( &start_t );
	initenv ( argc, argv );
	overlaplen = getMinOverlap ( graphfile );
	printf ( "K = %d\n", overlaplen );
	time ( &time_bef );
	ctg_short = overlaplen + 2;
	printf ( "contig len cutoff: %d\n", ctg_short );
	prlContig2nodes ( graphfile, ctg_short );
	time ( &time_aft );
	printf ( "time spent on De bruijn graph construction: %ds\n\n",
	         ( int ) ( time_aft - time_bef ) );
	//map long read to edge one by one
	time ( &time_bef );
	prlLongRead2Ctg ( shortrdsfile, graphfile );
	time ( &time_aft );
	printf ( "time spent on mapping long reads: %ds\n\n", ( int ) ( time_aft - time_bef ) );
	//map read to edge one by one
	time ( &time_bef );
	prlRead2Ctg ( shortrdsfile, graphfile );
	time ( &time_aft );
	printf ( "time spent on mapping reads: %ds\n\n", ( int ) ( time_aft - time_bef ) );
	free_Sets ( KmerSets, thrd_num );
	time ( &stop_t );
	printf ( "overall time for alignment: %dm\n\n", ( int ) ( stop_t - start_t ) / 60 );
	return 0;
}
Ejemplo n.º 2
0
int call_align ( int argc, char ** argv )
{
	time_t start_t, stop_t, time_bef, time_aft;
	time ( &start_t );
	fprintf ( stderr, "\n********************\n" );
	fprintf ( stderr, "Map\n" );
	fprintf ( stderr, "********************\n\n" );
	initenv ( argc, argv );
	overlaplen = getMinOverlap ( graphfile );
#ifdef MER127

	if ( smallKmer > 12 && smallKmer < 128 && smallKmer % 2 == 1 )
	{
		deltaKmer = overlaplen - smallKmer;
		overlaplen = smallKmer;
	}

#else

	if ( smallKmer > 12 && smallKmer < 64 && smallKmer % 2 == 1 )
	{
		deltaKmer = overlaplen - smallKmer;
		overlaplen = smallKmer;
	}

#endif
	fprintf ( stderr, "Kmer size: %d.\n", overlaplen );
	time ( &time_bef );
	ctg_short = overlaplen + 2;
	fprintf ( stderr, "Contig length cutoff: %d.\n", ctg_short );
	prlContig2nodes ( graphfile, ctg_short );
	time ( &time_aft );
	fprintf ( stderr, "Time spent on graph construction: %ds.\n\n", ( int ) ( time_aft - time_bef ) );
	//map long read (asm_flags=4) to edge one by one
	time ( &time_bef );
	prlLongRead2Ctg ( shortrdsfile, graphfile );
	time ( &time_aft );
	fprintf ( stderr, "Time spent on aligning long reads: %ds.\n\n", ( int ) ( time_aft - time_bef ) );
	//map read to edge one by one
	time ( &time_bef );
	prlRead2Ctg ( shortrdsfile, graphfile );
	time ( &time_aft );
	fprintf ( stderr, "Time spent on aligning reads: %ds.\n\n", ( int ) ( time_aft - time_bef ) );
	free_Sets ( KmerSets, thrd_num );
	time ( &stop_t );
	fprintf ( stderr, "Overall time spent on alignment: %dm.\n\n", ( int ) ( stop_t - start_t ) / 60 );
	return 0;
}