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

Add fulltext indexing to ontology store #244

Merged
merged 20 commits into from
Aug 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
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
5 changes: 4 additions & 1 deletion packages/jbrowse-plugin-apollo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,18 @@
"@jbrowse/plugin-authentication": "^2.0.1",
"@jbrowse/plugin-linear-genome-view": "^2.0.1",
"@mui/icons-material": "^5.8.4",
"@types/jsonpath": "^0.2.0",
"apollo-common": "workspace:^",
"apollo-mst": "workspace:^",
"apollo-shared": "workspace:^",
"autosuggest-highlight": "^3.3.4",
"bson-objectid": "^2.0.3",
"clsx": "^1.1.1",
"fast-deep-equal": "^3.1.3",
"file-saver": "^2.0.5",
"http-proxy-middleware": "^2.0.6",
"idb": "^7.1.1",
"jsonpath": "^1.1.1",
"nanoid": "^4.0.2",
"regenerator-runtime": "^0.13.9",
"socket.io-client": "^4.5.3",
Expand Down Expand Up @@ -95,7 +98,7 @@
"@types/react-dom": "^18",
"cypress": "^12.17.2",
"fake-indexeddb": "^4.0.2",
"jest": "^29.0.3",
"jest": "^29.6.2",
"jest-fetch-mock": "^3.0.3",
"mobx": "^6.6.1",
"mobx-react": "^7.2.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,6 @@ describe('ApolloSequenceAdapter', () => {
{},
)
const featuresArray = await features.pipe(toArray()).toPromise()
expect(featuresArray).toMatchInlineSnapshot(`
[
{
"end": 30,
"refName": "ctgA",
"seq": "GCGTGCAACAGACTTTCCATGATGCGAGCT",
"start": 0,
"uniqueId": "ctgA 0-30",
},
]
`)
expect(featuresArray).toMatchSnapshot()
})
})
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`ApolloSequenceAdapter can get features 1`] = `
[
{
"end": 30,
"refName": "ctgA",
"seq": "GCGTGCAACAGACTTTCCATGATGCGAGCT",
"start": 0,
"uniqueId": "ctgA 0-30",
},
]
`;
Original file line number Diff line number Diff line change
@@ -0,0 +1,208 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`elaborateMatch can do another 1`] = `
[
{
"field": {
"displayName": "ID",
"jsonPath": "$PREFIXED_ID",
},
"score": 109.1,
"str": "SO:0000001",
"term": {
"id": "http://purl.obolibrary.org/obo/SO_0000001",
"lbl": "region",
"meta": {
"basicPropertyValues": [
{
"pred": "http://www.geneontology.org/formats/oboInOwl#hasOBONamespace",
"val": "sequence",
},
],
"definition": {
"val": "A sequence_feature with an extent greater than zero. A nucleotide region is composed of bases and a polypeptide region is composed of amino acids. It may also be termed a region of some number of nucleotides.",
"xrefs": [
"SO:ke",
],
},
"subsets": [
"http://purl.obolibrary.org/obo/so#SOFA",
],
"synonyms": [
{
"pred": "hasExactSynonym",
"val": "sequence",
},
],
},
"type": "CLASS",
},
"wordMatches": [
{
"position": 0,
"wordIndex": 0,
},
],
},
]
`;

exports[`elaborateMatch can do one 1`] = `
[
{
"field": {
"displayName": "definition",
"jsonPath": "$.meta.definition.val",
},
"score": 208.39346153846154,
"str": "A sequence_feature with an extent greater than zero. A nucleotide region is composed of bases and a polypeptide region is composed of amino acids. It may also be termed a region of some number of nucleotides.",
"term": {
"id": "http://purl.obolibrary.org/obo/SO_0000001",
"lbl": "region",
"meta": {
"basicPropertyValues": [
{
"pred": "http://www.geneontology.org/formats/oboInOwl#hasOBONamespace",
"val": "sequence",
},
],
"definition": {
"val": "A sequence_feature with an extent greater than zero. A nucleotide region is composed of bases and a polypeptide region is composed of amino acids. It may also be termed a region of some number of nucleotides.",
"xrefs": [
"SO:ke",
],
},
"subsets": [
"http://purl.obolibrary.org/obo/so#SOFA",
],
"synonyms": [
{
"pred": "hasExactSynonym",
"val": "sequence",
},
],
},
"type": "CLASS",
},
"wordMatches": [
{
"position": 55,
"wordIndex": 0,
},
{
"position": 66,
"wordIndex": 1,
},
{
"position": 112,
"wordIndex": 1,
},
{
"position": 171,
"wordIndex": 1,
},
{
"position": 196,
"wordIndex": 0,
},
],
},
]
`;

exports[`getWords can get the words from a test node 1`] = `
[
[
"$PREFIXED_ID",
"so:0000001",
],
[
"$.lbl",
"region",
],
[
"$.meta.definition.val",
"sequence",
],
[
"$.meta.definition.val",
"feature",
],
[
"$.meta.definition.val",
"extent",
],
[
"$.meta.definition.val",
"greater",
],
[
"$.meta.definition.val",
"zero",
],
[
"$.meta.definition.val",
"nucleotide",
],
[
"$.meta.definition.val",
"region",
],
[
"$.meta.definition.val",
"composed",
],
[
"$.meta.definition.val",
"bases",
],
[
"$.meta.definition.val",
"polypeptide",
],
[
"$.meta.definition.val",
"region",
],
[
"$.meta.definition.val",
"composed",
],
[
"$.meta.definition.val",
"amino",
],
[
"$.meta.definition.val",
"acids",
],
[
"$.meta.definition.val",
"may",
],
[
"$.meta.definition.val",
"also",
],
[
"$.meta.definition.val",
"termed",
],
[
"$.meta.definition.val",
"region",
],
[
"$.meta.definition.val",
"number",
],
[
"$.meta.definition.val",
"nucleotides",
],
[
"$.meta.synonyms[*].val",
"sequence",
],
]
`;
Loading