Clustal Omega  1.2.1
Macros | Functions | Variables
clustal-omega.c File Reference
#include <assert.h>
#include "clustal-omega.h"
#include "hhalign/general.h"
#include "clustal/hhalign_wrapper.h"
Include dependency graph for clustal-omega.c:

Macros

#define INDIRECT_HMM   0 /* temp flag: (1) write aln to file, use system(hmmer/hhmake), (0) internal hhmake */
 
#define USEHMMER   1 /* temp flag: use system(hmmer) to build HMM */
 
#define USEHHMAKE   (!USEHMMER) /* temp flag: use system(hhmake) to build HMM */
 
#define SHUFFLE_INPUT_SEQ_ORDER   0
 
#define SORT_INPUT_SEQS   0
 
#define LINE_WRAP   60
 
#define LINE_WRAP   60
 
#define PRINT_TAIL   5
 

Functions

void PrintLongVersion (char *pcStr, int iSize)
 Print Long version information to pre-allocated char. More...
 
void FreeAlnOpts (opts_t *prAlnOpts)
 free aln opts members More...
 
void SetDefaultAlnOpts (opts_t *prOpts)
 Sets members of given user opts struct to default values. More...
 
void AlnOptsLogicCheck (opts_t *prOpts)
 Check logic of parsed user options. Will exit (call Log(&rLog, LOG_FATAL, )) on Fatal logic error. More...
 
void PrintAlnOpts (FILE *prFile, opts_t *prOpts)
 FIXME doc. More...
 
int HmmerVersion ()
 Returns major version of HMMER. Whichever hmmbuild version is found first in your PATH will be used. More...
 
int AlnToHHMFile (mseq_t *prMSeq, char *pcHMMOut)
 Create a HHM file from aligned sequences. More...
 
int AlnToHMMFile (mseq_t *prMSeq, const char *pcHMMOut)
 Create a HMM file from aligned sequences. More...
 
int AlnToHMM (hmm_light *prHMM, mseq_t *prMSeq)
 Convert a multiple sequence structure into a HMM. More...
 
void InitClustalOmega (int iNumThreadsRequested)
 FIXME. More...
 
void SequentialAlignmentOrder (int **piOrderLR_p, int iNumSeq)
 Defines an alignment order, which adds sequences sequentially, i.e. one at a time starting with seq 1 & 2. More...
 
int AlignmentOrder (int **piOrderLR_p, double **pdSeqWeights_p, mseq_t *prMSeq, int iPairDistType, char *pcDistmatInfile, char *pcDistmatOutfile, int iClusteringType, int iClustersizes, char *pcGuidetreeInfile, char *pcGuidetreeOutfile, char *pcClusterFile, bool bUseMbed, bool bPercID)
 Defines the alignment order by calculating a guide tree. In a first-step pairwise distances will be calculated (or read from a file). In a second step those distances will be clustered and a guide-tree created. Steps 1 and 2 will be skipped if a guide-tree file was given, in which case the guide-tree will be just read from the file. More...
 
void SetAutoOptions (opts_t *prOpts, int iNumSeq)
 Set some options automatically based on number of sequences. Might overwrite some user-set options. More...
 
int Align (mseq_t *prMSeq, mseq_t *prMSeqProfile, opts_t *prOpts)
 The main alignment function which wraps everything else. More...
 
int AlignProfiles (mseq_t *prMSeqProfile1, mseq_t *prMSeqProfile2, hhalign_para rHhalignPara)
 Align two profiles, ie two sets of prealigned sequences. Already aligned columns won't be changed. More...
 
int ReadPseudoCountParams (hhalign_para *rHhalignPara_p, char *pcPseudoFile)
 read pseudo-count 'fudge' parameters from file More...
 

Variables

int iNumberOfThreads
 

Macro Definition Documentation

#define INDIRECT_HMM   0 /* temp flag: (1) write aln to file, use system(hmmer/hhmake), (0) internal hhmake */
#define LINE_WRAP   60
#define LINE_WRAP   60
#define PRINT_TAIL   5
#define SHUFFLE_INPUT_SEQ_ORDER   0
#define SORT_INPUT_SEQS   0
#define USEHHMAKE   (!USEHMMER) /* temp flag: use system(hhmake) to build HMM */
#define USEHMMER   1 /* temp flag: use system(hmmer) to build HMM */

Function Documentation

int Align ( mseq_t prMSeq,
mseq_t prMSeqProfile,
opts_t prOpts 
)

The main alignment function which wraps everything else.

Parameters
[out]prMSeqthe multiple sequences structure
[in]prMSeqProfileoptional profile to align against
[in]prOptsalignment options to use
Returns
0 on success, -1 on failure
Warning
old structure used to be initialised like this: hmm_light rHMM = {0};
int AlignmentOrder ( int **  piOrderLR_p,
double **  pdSeqWeights_p,
mseq_t prMSeq,
int  iPairDistType,
char *  pcDistmatInfile,
char *  pcDistmatOutfile,
int  iClusteringType,
int  iClustersizes,
char *  pcGuidetreeInfile,
char *  pcGuidetreeOutfile,
char *  pcClusterFile,
bool  bUseMbed,
bool  bPercID 
)

Defines the alignment order by calculating a guide tree. In a first-step pairwise distances will be calculated (or read from a file). In a second step those distances will be clustered and a guide-tree created. Steps 1 and 2 will be skipped if a guide-tree file was given, in which case the guide-tree will be just read from the file.

Parameters
[out]piOrderLR_porder in which nodes/profiles are to be merged/aligned
[out]pdSeqWeights_pSequence weights
[out]pdSeqWeights_pSequence weights
[in]prMSeqThe sequences from which the alignment order is to be calculated
[in]iPairDistTypeMethod of pairwise distance comparison
[in]pcDistmatInfileIf not NULL distances will be read from this file instead of being calculated
[in]pcDistmatOutfileIf not NULL computed pairwise distances will be written to this file
[in]iClusteringTypeClustering method to be used to cluster the pairwise distances
[in]pcGuidetreeInfileIf not NULL guidetree will be read from this file. Skips pairwise distance and guidetree computation
[in]pcGuidetreeOutfileIf not NULL computed guidetree will be written to this file
[in]bUseMbedIf TRUE, fast mBed guidetree computation will be employed
Returns
Non-zero on error
int AlignProfiles ( mseq_t prMSeqProfile1,
mseq_t prMSeqProfile2,
hhalign_para  rHhalignPara 
)

Align two profiles, ie two sets of prealigned sequences. Already aligned columns won't be changed.

Parameters
[out]prMSeqProfile1First profile/aligned set of sequences. Merged alignment will be found in here.
[in]prMSeqProfile2First profile/aligned set of sequences
[in]rHhalignParaFIXME
Returns
0 on success, -1 on failure
void AlnOptsLogicCheck ( opts_t prOpts)

Check logic of parsed user options. Will exit (call Log(&rLog, LOG_FATAL, )) on Fatal logic error.

Parameters
[in]prOptsAlready parsed user options
int AlnToHHMFile ( mseq_t prMSeq,
char *  pcHMMOut 
)

Create a HHM file from aligned sequences.

Warning
Should be eliminated in the future as building routine should not create intermediate files
Parameters
[in]prMSeqAligned mseq_t
[in]pcHMMOutHMM output file name
Returns
Non-zero on error
int AlnToHMM ( hmm_light *  prHMM,
mseq_t prMSeq 
)

Convert a multiple sequence structure into a HMM.

Parameters
[out]prHMMPointer to preallocted HMM which will be set here
[in]prMSeqPointer to an alignment
Returns
0 on error, non-0 otherwise
See Also
AlnToHMMFile()
Warning
the following probably won't work on windows: missing /tmp/. Should be ok on Cygwin though
int AlnToHMMFile ( mseq_t prMSeq,
const char *  pcHMMOut 
)

Create a HMM file from aligned sequences.

Warning
Should be replaced in the future by some internal HMM building routine that does not call external programs
Parameters
[in]prMSeqAligned mseq_t
[in]pcHMMOutHMM output file name
Returns
Non-zero on error
void FreeAlnOpts ( opts_t prAlnOpts)

free aln opts members

int HmmerVersion ( )

Returns major version of HMMER. Whichever hmmbuild version is found first in your PATH will be used.

Returns
-1 on error, major hmmer version otherwise
void InitClustalOmega ( int  iNumThreadsRequested)

FIXME.

void PrintAlnOpts ( FILE *  prFile,
opts_t prOpts 
)

FIXME doc.

void PrintLongVersion ( char *  pcStr,
int  iSize 
)

Print Long version information to pre-allocated char.

Note
short version information is equivalent to PACKAGE_VERSION
Parameters
[out]pcStrchar pointer to write to preallocated to hold iSize chars.
[in]iSizesize of pcStr
int ReadPseudoCountParams ( hhalign_para *  rHhalignPara_p,
char *  pcPseudoFile 
)

read pseudo-count 'fudge' parameters from file

Parameters
[out]rHhalignPara_pstructure that holds several hhalign parameters
[in]pcPseudoFilename of file with pseudo-count information. format must be collection of pairs of lines where one line specifies name of parameter (gapb,gapd,gape,gapf,gapg,gaph,gapi,pca,pcb,pcc,gapbV,gapdV,gapeV,gapfV,gapgV,gaphV,gapiV,pcaV,pcbV,pccV) followed by second line with the (double) value of this parameter.

order of parameters is not fixed, not all parameters have to be set

void SequentialAlignmentOrder ( int **  piOrderLR_p,
int  iNumSeq 
)

Defines an alignment order, which adds sequences sequentially, i.e. one at a time starting with seq 1 & 2.

Parameters
[out]piOrderLR_porder in which nodes/profiles are to be merged/aligned
[in]iNumSeqNumber of sequences
See Also
TraverseTree()
void SetAutoOptions ( opts_t prOpts,
int  iNumSeq 
)

Set some options automatically based on number of sequences. Might overwrite some user-set options.

Parameters
[out]prOptsPointer to alignment options structure
[in]iNumSeqNumber of sequences to align
void SetDefaultAlnOpts ( opts_t prOpts)

Sets members of given user opts struct to default values.

Parameters
[out]prOptsUser opt struct to initialise

Variable Documentation

int iNumberOfThreads