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

Init commit - search cohorts by sample id #133

Closed
wants to merge 1 commit into from

Conversation

ao508
Copy link
Collaborator

@ao508 ao508 commented May 23, 2024

Screenshot showing results when searching by a single sample primary id 10786_D_433

image

Sample 05240_V_5 is also in 2 (different) cohorts

image

Entering both sample ids in the search yields the following results

image

Signed-off-by: Angelica Ochoa <15623749+ao508@users.noreply.github.com>
Comment on lines +116 to +120
hasCohortSampleSamplesWhere2: {
hasMetadataSampleMetadata_SOME: {
primaryId_IN: parsedSearchVals,
},
},
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be generalized

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The other tables still render fine without having to generalize this specific "where" variable but for consistency we should probably move forward with generalizing it the way that the other query variables are generalized

Copy link
Collaborator Author

@ao508 ao508 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some notes:

Sample 10786_D_433

Cohorts:

  • CCS_SA7WUHQB

  • CCS_AVGQFYAA

  • Filters results to only 2 cohorts (above sample is in fact in 2 cohorts)

  • the cohorts' 'hasCohortSampleSamplesConnection' total count = the total number of samples for that cohort

  • hasCohortSampleSamplesWhere2 - filters results to the two cohorts containing the sample primary id being searched for

  • cohortsConnectionWhere2 - makes it so that the total count matches the total number of cohorts returned by the query

  • where - removing this returns all cohorts instead of just the cohorts matching the sample primary id being searched for

{
  "hasCohortSampleSamplesWhere2": {
    "hasMetadataSampleMetadata_SOME": {
      "primaryId_IN": ["10786_D_433"]
    }
  },
  "cohortsConnectionWhere2": {
    "hasCohortSampleSamples_SOME": {
      "hasMetadataSampleMetadata_SOME": {
        "primaryId_IN": ["10786_D_433"]
      }
    }
  },
  "where": {
    "hasCohortSampleSamples_SOME": {
      "hasMetadataSampleMetadata_SOME": {
        "primaryId_IN": ["10786_D_433"]
      }
    }
  }
}

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

Successfully merging this pull request may close these issues.

1 participant