annotate mrsfast-2.3.0.2/Output.h @ 0:ec628ba33878 default tip

Uploaded source code for mrsFAST
author calkan
date Tue, 21 Feb 2012 10:39:28 -0500
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
1 /*
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
2 * Copyright (c) <2008 - 2009>, University of Washington, Simon Fraser University
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
3 * All rights reserved.
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
4 *
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
5 * Redistribution and use in source and binary forms, with or without modification,
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
6 * are permitted provided that the following conditions are met:
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
7 *
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
8 * Redistributions of source code must retain the above copyright notice, this list
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
9 * of conditions and the following disclaimer.
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
10 * - Redistributions in binary form must reproduce the above copyright notice, this
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
11 * list of conditions and the following disclaimer in the documentation and/or other
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
12 * materials provided with the distribution.
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
13 * - Neither the name of the <ORGANIZATION> nor the names of its contributors may be
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
14 * used to endorse or promote products derived from this software without specific
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
15 * prior written permission.
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
16 *
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
17 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
18 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
19 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
20 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
21 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
22 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
23 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
24 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
25 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
26 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
27 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
28 */
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
29
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
30 /*
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
31 * Author : Faraz Hach
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
32 * Email : fhach AT cs DOT sfu
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
33 * Last Update : 2009-12-08
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
34 */
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
35
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
36
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
37 #ifndef __OUTPUT__
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
38 #define __OUTPUT__
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
39
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
40 #define FORWARD 0
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
41 #define REVERSE 1
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
42
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
43 typedef struct
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
44 {
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
45 char *tag;
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
46 char type;
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
47 char cVal;
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
48 int iVal;
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
49 float fVal;
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
50 char *sVal;
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
51 } OPT_FIELDS;
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
52
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
53 typedef struct
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
54 {
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
55 char *QNAME;
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
56 short FLAG;
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
57 char *RNAME;
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
58 int POS;
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
59 unsigned char MAPQ;
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
60 char *CIGAR;
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
61 char *MRNAME;
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
62 int MPOS;
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
63 int ISIZE;
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
64 char *SEQ;
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
65 char *QUAL;
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
66
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
67 int optSize;
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
68 OPT_FIELDS *optFields;
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
69 } SAM;
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
70
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
71 int initOutput(char *fileName, int compressed);
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
72 void (*finalizeOutput)();
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
73 void (*output)(SAM map);
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
74
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
75
ec628ba33878 Uploaded source code for mrsFAST
calkan
parents:
diff changeset
76 #endif