ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/gclib/tophat_cpp/utils.h
Revision: 158
Committed: Sun Jan 29 19:42:10 2012 UTC (8 years, 7 months ago) by gpertea
File size: 825 byte(s)
Log Message:
Line File contents
1 #ifndef UTILS_H
2 #define UTILS_H
3 /*
4 * utils.h
5 * TopHat
6 *
7 * Created by Daehwan Kim on 12/28/11.
8 * Copyright 2011 Daehwan Kim. All rights reserved.
9 *
10 */
11
12 #include <vector>
13 #include <string>
14 using namespace std;
15
16 #include "common.h"
17
18 // this is for parallelization purposes in segment_juncs, long_spanning_reads, and tophat_reports.
19 // given "index" files, it calculates "read ids" in increasing order and
20 // their corresponding file offsets.
21 bool calculate_offsets(const vector<string>& fnames,
22 vector<uint64_t>& ids,
23 vector<vector<int64_t> >& offsets);
24
25 // given "read ids" as reference read ids,
26 // it finds the closest read ids (with file offsets) not greater than them.
27 void calculate_offsets_from_ids(const string& fname,
28 const vector<uint64_t>& ids,
29 vector<int64_t>& offsets);
30
31 #endif