-
Notifications
You must be signed in to change notification settings - Fork 287
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Latest conda version throws error for large chromStart values #1099
Comments
I have had the exact same issue but with a chromosome start position exceeding 1.1e+07 |
From CHRPOS str2chrPos(const char * __restrict str, size_t ulen) {
if (ulen == 0) {
ulen = strlen(str);
}
const char* endpos = str;
long long result = 0;
bool neg = false;
char last = 0;
if(*endpos == '-') neg = true, endpos ++;
for(;(last = *endpos); endpos ++) {
if(last < '0' || last > '9') break;
result = result * 10 + last - '0';
}
if(last) {
if(*endpos == 'e' || *endpos == 'E') {
char* endpos = NULL;
CHRPOS ret = (CHRPOS)strtod(str, &endpos);
if(endpos && *endpos == 0) {
return ret;
}
}
fprintf(stderr, "***** ERROR: illegal number \"%s\". Exiting...\n", str);
exit(1);
}
return neg?-result:result;
}
Correct me if I'm wrong but this doesn't take into account decimal points (1 . 66e+08)? Upon encountering the "." character, the code breaks out of the for loop (as a decimal point is neither >= "0" nor <= "9" in any encoding), but the next if statement is only looking for I'm not very well versed in C++ or this code base, but this logic is handled differently in v2.27.1 (I don't get the 'illegal number' errors in v2.27.1). |
I installed the latest conda version for bedtools and ran an intersection and found bedtools stopped once the chromosome start position for a peak was equal to or greater than 1.66e+08. The exact error I received was "ERROR: illegal number "1.66e+08". Exiting..." Scaling down the version to 2.27.1 fixed this issue.
The text was updated successfully, but these errors were encountered: