Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
bchu1 committed Jan 10, 2025
1 parent 249b50c commit e4c61ea
Show file tree
Hide file tree
Showing 2 changed files with 81 additions and 91 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ const GET_DEPOSITION_BY_ID = gql(`
runs {
tomogram_voxel_spacings {
annotations(distinct_on: object_name) {
annotations(distinct_on: object_name, where: { deposition_id: { _eq: $id }}) {
object_name
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,107 +9,98 @@ import { getTiltRangeFilter } from 'app/utils/filter'

const GET_DEPOSITION_BY_ID = gql(`
query GetDepositionByIdV2(
$id: Int!,
$depositionId: Int!,
$datasetLimit: Int,
$datasetOffset: Int,
$datasetOrderBy: OrderByEnum,
$filter: DatasetWhereClause!,
) {
depositions(where: { id: { _eq: $id }}) {
edges {
node {
depositionDate
depositionPublications
description
id
keyPhotoUrl
lastModifiedDate
relatedDatabaseEntries
releaseDate
s3Prefix
title
authors(orderBy: { authorListOrder: asc }) {
edges {
node {
correspondingAuthorStatus
email
name
orcid
primaryAuthorStatus
}
}
}
distinctShapeTypes: annotationsAggregate {
aggregate {
count
groupBy {
annotationShapes {
shapeType
}
}
}
# Deposition:
depositions(where: { id: { _eq: $depositionId }}) {
depositionDate
depositionPublications
description
id
keyPhotoUrl
lastModifiedDate
relatedDatabaseEntries
releaseDate
s3Prefix
title
authors(orderBy: { authorListOrder: asc }) {
edges {
node {
correspondingAuthorStatus
email
name
orcid
primaryAuthorStatus
}
annotationMethodCounts: annotationsAggregate {
aggregate {
count
groupBy {
annotationMethod
}
}
edges {
node {
annotationMethod
annotationSoftware
methodLinks
methodType
}
}
}
}
annotationsAggregate {
aggregate {
count
}
}
distinctOrganismNames: datasetsAggregate {
aggregate {
count
groupBy {
organismName
}
annotationsAggregate {
aggregate {
count
}
}
}
distinctObjectNames: annotationsAggregate {
aggregate {
count
groupBy {
objectName
}
organismNames: datasets(distinctOn: organismName) {
edges {
node {
organismName
}
}
}
distinctShapeTypes: annotationsAggregate {
aggregate {
count
groupBy {
annotationShapes {
shapeType
}
}
objectNames: annotations(distinctOn: objectName) {
edges {
node {
objectName
}
}
}
annotationMethodCounts: annotationsAggregate {
aggregate {
count
groupBy {
annotationMethod
annotationSoftware
methodType
methodLinks {
link
linkType
name
}
}
}
}
}
# This section is very similar to the datasets page.
# Datasets:
datasets(
where: $filter
orderBy: $orderBy,
limitOffset: {
limit: $datasetLimit,
offset: $datasetOffset
},
orderBy: { title: $datasetOrderBy },
where: {
_and: [
$filter,
{ runs: { annotations: { depositionId: { _eq: $id }}}}
]
},
limit: $limit,
offset: $offset
}
) {
id
title
organismName
datasetPublications
keyPhotoThumbnailUrl
authors(orderBy: { authorListOrder: asc }) {
edges {
node {
Expand All @@ -119,27 +110,24 @@ const GET_DEPOSITION_BY_ID = gql(`
}
}
}
runsAggregate(where: { annotations: { depositionId: { _eq: $id }}}) {
runsCount: runsAggregate(where: { annotations: { depositionId: { _eq: $depositionId }}}) {
aggregate {
count
}
}
runs {
annotations(distinctOn: objectName) {
edges {
node {
objectName
edges {
node {
annotationsAggregate(where: { depositionId: { _eq: $depositionId }}) {
aggregate {
count
groupBy {
objectName
}
}
}
}
}
annotationsAggregate(where: { depositionId: { _eq: $id }}) {
aggregate {
count
}
}
}
}
Expand All @@ -161,6 +149,8 @@ const GET_DEPOSITION_BY_ID = gql(`
count
}
}
...DatasetsFilterValues
}
`)

Expand Down

0 comments on commit e4c61ea

Please sign in to comment.