comparison srf2fastq/io_lib-1.12.2/man/man3/ExperimentFile.3 @ 0:d901c9f41a6a default tip

Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
author dawe
date Tue, 07 Jun 2011 17:48:05 -0400
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:d901c9f41a6a
1 .TH ExperimentFile 3 "" "" "Staden Package"
2
3 .SH NAME
4
5 .LP
6 .BR exp_read_info ,
7 .BR exp_fread_info ,
8 .BR exp_create_info ,
9 .BR exp_destroy_info ,
10 .BR exp_create_range ,
11 .BR exp_extract_range ,
12 .BR exp_get_feature_index ,
13 .BR exp_get_int ,
14 .BR exp_get_rng ,
15 .BR exp_get_str ,
16 .BR exp_put_int ,
17 .BR exp_put_rng ,
18 .BR exp_put_str ,
19 .BR exp_print_line ,
20 .BR exp_print_seq ,
21 .BR exp_print_file ,
22 .BR opos2str ,
23 .BR str2opos ,
24 .BR conf2str ,
25 .BR str2conf
26 \- Manipulations of the Experiment File format
27
28 .IX "exp_read_info()" "" "exp_read_info()"
29 .IX "exp_fread_info()" "" "exp_fread_info()"
30 .IX "exp_create_info()" "" "exp_create_info()"
31 .IX "exp_destroy_info()" "" "exp_destroy_info()"
32 .IX "exp_create_range()" "" "exp_create_range()"
33 .IX "exp_extract_range()" "" "exp_extract_range()"
34 .IX "exp_get_feature_index()" "" "exp_get_feature_index()"
35 .IX "exp_get_int()" "" "exp_get_int()"
36 .IX "exp_get_rng()" "" "exp_get_rng()"
37 .IX "exp_get_str()" "" "exp_get_str()"
38 .IX "exp_put_int()" "" "exp_put_int()"
39 .IX "exp_put_rng()" "" "exp_put_rng()"
40 .IX "exp_put_str()" "" "exp_put_str()"
41 .IX "exp_print_line()" "" "exp_print_line()"
42 .IX "exp_print_seq()" "" "exp_print_seq()"
43 .IX "exp_print_file()" "" "exp_print_file()"
44 .IX "opos2str()" "" "opos2str()"
45 .IX "str2opos()" "" "str2opos()"
46 .IX "conf2str()" "" "conf2str()"
47 .IX "str2conf()" "" "str2conf()"
48
49 .SH SYNOPSIS
50 .LP
51 .nf
52 .ft B
53 #include <expFileIO.h>
54
55 .nf
56 .ft B
57 Exp_info *exp_read_info(
58 char *file);
59 .ft
60 .fi
61 .LP
62 .nf
63 .ft B
64 Exp_info *exp_fread_info(
65 FILE *fp);
66 .ft
67 .fi
68 .LP
69 .nf
70 .ft B
71 Exp_info *exp_create_info();
72 .ft
73 .fi
74 .LP
75 .nf
76 .ft B
77 void exp_destroy_info(
78 Exp_info *e);
79 .ft
80 .fi
81 .LP
82 .nf
83 .ft B
84 char *exp_create_range(
85 char *str,
86 int start,
87 int end);
88 .ft
89 .fi
90 .LP
91 .nf
92 .ft B
93 int exp_extract_range(
94 char *str,
95 int *start,
96 int *end);
97 .ft
98 .fi
99 .LP
100 .nf
101 .ft B
102 int exp_get_feature_index(
103 char *e);
104 .ft
105 .fi
106 .LP
107 .nf
108 .ft B
109 int exp_get_int(
110 Exp_info *e,
111 int id,
112 int *val);
113 .ft
114 .fi
115 .LP
116 .nf
117 .ft B
118 int exp_get_rng(
119 Exp_info *e,
120 int id,
121 int *from,
122 int *to);
123 .ft
124 .fi
125 .LP
126 .nf
127 .ft B
128 int exp_get_str(
129 Exp_info *e,
130 int id,
131 char *s,
132 f_implicit s_l);
133 .ft
134 .fi
135 .LP
136 .nf
137 .ft B
138 int exp_put_int(
139 Exp_info *e,
140 int id,
141 int *val);
142 .ft
143 .fi
144 .LP
145 .nf
146 .ft B
147 int exp_put_rng(
148 Exp_info *e,
149 int id,
150 int *from,
151 int *to);
152 .ft
153 .fi
154 .LP
155 .nf
156 .ft B
157 int exp_put_str(
158 Exp_info *e,
159 int id,
160 char *s,
161 f_implicit s_l);
162 .ft
163 .fi
164 .LP
165 .nf
166 .ft B
167 int exp_print_line(
168 FILE *fp,
169 Exp_info *e,
170 int eflt,
171 int i);
172 .ft
173 .fi
174 .LP
175 .nf
176 .ft B
177 int exp_print_seq(
178 FILE *fp,
179 Exp_info *e,
180 int eflt,
181 int i);
182 .ft
183 .fi
184 .LP
185 .nf
186 .ft B
187 void exp_print_file(
188 FILE *fp,
189 Exp_info *e);
190 .ft
191 .fi
192 .LP
193 .nf
194 .ft B
195 char *opos2str(
196 int2 *opos,
197 int len,
198 char *buf);
199 .ft
200 .fi
201 .LP
202 .nf
203 .ft B
204 int str2opos(
205 int2 *opos,
206 char *buf);
207 .ft
208 .fi
209 .LP
210 .nf
211 .ft B
212 char *conf2str(
213 int1 *conf,
214 int len,
215 char *buf);
216 .ft
217 .fi
218 .LP
219 .nf
220 .ft B
221 int str2conf(
222 int1 *conf,
223 char *buf);
224 .ft
225 .fi
226
227 .SH DESCRIPTION
228 .LP
229 These functions manipulate Experiment Files. They include functions for
230 reading, writing, and editing the files. The principle structure used by the
231 routines is the \fBExp_info\fR structure. This is as follows.
232 .EX 5
233 .ft B
234 #define MAXIMUM_EFLT_LENGTH 4
235 #define MAXIMUM_EFLTS 48
236 #define EXP_FILE_LINE_LENGTH 128
237
238 typedef Array Exp_entries;
239
240 typedef struct {
241 Array entries[MAXIMUM_EFLTS]; /* array of array of entries */
242 int Nentries[MAXIMUM_EFLTS]; /* array of number of entries */
243 FILE *fp;
244 } Exp_info;
245
246 #define NULL_Exp_info ( (Exp_info *) NULL )
247 .ft
248 .EE
249 .LP
250 For the purposes of simple and efficient coding, each line on an experiment
251 file must be smaller than the defined EXP_FILE_LINE_LENGTH, which is 128
252 characters.
253 .LP
254 Many functions take an experiment file line type identifier as an argument.
255 These functions are listed in the prototypes as taking \fBint id\fR. Here
256 \fBid\fR should be specified using one of the macros defining in the header
257 file. They take the form of \fBEFLT_\fRXX where XX is the line type. For
258 instance, the \fBID\fR line type identifier should be written as
259 \fBEFLT_ID\fR.
260 .LP
261 The C functions available follow. Some FORTRAN interfaces are also available,
262 but these are not documented. See the include file for their prototypes.
263 .LP
264 .B exp_read_info
265 and
266 .B exp_fread_info
267 read an experiment file into an allocated \fBExp_info\fR structure. If
268 successful, the structure pointer is return. Otherwise the null pointer is
269 returned.
270 .LP
271 .B exp_create_info
272 allocates and initialises a new, blank, \fBExp_info\fR structure. If
273 successful, the structure pointer is return. Otherwise the null pointer is
274 returned.
275 .LP
276 .B exp_destroy_info
277 deallocates an \fBExp_info\fR structure.
278 .LP
279 .B exp_create_range
280 creates a string using the experiment file range format of "start..stop". This
281 format is used by the AQ, ON, TG and TC line types. The buffer specified
282 should be large enough to hold the string. The function returns the \fBstr\fR
283 pointer supplied as an argument.
284 .LP
285 .B exp_extract_range
286 extracts the start and end values from the string representation of a range;
287 "start..stop". The values are stored in the integer pointers sent as
288 arguments. If successful, the function returns 0. Otherwise -1 is returned.
289 .LP
290 .B exp_get_feature_index
291 converts from a string representation of an experiment file line type to the
292 integer value. For example, \fBexp_get_feature_index("SQ")\fR returns the
293 integer 22, which is the same as the \fBEFLT_SQ\fR definition.
294 .LP
295 .B exp_get_int
296 obtains the integer value held in a specific line type. The value is stored in
297 the integer pointer \fBval\fR. If successful, the function returns 0.
298 Otherwise 1 is returned.
299 .LP
300 .B exp_get_rng
301 obtains the range values held in a specific line type. The values are stored in
302 the integer pointers \fBfrom\fR and \fBto\fR. If successful, the function
303 returns 0. Otherwise 1 is returned.
304 .LP
305 .B exp_get_str
306 obtains the string value held in a specific line type. The value is stored in
307 the string \fBs\fR. At most \fBs_l\fR characters are copied. If successful,
308 the function returns 0. Otherwise 1 is returned.
309 .LP
310 .B exp_put_int
311 writes the integer pointed to by \fBval\fR to the specified line type. If
312 successful, the function returns 0. Otherwise 1 is returned.
313 .LP
314 .B exp_put_rng
315 writes the range pointed to by \fBfrom\fR and \fBto\fR to the specified line
316 type. If successful, the function returns 0. Otherwise 1 is returned.
317 .LP
318 .B exp_put_str
319 writes the string \fBs\fR of length \fBs_l\fR to the specified line type. If
320 successful, the function returns 0. Otherwise 1 is returned.
321 .LP
322 .B exp_print_line
323 outputs all entries of the specified type to the specified file pointer.
324 .LP
325 .B exp_print_seq
326 .LP
327 .B exp_print_file
328 outputs all entries of all line types to the specified file pointer.
329 .LP
330 .B opos2str
331 converts an array of original positions held in \fBopos\fR with \fBlen\fR
332 elements to a string suitable for use in the ON line type. The \fBbuf\fR
333 should be large enough to hold the string, which in the worst case will be
334 4 * sequence length. Returns \fBbuf\fR.
335 .LP
336 .B str2opos
337 converts the experiment file original position string held in \fBbuf\fR to an
338 array of original positions to be stored in \fBopos\fR. \fBopos\fR must be
339 large enough to hold the data, hence it should be of the same length as the
340 sequence. Returns the number of elements written to the \fBopos\fR array.
341 .LP
342 .B conf2str
343 converts an array of confidence values helf in \fBconf\dR with \fBlen\fR
344 elements to a string suitable for use in the AV line type. The \fBbuf\fR
345 should be large enough to hold the string, which in the worst case will be
346 4 * sequence length. Returns \fBbuf\fR.
347 .LP
348 .B str2conf
349 convers the experiment file confidence values string held in \fBbuf\fR to an
350 array of confidence values to be stored in \fBconf\fR. \fBconf\fR must be
351 large enough to hold the data, hence it should be of the same length as the
352 sequence. Returns the number of elements written to the \fBconf\fR array.
353
354 .SH SEE ALSO
355 .LP
356 .BR ExperimentFile (4)