Clustal Omega 1.2.4
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 296 2014-10-07 12:15:41Z fabian $
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
47typedef struct {
48 int nseqs;
49 int seqtype;
50 char *filename;
51 bool aligned;
57 char **seq;
58
63 char **orig_seq;
64
68
113 SQINFO *sqinfo;
114
115 /* HMM batch information */
118} mseq_t;
119
120extern void
121AliStat(mseq_t *prMSeq, bool bSampling, bool bReportAll);
122
123extern void
124AddSeq(mseq_t **prMSeqDest_p, char *pcSeqName, char *pcSeqRes);
125
126extern void
127SeqSwap(mseq_t *mseq, int i, int j);
128
129extern void
130DealignMSeq(mseq_t *mseq);
131
132extern const char *
133SeqTypeToStr(int seqtype);
134
135extern int
136ReadSequences(mseq_t *prMSeq_p, char *pcSeqFile,
137 int iSeqType, int iSeqFmt, bool bIsProfile, bool bDealignInputSeqs,
138 int iMaxNumSeq, int iMaxSeqLen, char *pcHMMBatch);
139
140extern void
141NewMSeq(mseq_t **mseq);
142
143extern void
144FreeMSeq(mseq_t **mseq);
145
146extern void
147CopyMSeq(mseq_t **prMSeqDest_p, mseq_t *prMSeqSrc);
148
149extern void
150LogSqInfo(SQINFO *sqinfo);
151
152extern int
153FindSeqName(char *seqname, mseq_t *mseq);
154
155extern int
156WriteAlignment(mseq_t *mseq, const char *aln_outfile, int msafile_format, int iWrap, bool bResno);
157
158extern void
159DealignSeq(char *seq);
160
161extern void
162ShuffleMSeq(mseq_t *prMSeq);
163
164extern void
165SortMSeqByLength(mseq_t *prMSeq, const char cOrder);
166
167void
168JoinMSeqs(mseq_t **prMSeqDest_p, mseq_t *prMSeqToAdd);
169
170bool
171SeqsAreAligned(mseq_t *prMSeq, bool bIsProfile, bool bDealignInputSeqs);
172
173#endif
void DealignMSeq(mseq_t *mseq)
Dealigns all sequences in mseq structure, updates the sequence length info and sets aligned to FALSE.
Definition seq.c:302
void AddSeq(mseq_t **prMSeqDest_p, char *pcSeqName, char *pcSeqRes)
Creates a new sequence entry and appends it to an existing mseq structure.
Definition seq.c:1217
void ShuffleMSeq(mseq_t *prMSeq)
Shuffle mseq order.
Definition seq.c:228
const char * SeqTypeToStr(int seqtype)
convert int-encoded iSeqType to string
Definition seq.c:376
void SortMSeqByLength(mseq_t *prMSeq, const char cOrder)
Sort sequences by length.
Definition seq.c:1057
void SeqSwap(mseq_t *mseq, int i, int j)
Swap two sequences in an mseq_t structure.
Definition seq.c:262
bool SeqsAreAligned(mseq_t *prMSeq, bool bIsProfile, bool bDealignInputSeqs)
Checks if sequences in given mseq structure are aligned. By definition this is only true,...
Definition seq.c:1112
void CopyMSeq(mseq_t **prMSeqDest_p, mseq_t *prMSeqSrc)
copies an mseq structure
Definition seq.c:744
void LogSqInfo(SQINFO *sqinfo)
debug output of sqinfo struct
Definition seq.c:327
int FindSeqName(char *seqname, mseq_t *mseq)
Definition seq.c:791
void AliStat(mseq_t *prMSeq, bool bSampling, bool bReportAll)
Stripped down version of squid's alistat.
Definition seq.c:60
int ReadSequences(mseq_t *prMSeq_p, char *pcSeqFile, int iSeqType, int iSeqFmt, bool bIsProfile, bool bDealignInputSeqs, int iMaxNumSeq, int iMaxSeqLen, char *pcHMMBatch)
reads sequences from file
Definition seq.c:420
void DealignSeq(char *seq)
Removes all gap-characters from a sequence.
Definition seq.c:1025
void JoinMSeqs(mseq_t **prMSeqDest_p, mseq_t *prMSeqToAdd)
Appends an mseq structure to an already existing one. filename will be left untouched.
Definition seq.c:1275
void FreeMSeq(mseq_t **mseq)
Frees an mseq_t and it's members and zeros all members.
Definition seq.c:817
int WriteAlignment(mseq_t *mseq, const char *aln_outfile, int msafile_format, int iWrap, bool bResno)
Write alignment to file.
Definition seq.c:884
void NewMSeq(mseq_t **mseq)
allocate and initialise new mseq_t
Definition seq.c:714
structure for storing multiple sequences
Definition seq.h:47
int seqtype
Definition seq.h:49
char *** pppcHMMBNames
Definition seq.h:116
int nseqs
Definition seq.h:48
char ** seq
Definition seq.h:57
char * filename
Definition seq.h:50
int ** ppiHMMBindex
Definition seq.h:117
char ** orig_seq
Definition seq.h:63
bool aligned
Definition seq.h:51
SQINFO * sqinfo
Squid's sequence info structure. Index range: 0–nseq-1.
Definition seq.h:113
int * tree_order
Definition seq.h:67