File: loghits.cpp

package info (click to toggle)
pilercr 1.06%2Bdfsg-5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 844 kB
  • sloc: cpp: 14,339; makefile: 67; sh: 36
file content (45 lines) | stat: -rwxr-xr-x 1,050 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#include "pilercr.h"

static void LocalLogHit(int HitIndex)
	{
	const DPHit &Hit = GetHit(HitIndex);

	Seq *A = new Seq;
	Seq *B = new Seq;

	GetSubseq(Hit.aLo, Hit.aHi-1, *A);
	GetSubseq(Hit.bLo, Hit.bHi-1, *B);

	A->SetName("A");
	B->SetName("B");

	SeqVect Seqs;
	Seqs.push_back(A);
	Seqs.push_back(B);

	MSA Aln;
	MultipleAlign(Seqs, Aln);

	unsigned ColCount = Aln.GetColCount();

	Log("%5d  %7d  %7d  %6d  %5d  ", HitIndex, Hit.aLo, Hit.aHi, Hit.aHi - Hit.aLo + 1,
	  GetSpacerLength(Hit));
	for (unsigned Col = 0; Col < ColCount; ++Col)
		Log("%c", Aln.GetChar(0, Col));
	Log("\n");

	Log("%5d  %7d  %7d  %6d         ", HitIndex, Hit.bLo, Hit.bHi, Hit.bHi - Hit.bLo + 1);
	for (unsigned Col = 0; Col < ColCount; ++Col)
		Log("%c", Aln.GetChar(1, Col));
	Log("\n");
	Log("\n");
	}

void LogHits()
	{
	Log("\n");
	Log("  Hit       Lo       Hi  Length  Space\n");
	Log("=====  =======  =======  ======  =====\n");
	for (int HitIndex = 0; HitIndex < g_HitCount; ++HitIndex)
		LocalLogHit(HitIndex);
	}