bowtieParser.c File Reference

Module to parse bowtie output files. More...

#include "format.h"
#include "log.h"
#include "linestream.h"
#include "common.h"
#include "bowtieParser.h"

Go to the source code of this file.

Functions

void bowtieParser_deInit (void)
 Deinitialize the bowtieParser module.
Array bowtieParser_getAllQueries ()
 Returns an Array of BowtieQueries.
void bowtieParser_initFromFile (char *fileName)
 Initialize the bowtieParser module from file.
void bowtieParser_initFromPipe (char *command)
 Initialize the bowtieParser module from pipe.
BowtieQuerybowtieParser_nextQuery (void)
 Returns a pointer to next BowtieQuery.


Detailed Description

Module to parse bowtie output files.

Author:
Lukas Habegger (lukas.habegger@yale.edu)

Definition in file bowtieParser.c.


Function Documentation

Array bowtieParser_getAllQueries (  ) 

Returns an Array of BowtieQueries.

Note:
The memory belongs to this routine.

Definition at line 236 of file bowtieParser.c.

void bowtieParser_initFromFile ( char *  fileName  ) 

Initialize the bowtieParser module from file.

Parameters:
[in] fileName File name, use "-" to denote stdin

Definition at line 24 of file bowtieParser.c.

void bowtieParser_initFromPipe ( char *  command  ) 

Initialize the bowtieParser module from pipe.

Parameters:
[in] command Command to be executed

Definition at line 36 of file bowtieParser.c.

BowtieQuery* bowtieParser_nextQuery ( void   ) 

Returns a pointer to next BowtieQuery.

Precondition:
The module has been initialized using bowtieParser_init(). Parse entries of the following format:
  
   Output (obtained from running bowtie -h)
   ----------------------------------------

   The 'bowtie' aligner outputs each alignment on a separate line.  Each
   line is a collection of 8 fields separated by tabs; from left to
   right, the fields are:

    1. Name of read that aligned

    2. Orientation of read in the alignment, '-' for reverse complement,
       '+' otherwise

    3. Name of reference sequence where alignment occurs, or ordinal ID
       if no name was provided

    4. 0-based offset into the reference sequence where leftmost
       character of the alignment occurs

    5. Read sequence (reverse-complemented if orientation is '-')

    6. Read qualities (reversed if orientation is '-')

    7. Reserved

    8. Comma-separated list of mismatch descriptors.  If there are no
       mismatches in the alignment, this field is empty.  A single
       descriptor has the format offset:reference-base>read-base.  The
       offset is expressed as a 0-based offset from the high-quality
       (5') end of the read. 


    Example:

    FC20B5TAA_50708:2:1:246:339 	-	chr8	74005895	TAGATGTGTGGTATTATTTCTGAGGGC	IIIIIIIIIIIIIIIIIIIIIIIIIII	785	
    FC20B5TAA_50708:2:1:246:339 	-	chr16	80796190	TAGATGTGTGGTATTATTTCTGAGGGC	IIIIIIIIIIIIIIIIIIIIIIIIIII	785	
    FC20B5TAA_50708:2:1:624:321 	+	chr1	240849136	GGCTTAAAAGCTAGATGACGGGGTGAG	IIIIIIIIIIIIIIIIIIIIIIIIIII	0	9:C>G,26:T>G
    FC20B5TAA_50708:2:1:624:321 	-	chrX	98759270	CTCACCCCGTCATCTAGCTTTTAAGCC	IIIIIIIIIIIIIIIIIIIIIIIIIII	2	22:A>C,26:A>C
    FC20B5TAA_50708:2:1:624:321 	-	chr10	84291740	CTCACCCCGTCATCTAGCTTTTAAGCC	IIIIIIIIIIIIIIIIIIIIIIIIIII	2	22:A>C,26:A>C
    FC20B5TAA_50708:2:1:624:321 	-	chr4	93757480	CTCACCCCGTCATCTAGCTTTTAAGCC	IIIIIIIIIIIIIIIIIIIIIIIIIII	2	22:A>C,26:A>C
    FC20B5TAA_50708:2:1:624:321 	-	chr2	57057350	CTCACCCCGTCATCTAGCTTTTAAGCC	IIIIIIIIIIIIIIIIIIIIIIIIIII	0	22:A>C,24:T>C
    FC20B5TAA_50708:2:1:624:321 	+	chr2	178610898	GGCTTAAAAGCTAGATGACGGGGTGAG	IIIIIIIIIIIIIIIIIIIIIIIIIII	0	22:T>G,26:T>G
    FC20B5TAA_50708:2:1:624:321 	-	chr4	31274212	CTCACCCCGTCATCTAGCTTTTAAGCC	IIIIIIIIIIIIIIIIIIIIIIIIIII	0	9:G>C,26:A>C
    FC20B5TAA_50708:2:1:624:321 	-	chr20	35191648	CTCACCCCGTCATCTAGCTTTTAAGCC	IIIIIIIIIIIIIIIIIIIIIIIIIII	2	9:G>C,22:A>C

   

Definition at line 225 of file bowtieParser.c.


Generated on Fri Aug 7 15:46:42 2009 for BIOS by  doxygen 1.5.7.1