Comments (1)
I am no expert in C++ but this fixed my installation
Original code:
if (line.find("Median insert size") != string::npos) {
rg = get_rg(line);
getline(isf, line);
double val = strtod(line.c_str(), NULL);
map< string, pair<double,double> >::iterator iter =
isinfo.find(rg);
if (iter != isinfo.end())
isinfo[rg].first = val;
else
isinfo[rg] = make_pair<double,double>(val, 0);
} else if (line.find("Standard deviation of insert size") != string::npos) {
rg = get_rg(line);
getline(isf, line);
double val = strtod(line.c_str(), NULL);
map< string, pair<double,double> >::iterator iter =
isinfo.find(rg);
if (iter != isinfo.end())
isinfo[rg].second = val;
else
isinfo[rg] = make_pair<double,double>(0, val);
}
Patch:
if (line.find("Median insert size") != string::npos) {
rg = get_rg(line);
getline(isf, line);
double val = strtod(line.c_str(), NULL);
map< string, pair<double,double> >::iterator iter =
isinfo.find(rg);
if (iter != isinfo.end())
isinfo[rg].first = val;
else
isinfo[rg] = make_pair<double&,double>(val, 0);
} else if (line.find("Standard deviation of insert size") != string::npos) {
rg = get_rg(line);
getline(isf, line);
double val = strtod(line.c_str(), NULL);
map< string, pair<double,double> >::iterator iter =
isinfo.find(rg);
if (iter != isinfo.end())
isinfo[rg].second = val;
else
isinfo[rg] = make_pair<double,double&>(0, val);
}
Nothe the ampersand in the function call make_pair
From stack overflow:
https://stackoverflow.com/questions/7388889/whats-a-variable-with-double
It's a reference. That means that whatever you set the value to inside the function, the original variable that was passed in from outside will have that value.
But in the function make_pair
, the variable val was not being called by reference
from software-issues.
Related Issues (20)
- ParkLab Software Issue
- test this
- Git Reports Issue
- Testing emails HOT 1
- mm10 sequence assembly for repeat enrichment estimator HOT 6
- Meerkat somatic_sv.pl issues HOT 1
- Noisy CNV profile with many focal events HOT 9
- Noisy CNV profile with many focal events HOT 1
- Repeat enrichment estimator
- Meerkat Installation compiling issue HOT 2
- meerkat pre-processing step fail to generate insertion size file HOT 2
- Manual Question
- Can't compile
- hint pre error
- hint pre error (complete version) HOT 1
- Cannot Download Meerkat
- SigMA HOT 1
- Meerkat website down
- Unable to access and download Meerkat
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from software-issues.