Tuesday, September 3, 2013

Fixed error in resampling in ENMTools 1.4.3

I've fixed a bug in 1.4.3 that kept the "resample from raster" command from printing results to the output file.  It was a very silly error; basically I had disabled printing for debugging and forgot to turn it back on!

Anyway, it's fixed now and should be working fine.  While I was at it, I fixed it so that the resample command now uses the output directory set in the ENMTools Options tab, instead of printing to the directory where the layers you're resampling from are located.  The new version is here:

http://www.danwarren.net/enmtools/builds/ENMTools_1.4.3.zip

15 comments:

  1. Hi Dan,

    Great set of tools you have here. While trying to run an identity test in version 1.4.3, I'm getting the following error:

    Can't open G:/Research/Maxent_results/WorldClim/Fremont_genetics/8ClimVar_current/ENMTools/NicheIdentityTest_2/Populus california_rep0.asc!!


    while executing
    "::perl::CODE(0x45c95a8)"
    invoked from within
    ".b5 invoke "
    invoked from within
    ".b5 instate !disabled { .b5 invoke } "
    invoked from within
    ".b5 instate pressed { .b5 state !pressed; .b5 instate !disabled { .b5 invoke } } "
    (command bound to event)

    Any thoughts you have on how to address this error would be much appreciated!
    Cheers,
    Dana

    ReplyDelete
  2. Hi Dana! It's hard to tell just from this error what's going on, but clearly ENMTools isn't finding the Maxent output where it expects it to be. That usually means that Maxent has failed for some reason. Did the test generate a csv file for the replicates in your working directory? If so, does that file look right when you open it?

    ReplyDelete
    Replies
    1. There's a csv file labeled Populus california predicting Populus arizona (which has the pops and lats and longs, identical to what my input csv file has except "rep" is in the name) and another labeled Populus california predicting Populus utah which is blank.

      Delete
  3. So the reps file has the exact same data points? And the same number of them?

    ReplyDelete
    Replies
    1. Yup, same data points (i.e., same lat and long) and the same number of them, just in a different order. I was doing only one rep, instead to the initial 50 I was running, to see if I could figure out where the issue was.

      Delete
    2. Hi Dana and Dan,
      I've been having the same problem lately. The error message is the same, and the csv file is generated, but speciesname_rep0.asc is not created. Interestingly, this error only occurs when I try to incorporate a bias file in the identity test. At first, I thought that my bias file was in the wrong format but it works fine when I run it directly through Maxent. Have you try your analysis with and w/o a bias file Dana?

      Delete
    3. Hi Christopher,
      I'm not using a bias file. This may be different, since I do have the "..._rep0.asc" file. It just seems like the program can't grab it for some reason.

      Delete
  4. I'm guessing the two problems are actually different - this error is pretty generic and uninformative. Do the two of you have Dropbox? If you can send me a link to a folder containing your data, I'll take a look.

    Christopher, if you want to just get going immediately, you can probably use your reps file and run it in Maxent manually with your bias file. From there you can measure the overlaps using the methods outlined here:

    http://enmtools.blogspot.com.au/2009/10/how-to-run-enmtools-tests-on-cluster-or.html

    ReplyDelete
  5. I sent an invite to my dropbox folder to your gmail account.

    ReplyDelete
  6. Hi, I'm really new to MaxEnt, ENMTools etc. I just want to check for multicollinearity between variables but I can't open the ENM tools program. I've downloaded perl and am trying to use that to launch it but I'm struggling as I've never used Perl either. I don't have an option for Tk+, just Tk. I've tried launching ENMtools from windows explorer and as a command prompt in perl but I can't be doing it right. Any tips on how to launch the program?

    ReplyDelete
  7. Is this the ActiveState Perl distribution? If not, use that - it should have everything already included.

    ReplyDelete
  8. Hi Dan,
    I have the same problem as Dana:
    Can't open C:/Users/guille/Documents/ENMtools/ENMTools_1.4.3/DatosENMtools/ResultadosENMtools/Delphinus delphis_rep0.asc!!
    while executing
    "::perl::CODE(0x3d3a090)"
    invoked from within
    ".b5 invoke "
    invoked from within
    ".b5 instate !disabled { .b5 invoke } "
    invoked from within
    ".b5 instate pressed { .b5 state !pressed; .b5 instate !disabled { .b5 invoke } } "
    (command bound to event)

    I don't have quotation marks in my .cvs files
    How I can solve it?
    Cheers,
    Guille

    ReplyDelete
  9. Are you on a Mac? Did you check your .csv files in a text editor to see if they have Mac line endings?

    ReplyDelete
    Replies
    1. Hi Dan. Apologies for my delay: I can just resume my work. I'm not on a Mac. I check my .csv files and any line or strange symbol does not appear in these.

      Delete
  10. Great article , if you want any help please click this link its provide good solution of your problem.
    Fix Windows 7 Error 1068
    Thank you
    Aalia lyon

    ReplyDelete