1 /* -*- mode: c; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
3 /*********************************************************************
4 * Clustal Omega - Multiple sequence alignment
6 * Copyright (C) 2010 University College Dublin
8 * Clustal-Omega is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License as
10 * published by the Free Software Foundation; either version 2 of the
11 * License, or (at your option) any later version.
13 * This file is part of Clustal-Omega.
15 ********************************************************************/
18 * RCS $Id: clustalo-api-test.c 213 2011-03-11 16:10:15Z andreas $
24 /* Include clustal-omega's header. That's all you need
26 * If you developing in C++, use the following instead:
28 * #include "clustal-omega.h"
31 #include "clustal-omega.h"
35 main(int argc, char **argv)
37 /* the multiple sequence structure */
38 mseq_t *prMSeq = NULL;
39 /* for openmp: number of threads to use */
41 /* alignment options to use */
47 /* use LOGLEVEL_QUIET to make Clustal shut up */
48 iVerbosityLevel = LOGLEVEL_INFO;
50 SetDefaultAlnOpts(&rAlnOpts);
52 InitClustalOmega(iThreads);
54 /* Get sequence input file name from command line
57 Fatal("Need sequence file as argument");
59 pcSeqInfile = argv[1];
64 if (ReadSequences(prMSeq, pcSeqInfile,
67 Fatal("Reading sequence file '%s' failed", pcSeqInfile);
70 /* Dump some info about the sequences
72 for (iAux=0; iAux<prMSeq->nseqs; iAux++) {
74 "Sequence no %d has the following name: %s",
75 iAux, prMSeq->sqinfo[iAux].name);
77 "Sequence no %d has the following residues: %s",
78 iAux, prMSeq->seq[iAux]);
79 /* more info can be found in prMSeq->sqinfo[iAux] */
83 /* Align the sequences without a profile (NULL)
85 if (Align(prMSeq, NULL, & rAlnOpts)) {
86 Fatal("A fatal error happended during the alignment process");
90 /* Output of final alignment to stdout (NULL) as aligned fasta/a2m
92 if (WriteAlignment(prMSeq, NULL, MSAFILE_A2M)) {
93 Fatal("Could not save alignment");
98 Info(LOGLEVEL_INFO, "Successfull program exit");
102 /*** end of main() ***/