[med-svn] [Git][med-team/kallisto][master] 6 commits: New upstream version 0.46.0+dfsg
Andreas Tille
gitlab at salsa.debian.org
Wed Aug 7 12:04:28 BST 2019
Andreas Tille pushed to branch master at Debian Med / kallisto
Commits:
c28e1ce9 by Andreas Tille at 2019-08-07T11:00:53Z
New upstream version 0.46.0+dfsg
- - - - -
82b4a2eb by Andreas Tille at 2019-08-07T11:00:55Z
Update upstream source from tag 'upstream/0.46.0+dfsg'
Update to upstream version '0.46.0+dfsg'
with Debian dir 75162b3653733ab7d723329a1270b91bc8999ac7
- - - - -
af4e7a0b by Andreas Tille at 2019-08-07T11:00:56Z
New upstream version
- - - - -
59404856 by Andreas Tille at 2019-08-07T11:00:56Z
debhelper-compat 12
- - - - -
1826e5ff by Andreas Tille at 2019-08-07T11:00:58Z
Standards-Version: 4.4.0
- - - - -
8cd6d157 by Andreas Tille at 2019-08-07T11:03:18Z
Upload to unstable
- - - - -
6 changed files:
- debian/changelog
- − debian/compat
- debian/control
- src/BUSData.h
- src/common.h
- src/main.cpp
Changes:
=====================================
debian/changelog
=====================================
@@ -1,3 +1,11 @@
+kallisto (0.46.0+dfsg-1) unstable; urgency=medium
+
+ * New upstream version
+ * debhelper-compat 12
+ * Standards-Version: 4.4.0
+
+ -- Andreas Tille <tille at debian.org> Wed, 07 Aug 2019 13:01:05 +0200
+
kallisto (0.45.1+dfsg-1) unstable; urgency=medium
* Initial release (Closes: #925417)
=====================================
debian/compat deleted
=====================================
@@ -1 +0,0 @@
-12
=====================================
debian/control
=====================================
@@ -3,11 +3,11 @@ Maintainer: Debian Med Packaging Team <debian-med-packaging at lists.alioth.debian.
Uploaders: Andreas Tille <tille at debian.org>
Section: science
Priority: optional
-Build-Depends: debhelper (>= 12~),
+Build-Depends: debhelper-compat (= 12),
cmake,
libhdf5-dev,
libhts-dev
-Standards-Version: 4.3.0
+Standards-Version: 4.4.0
Vcs-Browser: https://salsa.debian.org/med-team/kallisto
Vcs-Git: https://salsa.debian.org/med-team/kallisto.git
Homepage: https://pachterlab.github.io/kallisto
=====================================
src/BUSData.h
=====================================
@@ -18,6 +18,11 @@ struct BUSHeader {
std::string text;
std::vector<BUSTranscript> transcripts;
std::vector<std::vector<int32_t>> ecs;
+ uint32_t version;
+ uint32_t bclen;
+ uint32_t umilen;
+ BUSHeader() : version(0), bclen(0), umilen(0) {}
+
};
struct BUSData {
@@ -26,8 +31,8 @@ struct BUSData {
int32_t ec;
uint32_t count;
uint32_t flags;
-
- BUSData() : barcode(0), UMI(0), ec(-1), count(0), flags(0) {}
+ uint32_t pad;
+ BUSData() : barcode(0), UMI(0), ec(-1), count(0), flags(0), pad(0) {}
};
uint64_t stringToBinary(const std::string &s, uint32_t &flag);
=====================================
src/common.h
=====================================
@@ -1,7 +1,7 @@
#ifndef KALLISTO_COMMON_H
#define KALLISTO_COMMON_H
-#define KALLISTO_VERSION "0.45.1"
+#define KALLISTO_VERSION "0.46.0"
#include <string>
#include <vector>
=====================================
src/main.cpp
=====================================
@@ -600,6 +600,106 @@ void ParseOptionsBus(int argc, char **argv, ProgramOptions& opt) {
}
+bool ParseTechnology(const std::string &techstr, std::vector<BUSOptionSubstr> &values, std::vector<int> &files, std::vector<std::string> &errorList, std::vector<BUSOptionSubstr> &bcValues) {
+ int lastIndex = 0; //the last place in the string a colon and punctuation was found
+ int currValue = 1; //tells us the index of the three sequences needed barcode, umi, sequence
+ vector<int> numbers; //stores the numbers in a pairs
+ const char punctuationCompare = ',';
+ const char colonCompare = ':';
+ bool colon;
+ bool duplicate = false;
+ std::string stringVal;
+ int val;
+
+ for(int i = 1; i < techstr.length(); i++) {
+ colon = false;
+ if(techstr[i] == colonCompare) {
+ colon = true;
+ }
+
+ if(techstr[i] == punctuationCompare || colon) {
+ stringVal = techstr.substr(lastIndex, i-lastIndex);
+ try {
+ val = stoi(stringVal);
+ numbers.push_back(val);
+ if(numbers.size() == 1) {
+ if(!files.empty()) {
+ for(int j = 0; j < files.size(); j++) {
+ if(val == files[j]) {
+ duplicate = true;
+ break;
+ }
+ }
+ if(!duplicate) {
+ files.push_back(val);
+ } else {
+ duplicate = false;
+ }
+ } else {
+ files.push_back(val);
+ }
+ }
+ lastIndex = i + 1;
+ } catch(const std:: invalid_argument& ia) {
+ errorList.push_back("Error: Invalid argument");
+ return true;
+ }
+
+ if(colon) {
+ if(numbers.size() != 3) {
+ errorList.push_back("Error: Wrong number of pairs provided");
+ return true;
+ }
+ }
+ }
+ if(numbers.size() == 3) {
+ if(currValue == 1) {
+ bcValues.push_back(BUSOptionSubstr(numbers[0], numbers[1], numbers[2]));
+ } else {
+ values.push_back(BUSOptionSubstr(numbers[0], numbers[1], numbers[2]));
+ }
+ numbers.clear();
+ }
+ if(colon) {
+ currValue++;
+ }
+ }
+
+ if (files.empty()) {
+ errorList.push_back(std::string("Error: parsing technology string \"") + techstr + "\"");
+ return true;
+ }
+
+ std::sort(files.begin(), files.end());
+ for(int k = 0; k < files.size()-1; k++) {
+ if(files[k]+1 != files[k+1]) {
+ errorList.push_back("Error: files aren't correctly referenced");
+ return true;
+ }
+ }
+
+ stringVal = techstr.substr(lastIndex, techstr.length()-lastIndex);
+ if(numbers.size() == 2) {
+ try {
+ val = stoi(stringVal);
+ numbers.push_back(val);
+ values.push_back(BUSOptionSubstr(numbers[0], numbers[1], numbers[2]));
+ numbers.clear();
+ } catch(const std:: invalid_argument& ia) {
+ errorList.push_back("Error: Invalid argument");
+ return true;
+ }
+ } else {
+ errorList.push_back("Error: Wrong number of pairs provided");
+ return true;
+ }
+ if(currValue != 3) {
+ errorList.push_back("Error: Wrong number of substrings provided");
+ return true;
+ }
+ return false;
+}
+
void ParseOptionsH5Dump(int argc, char **argv, ProgramOptions& opt) {
int peek_flag = 0;
@@ -762,8 +862,25 @@ bool CheckOptionsBus(ProgramOptions& opt) {
busopt.umi = BUSOptionSubstr(0,6,16);
busopt.bc.push_back(BUSOptionSubstr(0,0,6));
} else {
- cerr << "Unknown technology: " << opt.technology << endl;
- ret = false;
+ vector<int> files;
+ vector<BUSOptionSubstr> values;
+ vector<BUSOptionSubstr> bcValues;
+ vector<std::string> errorList;
+ bool invalid = ParseTechnology(opt.technology, values, files, errorList, bcValues);
+ if(!invalid) {
+ busopt.nfiles = files.size();
+ for(int i = 0; i < bcValues.size(); i++) {
+ busopt.bc.push_back(bcValues[i]);
+ }
+ busopt.umi = values[0];
+ busopt.seq = values[1];
+ } else {
+ for(int j = 0; j < errorList.size(); j++) {
+ cerr << errorList[j] << endl;
+ }
+ cerr << "Unable to create technology: " << opt.technology << endl;
+ ret = false;
+ }
}
}
View it on GitLab: https://salsa.debian.org/med-team/kallisto/compare/d08a75bc8a878b650f6f9d05038f20a2a8b1c800...8cd6d157945be4e834617827620010270a23d848
--
View it on GitLab: https://salsa.debian.org/med-team/kallisto/compare/d08a75bc8a878b650f6f9d05038f20a2a8b1c800...8cd6d157945be4e834617827620010270a23d848
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20190807/d5cd877e/attachment-0001.html>
More information about the debian-med-commit
mailing list