Browse code

add package to the repository

msa


git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/msa@102253 bc3139a8-67e5-0310-9ffc-ced21a209358

Sonali Arora authored on 10/04/2015 00:12:33
Showing1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,176 @@
1
+/* -*- mode: c; tab-width: 4; c-basic-offset: 4;  indent-tabs-mode: nil -*- */
2
+
3
+/*********************************************************************
4
+ * Clustal Omega - Multiple sequence alignment
5
+ *
6
+ * Copyright (C) 2010 University College Dublin
7
+ *
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.
12
+ *
13
+ * This file is part of Clustal-Omega.
14
+ *
15
+ ********************************************************************/
16
+
17
+/*
18
+ *  RCS $Id: clustal-omega.h 212 2011-03-10 15:09:46Z andreas $
19
+ */
20
+
21
+#ifndef CLUSTALO_H
22
+#define CLUSTALO_H
23
+
24
+
25
+
26
+#ifdef HAVE_OPENMP
27
+#include <omp.h>
28
+#endif
29
+#include <stdbool.h>
30
+
31
+#include "clustal-omega-config.h"
32
+
33
+/* the following needs to be kept in sync with library_include_HEADERS of all
34
+ * subdir Makefile.am's 
35
+ */
36
+
37
+/* hhalign */
38
+#include "hhalign/general.h"
39
+#include "hhalign/hhfunc.h"
40
+
41
+
42
+/* clustal */
43
+#include "clustal/log.h"
44
+#include "clustal/util.h"
45
+#include "clustal/symmatrix.h"
46
+#include "clustal/tree.h"
47
+#include "clustal/seq.h"
48
+#include "clustal/mbed.h"
49
+#include "clustal/weights.h"
50
+#include "clustal/pair_dist.h"
51
+#include "clustal/hhalign_wrapper.h"
52
+
53
+
54
+
55
+#define CLUSTERING_UNKNOWN 0
56
+#define CLUSTERING_UPGMA 1
57
+
58
+/* weights will be computed if 1. but are not really used for now and they
59
+ * might slow things down. also, mbed's screws up branch lengths which will
60
+ * have a negative effect on weights 
61
+*/
62
+#define USE_WEIGHTS 0
63
+
64
+extern int iNumberOfThreads;
65
+
66
+/* output order */
67
+enum {INPUT_ORDER = 0, TREE_ORDER};
68
+
69
+
70
+/** user/commandline options
71
+ *
72
+ * changes here will have to be reflected in ParseCommandLine()
73
+ * and during setup of the default opts
74
+ *
75
+ */
76
+typedef struct {
77
+    /* auto: Clustal (know what) is good for you
78
+     */
79
+    bool bAutoOptions;
80
+
81
+    /* Distance matrix
82
+     */
83
+    /** distance matrix input file */
84
+    char *pcDistmatInfile;
85
+    /** distance matrix output file */
86
+    char *pcDistmatOutfile;
87
+    
88
+    /* Clustering / guide-tree
89
+     */
90
+    /** clustering type (from cmdline arg) */
91
+    int iClusteringType;
92
+    /** number of sequences in cluster */
93
+    int iClustersizes; 
94
+    /** file with clustering information */
95
+    char *pcClustfile; 
96
+    /** pairwise distance method */
97
+    int iPairDistType;
98
+    /** use mbed-like clustering */
99
+    bool bUseMbed;
100
+    /** use mbed-like clustering also during iteration */
101
+    bool bUseMbedForIteration;
102
+    /** guidetree output file */
103
+    char *pcGuidetreeOutfile;
104
+    /** guidetree input file */
105
+    char *pcGuidetreeInfile;
106
+    /** use Kimura corrected distance */
107
+    bool bUseKimura;
108
+    /** print percentage identity */
109
+    bool bPercID;
110
+
111
+    /* HMMs
112
+     */
113
+    /** HMM input files. index range: 0..iHMMInputFiles */
114
+    char **ppcHMMInput;
115
+    /** number of provided HMM input files. not really a user
116
+       option but need for ppcHMMInput */
117
+    int iHMMInputFiles;
118
+
119
+    /* Iteration
120
+     */
121
+    /** number of iterations */
122
+    int iNumIterations;
123
+    /** determine number of iterations automatically */
124
+	bool bIterationsAuto;
125
+    /** maximum number of hmm iterations */
126
+    int iMaxHMMIterations;
127
+    /** max number of guidetree iterations */
128
+	int iMaxGuidetreeIterations;
129
+    
130
+    hhalign_para rHhalignPara;
131
+
132
+    /* changes here will have to be reflected in FreeAlnOpts(),
133
+	 * SetDefaultAlnOpts(), AlnOptsLogicCheck() etc 
134
+	 */
135
+} opts_t;
136
+
137
+
138
+
139
+extern void 
140
+PrintLongVersion(char *pcStr, int iSize);
141
+
142
+extern void
143
+SetDefaultAlnOpts(opts_t *opts);
144
+
145
+extern void
146
+FreeAlnOpts(opts_t *aln_opts);
147
+
148
+extern void
149
+AlnOptsLogicCheck(opts_t *opts);
150
+
151
+extern void
152
+PrintAlnOpts(FILE *prFile, opts_t *opts);
153
+
154
+extern void
155
+InitClustalOmega(int iNumThreadsToUse);
156
+
157
+extern void
158
+SequentialAlignmentOrder(int **piOrderLR_p, int iNumSeq);
159
+
160
+extern int
161
+AlignmentOrder(int **piOrderLR_p, double **pdSeqWeights_p, mseq_t *prMSeq,
162
+               int iPairDistType, char *pcDistmatInfile, char *pcDistmatOutfile,
163
+               int iClusteringType, int iClustersizes,
164
+               char *pcGuidetreeInfile, char *pcGuidetreeOutfile, char *pcClusterFile,
165
+               bool bUseMBed, bool bPercID);
166
+
167
+extern int
168
+Align(mseq_t *prMSeq, 
169
+      mseq_t *prMSeqProfile,
170
+	  opts_t *prOpts);
171
+
172
+extern int
173
+AlignProfiles(mseq_t *prMSeqProfile1, 
174
+			  mseq_t *prMSeqProfile2, hhalign_para rHhalignPara);
175
+
176
+#endif