Clustal Omega  1.1.0
seq.h
Go to the documentation of this file.
1 /*********************************************************************
2  * Clustal Omega - Multiple sequence alignment
3  *
4  * Copyright (C) 2010 University College Dublin
5  *
6  * Clustal-Omega is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License as
8  * published by the Free Software Foundation; either version 2 of the
9  * License, or (at your option) any later version.
10  *
11  * This file is part of Clustal-Omega.
12  *
13  ********************************************************************/
14 
15 /*
16  * RCS $Id: seq.h 270 2011-11-16 07:27:31Z andreas $
17  */
18 
19 #ifndef CLUSTALO_SEQ_H
20 #define CLUSTALO_SEQ_H
21 
22 #include "squid/squid.h"
23 
24 #include "util.h"
25 
26 
32 #define SEQTYPE_UNKNOWN kOtherSeq
33 #define SEQTYPE_DNA kDNA
34 #define SEQTYPE_RNA kRNA
35 #define SEQTYPE_PROTEIN kAmino
36 
37 /* Alphabets are defined in squid.h: AMINO_ALPHABET, DNA_ALPHABET,
38  * RNA_ALPHABET (all uppercase)
39  */
40 #define AMINOACID_ANY 'X'
41 #define NUCLEOTIDE_ANY 'N'
42 
47 typedef struct {
48  int nseqs;
49  int seqtype;
50  char *filename;
51  bool aligned;
57  char **seq;
58 
63  char **orig_seq;
64 
109  SQINFO *sqinfo;
110 } mseq_t;
111 
112 extern void
113 AliStat(mseq_t *prMSeq, bool bSampling, bool bReportAll);
114 
115 extern void
116 AddSeq(mseq_t **prMSeqDest_p, char *pcSeqName, char *pcSeqRes);
117 
118 extern void
119 SeqSwap(mseq_t *mseq, int i, int j);
120 
121 extern void
122 DealignMSeq(mseq_t *mseq);
123 
124 extern const char *
125 SeqTypeToStr(int seqtype);
126 
127 extern int
128 ReadSequences(mseq_t *prMSeq_p, char *pcSeqFile,
129  int iSeqType, int iSeqFmt,
130  int iMaxNumSeq, int iMaxSeqLen);
131 
132 extern void
133 NewMSeq(mseq_t **mseq);
134 
135 extern void
136 FreeMSeq(mseq_t **mseq);
137 
138 extern void
139 CopyMSeq(mseq_t **prMSeqDest_p, mseq_t *prMSeqSrc);
140 
141 extern void
142 LogSqInfo(SQINFO *sqinfo);
143 
144 extern int
145 FindSeqName(char *seqname, mseq_t *mseq);
146 
147 extern int
148 WriteAlignment(mseq_t *mseq, const char *aln_outfile, int msafile_format);
149 
150 extern void
151 DealignSeq(char *seq);
152 
153 extern void
154 ShuffleMSeq(mseq_t *prMSeq);
155 
156 extern void
157 SortMSeqByLength(mseq_t *prMSeq, const char cOrder);
158 
159 void
160 JoinMSeqs(mseq_t **prMSeqDest_p, mseq_t *prMSeqToAdd);
161 
162 bool
163 SeqsAreAligned(mseq_t *prMSeq);
164 
165 #endif