Clustal Omega  1.0.3
src/clustal/seq.h
Go to the documentation of this file.
00001 /*********************************************************************
00002  * Clustal Omega - Multiple sequence alignment
00003  *
00004  * Copyright (C) 2010 University College Dublin
00005  *
00006  * Clustal-Omega is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU General Public License as
00008  * published by the Free Software Foundation; either version 2 of the
00009  * License, or (at your option) any later version.
00010  *
00011  * This file is part of Clustal-Omega.
00012  *
00013  ********************************************************************/
00014 
00015 /*
00016  *  RCS $Id: seq.h 234 2011-04-13 05:26:16Z andreas $
00017  */
00018 
00019 #ifndef CLUSTALO_SEQ_H
00020 #define CLUSTALO_SEQ_H
00021 
00022 #include "squid/squid.h"
00023 
00024 #include "util.h"
00025 
00026 
00032 #define SEQTYPE_UNKNOWN kOtherSeq
00033 #define SEQTYPE_DNA kDNA
00034 #define SEQTYPE_RNA kRNA
00035 #define SEQTYPE_PROTEIN kAmino
00036 
00037 /* Alphabets are defined in squid.h: AMINO_ALPHABET, DNA_ALPHABET,
00038  * RNA_ALPHABET (all uppercase)
00039  */
00040 #define AMINOACID_ANY 'X'
00041 #define NUCLEOTIDE_ANY 'N'
00042 
00047 typedef struct {
00048     int nseqs; 
00049     int seqtype; 
00050     char *filename; 
00051     bool aligned; 
00057     char **seq;
00058     
00063     char **orig_seq;
00064     
00109     SQINFO *sqinfo; 
00110 } mseq_t;
00111 
00112 extern void
00113 AliStat(mseq_t *prMSeq, bool bSampling, bool bReportAll);
00114 
00115 extern void
00116 AddSeq(mseq_t **prMSeqDest_p, char *pcSeqName, char *pcSeqRes);
00117 
00118 extern void
00119 SeqSwap(mseq_t *mseq, int i, int j);
00120 
00121 extern void
00122 DealignMSeq(mseq_t *mseq);
00123 
00124 extern const char *
00125 SeqTypeToStr(int seqtype);
00126 
00127 extern int
00128 ReadSequences(mseq_t *prMSeq_p, char *pcSeqFile, int iSeqType,
00129   int iMaxNumSeq, int iMaxSeqLen);
00130 
00131 extern void
00132 NewMSeq(mseq_t **mseq);
00133 
00134 extern void
00135 FreeMSeq(mseq_t **mseq);
00136 
00137 extern void
00138 CopyMSeq(mseq_t **prMSeqDest_p, mseq_t *prMSeqSrc);
00139 
00140 extern void
00141 LogSqInfo(SQINFO *sqinfo);
00142 
00143 extern int
00144 FindSeqName(char *seqname, mseq_t *mseq);
00145 
00146 extern int
00147 WriteAlignment(mseq_t *mseq, const char *aln_outfile, int msafile_format);
00148 
00149 extern void
00150 DealignSeq(char *seq);
00151 
00152 extern void
00153 ShuffleMSeq(mseq_t *prMSeq);
00154 
00155 extern void
00156 SortMSeqByLength(mseq_t *prMSeq, const char cOrder);
00157 
00158 void
00159 JoinMSeqs(mseq_t **prMSeqDest_p, mseq_t *prMSeqToAdd);
00160 
00161 bool
00162 SeqsAreAligned(mseq_t *prMSeq);
00163 
00164 #endif