This file is indexed.

/usr/lib/emboss/include/embword.h is in emboss-lib 6.6.0-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
/* @include embword ***********************************************************
**
** Wordmatch routines
**
** @author Copyright (c) 1999 Gary Williams
** @version $Revision: 1.32 $
** @modified $Date: 2011/10/18 14:24:25 $ by $Author: rice $
** @@
**
** This library is free software; you can redistribute it and/or
** modify it under the terms of the GNU Lesser General Public
** License as published by the Free Software Foundation; either
** version 2.1 of the License, or (at your option) any later version.
**
** This library 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
** Lesser General Public License for more details.
**
** You should have received a copy of the GNU Lesser General Public
** License along with this library; if not, write to the Free Software
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
** MA  02110-1301,  USA.
**
******************************************************************************/

#ifndef EMBWORD_H
#define EMBWORD_H



/* ========================================================================= */
/* ============================= include files ============================= */
/* ========================================================================= */

#include "ajdefine.h"
#include "ajstr.h"
#include "ajseqdata.h"
#include "ajfeat.h"
#include "ajfile.h"
#include "ajlist.h"
#include "ajtable.h"

AJ_BEGIN_DECLS


/* ========================================================================= */
/* =============================== constants =============================== */
/* ========================================================================= */




/* ========================================================================= */
/* ============================== public data ============================== */
/* ========================================================================= */




/* @data EmbPWordMatch ********************************************************
**
** NUCLEUS data structure for word matches
**
** @attr seq1start [ajuint] match start point in original sequence
** @attr seq2start [ajuint] match start point in comparison sequence
** @attr sequence [const AjPSeq] need in case we build multiple matches here
**                         so we know which one the match belongs to
** @attr length [ajint] length of match
** @attr Padding [char[4]] Padding to alignment boundary
** @@
******************************************************************************/

typedef struct EmbSWordMatch {
  ajuint seq1start;
  ajuint seq2start;
  const AjPSeq sequence;
  ajint length;
  char Padding[4];
} EmbOWordMatch;
#define EmbPWordMatch EmbOWordMatch*




/* @data EmbPWord *************************************************************
**
** NUCLEUS data structure for words
**
** @attr fword [const char*] Original word
** @attr seqlocs [AjPTable] Table of word start positions in multiple sequences
** @attr count [ajint] Total number of locations in all sequences
** @attr Padding [char[4]] Padding to alignment boundary
** @@
******************************************************************************/

typedef struct EmbSWord {
  const char *fword;
  AjPTable seqlocs;
  ajint count;
  char Padding[4];
} EmbOWord;
#define EmbPWord EmbOWord*




/* @data EmbPWordSeqLocs ******************************************************
**
** NUCLEUS data structure for word locations in a given sequence
**
** @attr seq [const AjPSeq] Sequence for word start positions
** @attr locs [AjPList] List of word start positions in the sequence
** @@
******************************************************************************/

typedef struct EmbSWordSeqLocs {
  const AjPSeq seq;
  AjPList locs;
} EmbOWordSeqLocs;
#define EmbPWordSeqLocs EmbOWordSeqLocs*



/* @data EmbPWordRK ***********************************************************
**
** Data structure that extends EmbPWord objects for efficient access
** by Rabin-Karp search. It is constructed using embWordInitRabinKarpSearch
** method for a given sequence-set.
**
** Possible improvements could be achieved by scanning all other words
** during preprocessing to find out a minimum length that can be skipped
** safely when a word is matched.
**
** The first 5 fields (seqindxs-nseqs) are set during initialisation,
** and the last 3 fields (nMatches, lenMatches, nSeqMatches) are calculated
** during search.
**
** @attr word [const EmbPWord] Original word object
** @attr seqindxs [ajuint*] Positions in the seqset
**                          for each sequence the word has been seen
** @attr nnseqlocs [ajuint*] Number of word start positions for each sequence
** @attr locs [ajuint**] List of word start positions for each sequence
** @attr hash [ajulong] Hash value for the word
** @attr nseqs [ajuint] Number of pattern-sequences word has been seen
** @attr nMatches [ajuint] Number of matches in query sequences
** @attr lenMatches [ajulong] Total length of extended matches
** @attr nSeqMatches [ajuint*] Number of matches
**                            recorded on per pattern-sequence base
** @@
******************************************************************************/

typedef struct EmbSWordRK {
    const EmbPWord word;
    ajuint* seqindxs;
    ajuint* nnseqlocs;
    ajuint** locs;
    ajulong hash;
    ajuint nseqs;
    ajuint nMatches;
    ajulong lenMatches;
    ajuint* nSeqMatches;
} EmbOWordRK;

#define EmbPWordRK EmbOWordRK*




/* ========================================================================= */
/* =========================== public functions ============================ */
/* ========================================================================= */



/*
** Prototype definitions
*/

AjPList embWordBuildMatchTable (const AjPTable seq1MatchTable,
				const AjPSeq seq2, ajint orderit);
void    embWordClear (void);
void    embWordExit(void);
void    embWordFreeTable(AjPTable *table);
AjBool  embWordGetTable (AjPTable *table, const AjPSeq seq);
void    embWordLength (ajint wordlen);
AjBool  embWordMatchIter (AjIList iter, ajint* start1, ajint* start2,
			  ajint* len, const AjPSeq* seq);

EmbPWordMatch embWordMatchNew(const AjPSeq seq, ajuint seq1start,
	                      ajuint seq2start, ajint length);

void    embWordMatchListDelete (AjPList* plist);
void    embWordMatchListPrint (AjPFile file, const AjPList list);
void    embWordPrintTable  (const AjPTable table);
void    embWordPrintTableF (const AjPTable table, AjPFile outf);
void    embWordPrintTableFI (const AjPTable table, ajint mincount,
			     AjPFile outf);
void    embWordMatchListConvToFeat(const AjPList list,
				   AjPFeattable *tab1, AjPFeattable *tab2,
				   const AjPSeq seq1, const AjPSeq seq2);

void    embWordMatchMin(AjPList matchlist);
void    embWordUnused(void);

EmbPWordMatch embWordMatchFirstMax(const AjPList matches);

ajuint embWordRabinKarpSearch(const AjPStr sseq,
                              const AjPSeqset seqset,
                              EmbPWordRK const * patterns,
                              ajuint plen, ajuint nwords,
                              AjPList* l, ajuint* lastlocation,
                              AjBool checkmode);

ajuint embWordRabinKarpInit(const AjPTable table,
	                    EmbPWordRK** ewords, ajuint wordlen,
	                    const AjPSeqset seqset);

/*
** End of prototype definitions
*/


#ifdef AJ_COMPILE_DEPRECATED_BOOK
#endif
#ifdef AJ_COMPILE_DEPRECATED

__deprecated EmbPWordMatch embWordMatchListAppend(AjPList hitlist,
                                                  const AjPSeq seq,
                                                  const ajuint seq1start,
                                                  ajuint seq2start,
                                                  ajint length);

#endif

AJ_END_DECLS

#endif  /* !EMBWORD_H */