Skip to content
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

'values' not found #64

Open
clb21565 opened this issue Jun 16, 2021 · 3 comments
Open

'values' not found #64

clb21565 opened this issue Jun 16, 2021 · 3 comments

Comments

@clb21565
Copy link

Dear all,

Trying to run OPERA-MS on a pretty big dataset, and am getting the following error:
Problem while running this R command:
length(values)

Error:
object 'values' not found
Execution halted


I noticed that this might be something you've looked at :) :

#Resolve weird problem of undefined value NEED TO INVESTIGATE WHY THIS APPENS
my $nb_window = @{$window_distrib} + 0;
my @temp = ();my $val;
for(my $i = 0; $i < $nb_window; $i++){
$val = $window_distrib->[$i];
if(defined $val){
    push(@temp, $val);
}
else{
    print STDERR " *** WARNING undefined value in window_distrib " . $i . "\n";
}
}


#$R->set( 'values', $window_distrib);
$R->set( 'values', \@temp);
$R->set( 'span', 11);

$a = $R->run(
## adpated from EDDA
#q `print(sessionInfo())`,	
q `length(values)`,
q `dens <- density(values)`,
q `series <-dens$y`,
q `z <- embed(series, span)`,
q `s <- span%/%2`,
q `ind <- apply(z, 1, which.max)`,
q `v <- ind == (1 + s)`,
q `result <- c(rep(FALSE, s), v)`,
q `result <- result[1:(length(result) - s)]`,
q `print(dens$x[result])`,
);

from cluster_strain.pl

Would you have a suggestion on resolving this?

@jsgounot
Copy link
Contributor

Hi, thanks for reporting this. I'm working on it and will come back as soon I find a fix !

@clb21565
Copy link
Author

Hi there! Any update on this?

@jsgounot
Copy link
Contributor

Hi. Sadly I was not able to spend enough time on this and I don't have a fix atm. This error seems weird though, since we clearly define what inside values with the set function. One possibility would be that \@temp is empty. Is it possible on your side to print what's inside the \@temp variable before the error and report it in this thread? OPERA-MS keeps in memory the last successful step so you should not have to rerun the whole analysis.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants