| Line | |
|---|
| 1 | #include "muscle.h" |
|---|
| 2 | #include "textfile.h" |
|---|
| 3 | #include "seqvect.h" |
|---|
| 4 | #include "distfunc.h" |
|---|
| 5 | #include "msa.h" |
|---|
| 6 | #include "tree.h" |
|---|
| 7 | #include "clust.h" |
|---|
| 8 | #include "profile.h" |
|---|
| 9 | #include "clustsetmsa.h" |
|---|
| 10 | |
|---|
| 11 | void ProfDB() |
|---|
| 12 | { |
|---|
| 13 | SetOutputFileName(g_pstrOutFileName); |
|---|
| 14 | SetInputFileName(g_pstrFileName2); |
|---|
| 15 | SetStartTime(); |
|---|
| 16 | |
|---|
| 17 | TextFile file1(g_pstrFileName1); |
|---|
| 18 | TextFile file2(g_pstrFileName2); |
|---|
| 19 | |
|---|
| 20 | SetMaxIters(g_uMaxIters); |
|---|
| 21 | SetSeqWeightMethod(g_SeqWeight1); |
|---|
| 22 | |
|---|
| 23 | TextFile fileIn(g_pstrFileName1); |
|---|
| 24 | MSA msa1; |
|---|
| 25 | msa1.FromFile(fileIn); |
|---|
| 26 | |
|---|
| 27 | const unsigned uSeqCount1 = msa1.GetSeqCount(); |
|---|
| 28 | if (0 == uSeqCount1) |
|---|
| 29 | Quit("No sequences in input alignment"); |
|---|
| 30 | |
|---|
| 31 | SeqVect v; |
|---|
| 32 | v.FromFASTAFile(file2); |
|---|
| 33 | const unsigned uSeqCount2 = v.Length(); |
|---|
| 34 | if (0 == uSeqCount2) |
|---|
| 35 | Quit("No sequences in input alignment"); |
|---|
| 36 | |
|---|
| 37 | MSA::SetIdCount(uSeqCount1 + uSeqCount2); |
|---|
| 38 | SetProgressDesc("Align sequence database to profile"); |
|---|
| 39 | for (unsigned uSeqIndex = 0; uSeqIndex < uSeqCount2; ++uSeqIndex) |
|---|
| 40 | { |
|---|
| 41 | Progress(uSeqIndex, uSeqCount2); |
|---|
| 42 | Seq &s = *(v[uSeqIndex]); |
|---|
| 43 | s.SetId(0); |
|---|
| 44 | MSA msaTmp; |
|---|
| 45 | msaTmp.FromSeq(s); |
|---|
| 46 | MSA msaOut; |
|---|
| 47 | ProfileProfile(msa1, msaTmp, msaOut); |
|---|
| 48 | msa1.Copy(msaOut); |
|---|
| 49 | } |
|---|
| 50 | ProgressStepsDone(); |
|---|
| 51 | |
|---|
| 52 | TextFile fileOut(g_pstrOutFileName, true); |
|---|
| 53 | msa1.ToFile(fileOut); |
|---|
| 54 | } |
|---|
Note: See
TracBrowser
for help on using the repository browser.