File: SoloBarcode.cpp

package info (click to toggle)
rna-star 2.7.8a%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 3,076 kB
  • sloc: cpp: 20,429; awk: 483; ansic: 470; makefile: 181; sh: 31
file content (29 lines) | stat: -rw-r--r-- 936 bytes parent folder | download
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
#include "SoloBarcode.h"
#include "serviceFuns.cpp"
void SoloBarcode::sortWhiteList()
{
    totalSize=0;
    minLen=(uint32)-1;
    wlAdd.resize( wl.size() );
    for (uint32 ilen=1; ilen < wl.size(); ilen++) {//scan through different lengths for this CB
        wlAdd[ilen]=totalSize;
        if (wl[ilen].size()>0) {
            if (ilen<minLen)
                minLen=ilen;
            std::sort(wl[ilen].begin(),wl[ilen].end());//sort
            auto un1=std::unique(wl[ilen].begin(),wl[ilen].end());//collapse identical
            wl[ilen].resize(std::distance(wl[ilen].begin(),un1)); 
            totalSize += wl[ilen].size();            
        };
    };
};

void SoloBarcode::extractPositionsFromString(string &strIn)
{
    vector<string> p(4);
    splitString(strIn,'_',p);
    anchorType[0] = std::stoi(p[0]);
    anchorType[1] = std::stoi(p[2]);
    anchorDist[0] = std::stoi(p[1]);
    anchorDist[1] = std::stoi(p[3]);
};