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

Proper use of IdentificationEvidence #69

Open
MortenHofft opened this issue Feb 15, 2023 · 4 comments
Open

Proper use of IdentificationEvidence #69

MortenHofft opened this issue Feb 15, 2023 · 4 comments
Assignees

Comments

@MortenHofft
Copy link
Member

MortenHofft commented Feb 15, 2023

...the Identifications in Andy's data are not explicitly based on the GeneticSequences anyway. Thus, there are not and will not be IdentificationEvidence records.
The normal Identification path is as Andy described. The collection object (Organism) has an accepted_identification_id at a minimum that connects to one Identification record (for multiple identifications of an Organism the identification.organism_id foreign key can also be used)....

Originally posted by @tucotuco in #61 (comment)

@MortenHofft
Copy link
Member Author

MortenHofft commented Feb 15, 2023

I do not really understand this, so feel free to close this issue as irrelevant.

But I notice that both Koldingensis and BGBM use the IdentificationEvidence table. And in neither case there is a genetic sequence involved. It might be perfectly fine, I'm not sure how detailed you have already verified that data @tucotuco.

https://github.com/gbif/model-material/blob/koldingensis/koldingensis/koldingensis_db.txt specimen ID: 5c488c08-8cab-444a-9598-806dd0abec85

I'm not sure how you go about looking at the data we get, but if it helps here is an excerpt of the data using graphql

GQL
query {
  # Specify: db46a51c-1ed3-11e3-bfac-90b11c41863e
  # Koldingensis: 5c488c08-8cab-444a-9598-806dd0abec85
  # BGBM: B 10 1171483
  # start with the preserved specimen fetched by ID (is there an occurrence ID or such that I could use?)
  specimen: allMaterialEntities(condition: {materialEntityId: "5c488c08-8cab-444a-9598-806dd0abec85"}) {
    nodes {
      materialEntityType
      materialEntityId
      
      entityByMaterialEntityId {
        identificationEvidencesByEntityId {
          nodes {
            identificationId
          }
        }
      }
    }
  }
}

result
{
  "data": {
    "specimen": {
      "nodes": [
        {
          "materialEntityType": "PRESERVEDSPECIMEN",
          "materialEntityId": "5c488c08-8cab-444a-9598-806dd0abec85",
          "entityByMaterialEntityId": {
            "identificationEvidencesByEntityId": {
              "nodes": [
                {
                  "identificationId": "27b13f41-87f2-46f0-8c8a-93d98412ef82"
                },
                {
                  "identificationId": "aadb06f5-f746-48fa-8cc2-1c70f4765f15"
                }
              ]
            }
          }
        }
      ]
    }
  }
}

BGBM latest datadump (in your mailbox) specimen ID: B 10 1171483
If it helps here is an excerpt

GQL
specimen: allMaterialEntities(condition: {materialEntityId: "B 10 1171483"}) {
    nodes {
      materialEntityType
      materialEntityId
      
      entityByMaterialEntityId {
        identificationEvidencesByEntityId {
          nodes {
            identificationId
          }
        }
      }
    }
  }

result
{
  "data": {
    "specimen": {
      "nodes": [
        {
          "materialEntityType": "PreservedSpecimen",
          "materialEntityId": "B 10 1171483",
          "entityByMaterialEntityId": {
            "identificationEvidencesByEntityId": {
              "nodes": [
                {
                  "identificationId": "1077125509"
                }
              ]
            }
          }
        }
      ]
    }
  }
}

@tucotuco
Copy link
Collaborator

@timrobertson100 @MortenHofft I have looked into the data a bit and the whole mapping might benefit from a review when the time is right. Is there more work still to be done on this data set?

@MortenHofft
Copy link
Member Author

MortenHofft commented Feb 27, 2023

I do not know - I do not believe we have uploaded the latest version to the repo #79

Once we have that I can help validate the syntax. But obviously you @tucotuco are better at evaluating wether the mapping is sensible.

@timrobertson100
Copy link
Member

timrobertson100 commented Mar 1, 2023

As a start, I have loaded the data into the shared DB with the material record here.

I am sure there will be things to review on this

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

3 participants