-
Notifications
You must be signed in to change notification settings - Fork 0
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
pmfe-findmfe not returning results #16
Comments
@spoznan ./RunPMFECommand.sh pmfe-findmfe --sequence /projects/rna/rnatope/Data/tRNA_50/fasta/Aquifex.aeolicus.VF5_AE000657.fasta -a 3.4 -b 0 -c 0.4 -d 1
>> [PMFE-WRAPPER-SCRIPT] Changing current working directory to "/projects/rna/PMFEUpdated-2020.09.10-MDS-mschmidt34/GTDMMBSoftware2020/pmfe" ...
(((((((...((.((.(((..((.(.(((((.......))))).)))..))).))))........)))))))> 0 0 0 -311/10 -311/10 If so, let me know so I can file the new code as a part of the existing pull request I started last week: Rational get_rational_from_word(std::string word) {
Rational result;
std::size_t decimalpoint = word.find('.');
bool negative = (word.find('-') != std::string::npos);
if (decimalpoint != std::string::npos) {
std::string intpart = word.substr(0, decimalpoint);
std::string fracpart = word.substr(decimalpoint+1);
if (intpart == "") intpart = "0";
Integer theint (intpart, 10);
theint = abs(theint);
// Carve out the fractional part. Surprisingly fiddly!
// Handle a corner case where the fractional part is all zeros:
int fracdenom = 1;
int lastNonZeroPos = fracpart.find_last_of("0");
if(lastNonZeroPos != std::string::npos) {
while(lastNonZeroPos > 0 && lastNonZeroPos != std::string::npos) {
fracpart = fracpart.substr(0, lastNonZeroPos);
lastNonZeroPos = fracpart.find_last_of("0");
}
if(lastNonZeroPos == 0) {
fracpart = "";
}
fracdenom = pow(10, fracpart.length());
}
if(fracpart.size() == 0) {
fracpart = "0";
}
Integer fracval (fracpart, 10);
Rational thefrac (fracval, fracdenom);
thefrac.canonicalize();
result = theint + thefrac;
if (negative) result *= -1;
} else {
Rational thevalue (word);
result = thevalue;
}
result.canonicalize();
return result;
}; |
The output I get with the old code is |
@spoznan
|
When I try now
./RunPMFECommand.sh pmfe-findmfe --sequence /projects/rna/rnatope/Data/tRNA_50/fasta/Aquifex.aeolicus.VF5_AE000657.fasta -a 3.4 -b 0 -c 0.4 -d 1
The only output I get is
and the code seems to take a very long time to return a result.
The text was updated successfully, but these errors were encountered: