forked from maip/novo_muta
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pileup_utility.h
35 lines (29 loc) · 1.02 KB
/
pileup_utility.h
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
/**
* @file pileup_utility.h
* @author Melissa Ip
*
* This file contains methods to parse and align the the sequences in .pileup
* files. Pileup files must be in the format described here:
*
* http://samtools.sourceforge.net/pileup.shtml
*
* This can create a TrioModel object using the parsed sequencing reads,
* and write the probability of mutation to a text file.
*/
#ifndef PILEUP_UTILITY_H
#define PILEUP_UTILITY_H
#include <fstream>
#include <iterator>
#include <sstream>
#include "trio_model.h"
// Any greater probability than this number is printed.
const double kThreshold = 0.01;
// Forward declarations.
string GetSequence(string &line);
string TrimHeader(ifstream &f);
ReadData GetReadData(const string &line);
double GetProbability(TrioModel ¶ms, const string &child_line,
const string &mother_line, const string &father_line);
void ProcessPileup(const string &file_name, const string &child_pileup,
const string &mother_pileup, const string &father_pileup);
#endif