File: multaln.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 (29 lines) | stat: -rwxr-xr-x 742 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
#include "pilercr.h"
#include "multaln.h"

void MultipleAlign(SeqVect &Seqs, MSA &Aln)
	{
	assert(Seqs.GetSeqCount() > 0);
	if ((int) Seqs.GetSeqCount() > g_MaxMSASeqs)
		Quit("Array length %u, max is %d", Seqs.GetSeqCount(), g_MaxMSASeqs);

	if (Seqs.GetSeqCount() == 1)
		{
		Seq &s = Seqs.GetSeq(0);
		s.SetId(0);
		Aln.FromSeq(s);
		return;
		}

	unsigned uSeqCount = Seqs.GetSeqCount();
	MSA::SetIdCount(g_MaxMSASeqs);

// Initialize sequence ids.
// From this point on, ids must somehow propogate from here.
	for (unsigned uSeqIndex = 0; uSeqIndex < uSeqCount; ++uSeqIndex)
		Seqs.SetSeqId(uSeqIndex, uSeqIndex);

	Tree GuideTree;
	GetGuideTree(Seqs, GuideTree);
	ProgressiveAlign(Seqs, GuideTree, Aln);
	}