You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Changed 32-bit int to 64-bit int when getting number of mapped reads to avoid overflow when displaying progress of how many reads have been mapped
Fixed specifying no-chain in the config file (previously, it was not being recognized)
Allow no-chain to take in arguments about what should be chained vs not chained.
Copy file name to clipboardExpand all lines: src/SplitCode.h
+48-21Lines changed: 48 additions & 21 deletions
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,14 @@
1
1
#ifndef SPLITCODE_H
2
2
#defineSPLITCODE_H
3
3
4
-
#defineSPLITCODE_VERSION"0.29.1"
4
+
#defineSPLITCODE_VERSION"0.29.2"
5
5
6
6
#include<string>
7
7
#include<iostream>
8
8
#include<vector>
9
9
#include<map>
10
10
#include<unordered_map>
11
+
#include<unordered_set>
11
12
#include<set>
12
13
#include<algorithm>
13
14
#include<sstream>
@@ -1428,7 +1429,26 @@ struct SplitCode {
1428
1429
std::string field;
1429
1430
std::string value;
1430
1431
ss >> field >> value;
1431
-
if (value.empty()) {
1432
+
if (field == "@qtrim-5") {
1433
+
this->quality_trimming_5 = true;
1434
+
} elseif (field == "@qtrim-3") {
1435
+
this->quality_trimming_3 = true;
1436
+
} elseif (field == "@qtrim-pre") {
1437
+
this->quality_trimming_pre = true;
1438
+
} elseif (field == "@qtrim-naive") {
1439
+
this->quality_trimming_naive = true;
1440
+
} elseif (field == "@phred64") {
1441
+
this->phred64 = true;
1442
+
} elseif (field == "@no-chain") {
1443
+
this->extract_no_chain = true;
1444
+
if (!value.empty()) {
1445
+
std::stringstream ss(value);
1446
+
std::string extract_val;
1447
+
while (std::getline(ss, extract_val, ',')) {
1448
+
this->extract_no_chain_set.insert(extract_val);
1449
+
}
1450
+
}
1451
+
} elseif (value.empty()) {
1432
1452
std::cerr << "Error: The file \"" << config_file << "\" contains an invalid line starting with @" << std::endl;
1433
1453
returnfalse;
1434
1454
}
@@ -1493,18 +1513,6 @@ struct SplitCode {
1493
1513
std::cerr << "Error: The file \"" << config_file << "\" specifies an invalid value for @qtrim" << std::endl;
1494
1514
returnfalse;
1495
1515
}
1496
-
} elseif (field == "@qtrim-5") {
1497
-
this->quality_trimming_5 = true;
1498
-
} elseif (field == "@qtrim-3") {
1499
-
this->quality_trimming_3 = true;
1500
-
} elseif (field == "@qtrim-pre") {
1501
-
this->quality_trimming_pre = true;
1502
-
} elseif (field == "@qtrim-naive") {
1503
-
this->quality_trimming_naive = true;
1504
-
} elseif (field == "@phred64") {
1505
-
this->phred64 = true;
1506
-
} elseif (field == "@no-chain") {
1507
-
this->extract_no_chain = true;
1508
1516
}
1509
1517
continue;
1510
1518
}
@@ -1762,8 +1770,8 @@ struct SplitCode {
1762
1770
}
1763
1771
}
1764
1772
1765
-
intgetNumMapped() {
1766
-
int nummapped = 0;
1773
+
int64_tgetNumMapped() {
1774
+
int64_t nummapped = 0;
1767
1775
for (auto& n : idcount) {
1768
1776
nummapped += n;
1769
1777
}
@@ -2564,6 +2572,8 @@ struct SplitCode {
2564
2572
voiddoUMIExtraction(std::string& seq, int pos, int k, int file, int readLength, std::map<int16_t, std::vector<int32_t>>& umi_seen, std::map<int16_t, std::vector<int32_t>>& umi_seen_copy,
0 commit comments