globalbioticinteractions / globalbioticinteractions.github.io

source files for GloBI website
https://globalbioticinteractions.org
MIT License
8 stars 14 forks source link

Strange matrix of interactions #63

Closed jsoberon closed 8 years ago

jsoberon commented 8 years ago

I am trying to get a matrix of interactions between a list of hawkmoths and plants. I do the following: pam=get_interaction_matrix(lstA,int2) lstA is a list with the genera of hawkmoths. int2 is the result of taking the union of the target_taxon_name part in: get_interactions(taxon=lstA,interaction.type="interactsWith"), get_interactions(taxon=lstA,interaction.type="visitsFlowersOf"), and get_interactions(taxon=lstA,interaction.type="pollinates").

These three lists are NOT empty, and their union contains 183 names. When I run pam=get_interaction_matrix(lstA,int2)

I get a 79X184 matrix of zeros. There should be ones there!!!! What I am doing wrong? Any help will be greatly appreciated.

jhpoelen commented 8 years ago

Hi! thanks for letting me know of your unexpected result. Am currently traveling and hoping to have a look at it after the weekend. More soon!

jsoberon commented 8 years ago

Thanks a lot. Look forward to your ideas.

jhpoelen commented 8 years ago

I was able to reproduce and fix the issue. The root cause was that a slightly different name matching method was used for get_interaction_matrix, leading to the observed unexpected results. The fix has been included in the development version of rglobi. Please see https://github.com/ropensci/rglobi for instructions on how to do so. Hoping to include this fix into the upcoming release (e.g. 0.2.9)

Please confirm that this fixed the issue . . . and let me know if there's anything else that caught your attention. . .

jsoberon commented 8 years ago

Ahhh!!! Thanks Jorrit. I am going to try it in a couple of hours and will let you know if it works.

Many many thanks JS

jsoberon commented 8 years ago

Dear Jorrit, I tested your code with my data and now I do get a matrix with ones in it. I still need to check a few things, but this seems to be working now.

Many thanks for your help.

JS

jhpoelen commented 8 years ago

Thanks for checking! Let me know if you find any other issues. Happy to help.

jhpoelen commented 8 years ago

@jsoberon the fix is now available through cran as part of version rglobi v0.2.9 thanks to the quick review of Uwe Ligges of the r-project (see attached).

Thanks, on CRAN now.

Best,
Uwe Ligges

On 08.03.2016 20:46, Jorrit Poelen wrote:
[This was generated from CRAN.R-project.org/submit.html]

The following package was uploaded to CRAN:
===========================================

Package Information:
Package: rglobi
Version: 0.2.9
Title: R Interface to Global Biotic Interactions
Author(s): Jorrit Poelen [aut, cre], Stephen Gosnell [aut], Sergey
  Slyusarev [aut]
Maintainer: Jorrit Poelen <jhpoelen@xs4all.nl>
Depends: R (>= 3.0.1)
Suggests: testthat, knitr
Description: A programmatic interface to the web service methods provided
  by Global Biotic Interactions (GloBI). GloBI provides  access
  to spatial-temporal species interaction records from  sources
  all over the world. rglobi provides methods to search
  species interactions by location, interaction type, and
  taxonomic name. In addition, it supports Cypher, a graph
  query language, to allow for executing custom queries on the
  GloBI  aggregate species interaction data set.
License: MIT + file LICENSE
Imports: rjson (>= 0.2.13), RCurl

The maintainer confirms that he or she
has read and agrees to the CRAN policies.

Submitter's comment: Dear Reviewers:

I built this package using [R CMD
  build .] and checked it with command [R CMD check
  --as-cran rglobi_0.2.9.tar.gz] on my Mac OS X (v
  10.11.3) machine running R 3.2.3 . Also, the checks
  were executed on travis-ci.org (running Ubuntu) and
  winbuilder (running windows).

Fixes:
* a rglobi
  user notices a discrepancy in name matching between
  get_interaction_matrix and get_interactions methods
  (see
  https://github.com/globalbioticinteractions/globalbioticinteractions.github.io/issues/63).
  The fix included in this version now makes sure that
  the get_interaction_matrix and get_interactions
  method use the same name matching method.

The
  remaining note for this version is:
* checking CRAN
  incoming feasibility ... NOTE
Maintainer: ‘Jorrit
  Poelen <jhpoelen@xs4all.nl>’
Components with
  restrictions and base license permitting such:
  MIT
  + file LICENSE
File 'LICENSE':
  YEAR: 2016

  COPYRIGHT HOLDER: Jorrit Poelen

Thank you for taking
  the time to review my submission.

-jorrit
jsoberon commented 8 years ago

Many thanks to all of you in this project. I think globis has a transformative potential, and myself and my students are already beginning to play with it.

Great work folks!!

Jorge S.

From: Jorrit Poelen [mailto:notifications@github.com] Sent: Tuesday, March 08, 2016 6:30 PM To: globalbioticinteractions/globalbioticinteractions.github.io globalbioticinteractions.github.io@noreply.github.com Cc: Soberon, Jorge jsoberon@ku.edu Subject: Re: [globalbioticinteractions.github.io] Strange matrix of interactions (#63)

@jsoberonhttps://github.com/jsoberon the fix is now available through cran as part of version rglobi v0.2.9 thanks to the quick review of Uwe Ligges of the r-project (see attached).

Thanks, on CRAN now.

Best,

Uwe Ligges

On 08.03.2016 20:46, Jorrit Poelen wrote:

[This was generated from CRAN.R-project.org/submit.html]

The following package was uploaded to CRAN:

Package Information:

Package: rglobi

Version: 0.2.9

Title: R Interface to Global Biotic Interactions

Author(s): Jorrit Poelen [aut, cre], Stephen Gosnell [aut], Sergey

Slyusarev [aut]

Maintainer: Jorrit Poelen jhpoelen@xs4all.nl<mailto:jhpoelen@xs4all.nl>

Depends: R (>= 3.0.1)

Suggests: testthat, knitr

Description: A programmatic interface to the web service methods provided

by Global Biotic Interactions (GloBI). GloBI provides access

to spatial-temporal species interaction records from sources

all over the world. rglobi provides methods to search

species interactions by location, interaction type, and

taxonomic name. In addition, it supports Cypher, a graph

query language, to allow for executing custom queries on the

GloBI aggregate species interaction data set.

License: MIT + file LICENSE

Imports: rjson (>= 0.2.13), RCurl

The maintainer confirms that he or she

has read and agrees to the CRAN policies.

Submitter's comment: Dear Reviewers:

I built this package using [R CMD

build .] and checked it with command [R CMD check

--as-cran rglobi_0.2.9.tar.gz] on my Mac OS X (v

10.11.3) machine running R 3.2.3 . Also, the checks

were executed on travis-ci.org (running Ubuntu) and

winbuilder (running windows).

Fixes:

The

remaining note for this version is:

Maintainer: ‘Jorrit

Poelen jhpoelen@xs4all.nl<mailto:jhpoelen@xs4all.nl>’

Components with

restrictions and base license permitting such:

MIT

File 'LICENSE':

YEAR: 2016

COPYRIGHT HOLDER: Jorrit Poelen

Thank you for taking

the time to review my submission.

-jorrit

— Reply to this email directly or view it on GitHubhttps://github.com/globalbioticinteractions/globalbioticinteractions.github.io/issues/63#issuecomment-194036029.