File: BlasrMiscs.hpp

package info (click to toggle)
blasr 5.3.5%2Bdfsg-7
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 1,196 kB
  • sloc: cpp: 8,412; ansic: 806; python: 331; sh: 178; java: 158; makefile: 36
file content (56 lines) | stat: -rw-r--r-- 2,497 bytes parent folder | download | duplicates (5)
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
// Author: Mark Chaisson
#pragma once

#include "BlasrHeaders.h"

//-------------------------Fetch Reads----------------------------//
template <typename T_Sequence>
bool GetNextReadThroughSemaphore(ReaderAgglomerate &reader, MappingParameters &params,
                                 T_Sequence &read, std::string &readGroupId, int &associatedRandInt,
                                 MappingSemaphores &semaphores);

//---------------------MAKE & CHECK READS-------------------------//
//FIXME: move to SMRTSequence
bool ReadHasMeaningfulQualityValues(FASTQSequence &sequence);

//FIXME: Move to SMRTSequence
// Given a SMRT sequence and a subread interval, make the subread.
// Input:
//   smrtRead         - a SMRT sequence
//   subreadInterval  - a subread interval
//   params           - mapping parameters
// Output:
//   subreadSequence - the constructed subread
void MakeSubreadOfInterval(SMRTSequence &subreadSequence, SMRTSequence &smrtRead,
                           ReadInterval &subreadInterval, MappingParameters &params);

//FIXME: Move to SMRTSequence
// Given a SMRT sequence and one of its subreads, make the
// reverse complement of the subread in the coordinate of the
// reverse complement sequence of the SMRT sequence.
// Input:
//   smrtRead          - a SMRT read
//   subreadSequence   - a subread of smrtRead
// Output:
//   subreadSequenceRC - the reverse complement of the subread
//                       in the coordinate of the reverse
//                       complement of the SMRT read.
void MakeSubreadRC(SMRTSequence &subreadSequenceRC, SMRTSequence &subreadSequence,
                   SMRTSequence &smrtRead);

// Construct subreads invervals from subreads
void MakeSubreadIntervals(std::vector<SMRTSequence> &subreads,
                          std::vector<ReadInterval> &subreadIntervals);

// Return index of subread which will be used as concordant template.
// If Zmw has exactly one subread, return index of the subread (i.e., 0).
// If Zmw has exactly two subreads, return index of the longer subread.
// If Zmw has three or more subreads, return index of the median-length
// subread in range subreadIntervals[1:-1]. Avoid using the first and last
// subreads (which are less likely to be full-pass) if possible.
int GetIndexOfConcordantTemplate(const std::vector<ReadInterval> &subreadIntervals);

//-------------------------MISC-----------------------------------//
int CountZero(unsigned char *ptr, int length);

#include "BlasrMiscsImpl.hpp"