-
Notifications
You must be signed in to change notification settings - Fork 0
/
kalignP_input.h
135 lines (116 loc) · 5.01 KB
/
kalignP_input.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
/*
kalignP_input.h
Copyright (C) 2010 Nanjiang Shu <[email protected]>
Department of Biochemistry and Biophysics
Stockholm University
Description: multiple sequence alignment supporting external supplied
position specific gap penalties
This software is derived from
Kalign version 2.03, Copyright (C) 2006 Timo Lassmann
http://msa.cgb.ki.se/
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
A copy of this license is in the COPYING file.
*/
#include <unistd.h>
#include <string.h>
#include <ctype.h>
#define SEEK_START 0
#define SEEK_END 2
struct alignment* read_sequences(struct alignment* aln,char* string);
struct alignment* read_sequences_new(struct alignment* aln,char* string);
struct alignment* read_sequences_from_swissprot(struct alignment* aln,char* string);
struct alignment* read_sequences_uniprot_xml(struct alignment* aln,char* string);
struct alignment* read_sequences_macsim_xml(struct alignment* aln,char* string);
struct feature* read_ft(struct feature* ft,char* p);
struct alignment* read_sequences_clustal(struct alignment* aln,char* string);
struct alignment* read_sequences_stockholm(struct alignment* aln,char* string);
struct alignment* read_alignment(struct alignment* aln,char* string);
struct alignment* read_alignment_from_swissprot(struct alignment* aln,char* string);
struct alignment* read_alignment_uniprot_xml(struct alignment* aln,char* string);
struct alignment* read_alignment_macsim_xml(struct alignment* aln,char* string);
struct feature* read_ft(struct feature* ft,char* p);
struct alignment* read_alignment_clustal(struct alignment* aln,char* string);
struct alignment* read_alignment_stockholm(struct alignment* aln,char* string);
char* get_input_into_string(char* string,char* infile);
int count_sequences_macsim(char* string);
int count_sequences_swissprot(char* string);
int count_sequences_uniprot(char* string);
int count_sequences_stockholm(char* string);
int count_sequences_clustalw(char* string);
int count_sequences_fasta(char* string);
static char usage[] = "\n\
Usage: kalignP [INFILE] [OUTFILE] [OPTIONS]\n\
\n\
Options:\n\n\
-s, -gapopen Gap open penalty\n\
-gap_open\n\
-gpo\n\
\n\
-e, -gapextension Gap extension penalty\n\
-gap_ext\n\
-gpe\n\
\n\
-t, -terminal_gap_extension_penalty Terminal gap penalties\n\
-tgpe\n\
\n\
-m, -matrix_bonus A constant added to the substitution matrix.\n\
-bonus\n\
\n\
-c, -sort The order in which the sequences appear in the output alignment.\n\
<input, tree, gaps.>\n\
\n\
-g, -feature Selects feature mode and specifies which features are to be used:\n\
e.g. all, maxplp, STRUCT, PFAM-A....\n\
-same_feature_score Score for aligning same features\n\
-diff_feature_score Penalty for aligning different features\n\
\n\
-d, -distance Distance method.\n\
<wu,pair>\n\
\n\
-b, -guide-tree Guide tree method.\n\
-tree <nj,upgma>\n\
\n\
-z, -zcutoff Parameter used in the wu-manber based distance calculation\n\
\n\
-i, -input The input file.\n\
-infile\n\
-in\n\
\n\
-o, -output The output file.\n\
-outfile\n\
-out\n\
\n\
-a, -gap_inc Parameter increases gap penalties depending on the number of existing gaps\n\
\n\
-f, -format The output format:\n\
<fasta, msf, aln, clu, macsim>\n\
\n\
-custom_matrix <FILE> Supply the user defined substitution matrix\n\
\n\
-protein Force the input type as protein sequences\n\
\n\
-q, -quiet Print nothing to STDERR.\n\
Read nothing from STDIN\n\
\n\
Examples:\n\n\
Using pipes:\n\
kalignP [OPTIONS] < [INFILE] > [OUTFILE]\n\
more [INFILE] | kalignP [OPTIONS] > [OUTFILE]\n\
\n\
Relaxed gap penalties:\n\
kalignP -gpo 60 -gpe 9 -tgpe 0 -bonus 0 < [INFILE] > [OUTFILE]\n\
\n\
Feature alignment with pairwise alignment based distance method and NJ guide tree:\n\
kalignP -in test.xml -distance pair -tree nj -sort gaps -feature STRUCT -format macsim -out test.macsim\n\
";