-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgRNA.cpp
More file actions
42 lines (37 loc) · 1 KB
/
gRNA.cpp
File metadata and controls
42 lines (37 loc) · 1 KB
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
//
// gRNA.cpp
// CasperOffTarget
//
// Created by Brian Mendoza on 3/19/18.
// Copyright © 2018 University of Tennessee. All rights reserved.
//
#include "pch.h"
#include "gRNA.h"
/*
std::string gRNA::get_Clocation() {
// need to uncompress location into long object
return compressed_location;
}
*/
//returns whether or not any putative hits were found somewhere on the genome.
bool gRNA::hasHits() {
if (putative_off_seq_ids.size() > 0) {
return true;
}
else { return false; }
}
void gRNA::addOffScore(double d, int c, long l, std::string s) {
offtargetwithscore myoff;
myoff.chromscaff = c;
myoff.position = l;
myoff.off_score = d;
myoff.sequence = s;
offhits.push_back(myoff);
}
std::string gRNA::offtargetscores() {
std::string return_string;
for (int i = 0;i < offhits.size();i++) {
return_string += std::to_string(offhits[i].off_score) + "," + std::to_string(offhits[i].chromscaff) + "," + std::to_string(offhits[i].position) + "," + offhits[i].sequence + "\n";
}
return return_string;
}