Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/apollo-collaboration-server/.development.env
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ MICROSOFT_CLIENT_ID=fabdd045-163c-4712-9d40-dbbb043b3090
MICROSOFT_CLIENT_SECRET=~Gr8Q~h6RTU7SMC-fjNxXy_~nabTD-ME_rFyLa.M
DESCRIPTION=A server for Apollo development purposes
PLUGIN_LOCATION=http://localhost:9000/dist/jbrowse-plugin-apollo.umd.development.js
FEATURE_TYPE_ONTOLOGY_LOCATION=http://localhost:9000/test_data/so-v3.1.json
FEATURE_TYPE_ONTOLOGY_LOCATION=http://localhost:9000/test_data/so-2024-11-18.json
LOG_LEVELS=error,warn,log,debug
ALLOW_ROOT_USER=true
ROOT_USER_PASSWORD=password
Expand Down
34 changes: 0 additions & 34 deletions packages/apollo-mst/src/AnnotationFeatureModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -291,40 +291,6 @@ export const AnnotationFeatureModel = types
transcript.filter((transcriptPart) => transcriptPart.type === 'CDS'),
)
},
get looksLikeGene(): boolean {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const session = getSession(self) as any
const { apolloDataStore } = session
const { featureTypeOntology } = apolloDataStore.ontologyManager
if (!featureTypeOntology) {
return false
}
const children = self.children as Children
if (!children?.size) {
return false
}
const isGene =
featureTypeOntology.isTypeOf(self.type, 'gene') ||
featureTypeOntology.isTypeOf(self.type, 'pseudogene')
if (!isGene) {
return false
}
for (const [, child] of children) {
if (
featureTypeOntology.isTypeOf(child.type, 'transcript') ||
featureTypeOntology.isTypeOf(child.type, 'pseudogenic_transcript')
) {
const { children: grandChildren } = child
if (!grandChildren?.size) {
return false
}
return [...grandChildren.values()].some((grandchild) =>
featureTypeOntology.isTypeOf(grandchild.type, 'exon'),
)
}
}
return false
},
}))
.actions((self) => ({
setAttributes(attributes: Map<string, string[]>) {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file modified packages/jbrowse-plugin-apollo/cypress/data/so.json.gz
Binary file not shown.
75 changes: 75 additions & 0 deletions packages/jbrowse-plugin-apollo/cypress/e2e/renderTrack.cy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
/* eslint-disable cypress/no-unnecessary-waiting */
describe('Simple tests for visuals', () => {
beforeEach(() => {
cy.loginAsGuest()
})
afterEach(() => {
cy.deleteAssemblies()
})
it('Shows correct gene model', () => {
cy.addAssemblyFromGff('so_types.gff3', 'test_data/so_types.gff3')
cy.selectAssemblyToView('so_types.gff3')
cy.get('body').then(($body) => {
if ($body.find('button[aria-label="Close drawer"]').length > 0) {
cy.get('button[aria-label="Close drawer"]').click()
}
})

cy.searchFeatures('TGGT1_200010', 1)
cy.wait(5000)
// This may fail locally due to differences in runtime such as installed
// fonts on. The snapshots used in this test are generated on GitHub Actions
cy.get('canvas[data-testid="overlayCanvas"]').compareSnapshot({
name: 'gene-model',
testThreshold: 0.03,
})
})
it('Shows different glyph types', () => {
cy.addAssemblyFromGff('glyph_types.gff3', 'test_data/glyph_types.gff3')
cy.selectAssemblyToView('glyph_types.gff3')
cy.contains('Open track selector').click()
cy.contains('Reference sequence (').click()
cy.contains('Annotations (').click()

cy.get('body').then(($body) => {
if ($body.find('button[aria-label="Close drawer"]').length > 0) {
cy.get('button[aria-label="Close drawer"]').click()
}
})
cy.wait(2000) // Wait for render
// This may fail locally due to differences in runtime such as installed
// fonts on. The snapshots used in this test are generated on GitHub Actions
cy.get('canvas[data-testid="seqTrackCanvas"]').compareSnapshot({
name: 'seq-track-canvas',
testThreshold: 0.03,
})

cy.get('[data-testid="track_menu_icon"]').last().click()
cy.contains('Display types').trigger('mouseover')
cy.contains('LinearApolloSixFrameDisplay').click()
cy.wait(2000) // Wait for render
// This may fail locally due to differences in runtime such as installed
// fonts on. The snapshots used in this test are generated on GitHub Actions
cy.get('canvas[data-testid="canvas"]').compareSnapshot({
name: 'linear-apollo-six-frame-display-canvas',
testThreshold: 0.03,
})

cy.get('[data-testid="track_menu_icon"]').last().click()
cy.contains('Display types').trigger('mouseover')
cy.contains('LinearApolloDisplay').click()
cy.get('button[data-testid="view_menu_icon"]', { timeout: 10_000 }).click({
force: true,
timeout: 10_000,
})
cy.contains('Show...', { timeout: 10_000 }).click()
cy.contains('Show all regions in assembly', { timeout: 10_000 }).click()
cy.wait(2000) // Wait for render
// This may fail locally due to differences in runtime such as installed
// fonts on. The snapshots used in this test are generated on GitHub Actions
cy.get('canvas[data-testid="canvas"]').compareSnapshot({
name: 'linear-apollo-display-canvas',
testThreshold: 0.03,
})
})
})
28 changes: 0 additions & 28 deletions packages/jbrowse-plugin-apollo/cypress/e2e/visualGeneModel.cy.ts

This file was deleted.

4 changes: 3 additions & 1 deletion packages/jbrowse-plugin-apollo/cypress/support/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ Cypress.Commands.add('addOntologies', () => {
name: 'Sequence Ontology',
version: 'unversioned',
source: {
uri: 'http://localhost:9000/test_data/so-v3.1.json',
uri: 'http://localhost:9000/test_data/so-2024-11-18.json',
locationType: 'UriLocation',
},
},
Expand All @@ -86,6 +86,8 @@ Cypress.Commands.add('addOntologies', () => {
},
{ collection: 'jbrowseconfigs' },
)
// so.json.gz was generated from an IndexedDB dump using the script found at
// https://gist.github.com/loilo/ed43739361ec718129a15ae5d531095b
cy.readFile('cypress/data/so.json.gz', null).then((soGZip: Buffer) => {
cy.wrap<Promise<void>>(
loadOntology(
Expand Down
2 changes: 1 addition & 1 deletion packages/jbrowse-plugin-apollo/jbrowse_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"name": "Sequence Ontology",
"version": "3.1",
"source": {
"uri": "test_data/so-v3.1.json",
"uri": "test_data/so-2024-11-18.json",
"locationType": "UriLocation"
}
}
Expand Down
Loading