Mercurial > repos > dawe > srf2fastq
comparison srf2fastq/io_lib-1.12.2/man/man3/read_reading.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 read_reading 3 "" "" "Staden Package" | |
2 | |
3 .SH NAME | |
4 | |
5 .LP | |
6 .BR read_reading , | |
7 .BR fread_reading | |
8 \- Read a trace file into a \fBRead\fR structure. | |
9 | |
10 .SH SYNOPSIS | |
11 .LP | |
12 .nf | |
13 .ft B | |
14 #include <Read.h> | |
15 | |
16 .nf | |
17 .ft B | |
18 Read *read_reading( | |
19 char *filename, | |
20 int format); | |
21 .ft | |
22 .fi | |
23 .LP | |
24 .nf | |
25 .ft B | |
26 Read *fread_reading( | |
27 FILE *fp, | |
28 char *filename, | |
29 int format); | |
30 .ft | |
31 .fi | |
32 .IX "read_reading()" "" "read_reading()" | |
33 .IX "fread_reading()" "" "fread_reading()" | |
34 | |
35 .SH DESCRIPTION | |
36 .LP | |
37 These functions read trace files into a \fBRead\fR structure. A variety of | |
38 formats are supported including ABI, ALF and SCF. (Note that the first two are | |
39 only supported when the library is used as part of the Staden Package.) | |
40 Additionally, support for reading the plain (old) staden format files and | |
41 Experiment files is included. Compressed trace files may also be read. | |
42 Decompression is performed using either \fBgzip -d\fR or \fBuncompress\fR and | |
43 is written to a temporary file for further processing. The temporary file is | |
44 then read and removed. | |
45 .LP | |
46 When reading an experiment file the trace file referenced by the LN and LT | |
47 line types is read. The QL, QR (left and right quality clips), SL and SR | |
48 (left and right vector clips) are taken from the Experiment file to produce | |
49 the cutoff information held within the \fBRead\fR structure. The | |
50 \fBorig_trace\fR field of the \fBRead\fR structure will then contain the | |
51 pointer to the experiment file structure and the \fBorig_trace_format\fR field | |
52 will be set to \fBTT_EXP\fR. | |
53 .LP | |
54 The functions allocate a \fBRead\fR structure which is returned. To deallocate | |
55 this structure use the \fBread_deallocate()\fR function. | |
56 .LP | |
57 .B read_reading() | |
58 reads a trace from the specified filename and format. Formats available are | |
59 .BR TT_SCF , | |
60 .BR TT_ABI , | |
61 .BR TT_ALF , | |
62 .BR TT_PLN , | |
63 .BR TT_EXP and | |
64 .BR TT_ANY . | |
65 Specifying format \fBTT_ANY\fR will attempt to automatically detect the corret | |
66 format type by analysing the trace file for magic numbers and composition. The | |
67 \fBformat\fR field of the structure can then be used to determine the real | |
68 trace type. | |
69 .LP | |
70 .B fread_reading() | |
71 reads a trace from the specified file pointer. The filename argument is used | |
72 for setting the \fBtrace_name\fR field of the resulting structure, and for | |
73 error messages. Otherwise the function is identical to the | |
74 \fBread_reading()\fR function. | |
75 .LP | |
76 The \fBRead\fR structure itself is as follows. | |
77 .EX 5 | |
78 .ft B | |
79 typedef uint_2 TRACE; /* for trace heights */ | |
80 | |
81 typedef struct | |
82 { | |
83 int format; /* Trace file format */ | |
84 char *trace_name; /* Trace file name */ | |
85 | |
86 int NPoints; /* No. of points of data */ | |
87 int NBases; /* No. of bases */ | |
88 | |
89 /* Traces */ | |
90 TRACE *traceA; /* Array of length `NPoints' */ | |
91 TRACE *traceC; /* Array of length `NPoints' */ | |
92 TRACE *traceG; /* Array of length `NPoints' */ | |
93 TRACE *traceT; /* Array of length `NPoints' */ | |
94 TRACE maxTraceVal; /* The maximal value in any trace */ | |
95 | |
96 /* Bases */ | |
97 char *base; /* Array of length `NBases' */ | |
98 uint_2 *basePos; /* Array of length `NBases' */ | |
99 | |
100 /* Cutoffs */ | |
101 int leftCutoff; /* Number of unwanted bases */ | |
102 int rightCutoff; /* Number of unwanted bases */ | |
103 | |
104 /* Miscellaneous Sequence Information */ | |
105 char *info; /* misc seq info, eg comments */ | |
106 | |
107 /* Probability information */ | |
108 char *prob_A; /* Array of length 'NBases' */ | |
109 char *prob_C; /* Array of length 'NBases' */ | |
110 char *prob_G; /* Array of length 'NBases' */ | |
111 char *prob_T; /* Array of length 'NBases' */ | |
112 | |
113 /* The original input format data, or NULL if inapplicable */ | |
114 int orig_trace_format; | |
115 void *orig_trace; | |
116 | |
117 } Read; | |
118 .EE | |
119 .ft | |
120 .LP | |
121 | |
122 .SH RETURN VALUES | |
123 .LP | |
124 On successful completion, the \fBread_reading()\fR and \fBfread_reading()\fR | |
125 functions return a pointer to a \fBRead\fR structure. Otherwise these | |
126 functions return NULLRead (which is a null pointer). | |
127 | |
128 .SH SEE ALSO | |
129 .LP | |
130 .BR write_reading (3), | |
131 .BR fwrite_reading (3), | |
132 .BR deallocate_reading (3), | |
133 .BR scf (4), | |
134 .br | |
135 .BR ExperimentFile (4) |