gramene-search 1.6.36 → 1.6.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.parcel-cache/83e7562660f7cc15-BundleGraph +0 -0
- package/.parcel-cache/9a0d07555444f4da-AssetGraph +0 -0
- package/.parcel-cache/d3a1b9507cb44047-AssetGraph +0 -0
- package/.parcel-cache/data.mdb +0 -0
- package/.parcel-cache/dc1da35000e13623-RequestGraph +0 -0
- package/.parcel-cache/lock.mdb +0 -0
- package/.parcel-cache/snapshot-dc1da35000e13623.txt +2 -2
- package/dist/index.css +6 -0
- package/dist/index.css.map +1 -1
- package/dist/index.js +113 -51
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/bundles/filters.js +5 -2
- package/src/components/results/GeneList.js +1 -1
- package/src/components/results/genes.css +5 -0
- package/src/components/suggestions.js +27 -0
- package/src/demo.js +13 -13
package/package.json
CHANGED
package/src/bundles/filters.js
CHANGED
|
@@ -465,10 +465,13 @@ grameneFilters.reactGrameneFilters = createSelector(
|
|
|
465
465
|
return { type: 'BATCH_ACTIONS', actions: actions };
|
|
466
466
|
}
|
|
467
467
|
if (queryObject.hasOwnProperty('suggestion')) {
|
|
468
|
+
const url = new URL(myUrl.href);
|
|
469
|
+
url.search = '';
|
|
468
470
|
return {
|
|
469
471
|
type: 'BATCH_ACTIONS', actions: [
|
|
472
|
+
{type: 'URL_UPDATED', payload: {url: url.href, replace:false}},
|
|
470
473
|
{type: 'GRAMENE_SEARCH_CLEARED'},
|
|
471
|
-
{type: '
|
|
474
|
+
{type: 'SUGGESTIONS_QUERY_CHANGED', payload: {query: queryObject.suggestion}}
|
|
472
475
|
]
|
|
473
476
|
};
|
|
474
477
|
}
|
|
@@ -507,4 +510,4 @@ grameneFilters.reactGrameneFilters = createSelector(
|
|
|
507
510
|
}
|
|
508
511
|
);
|
|
509
512
|
|
|
510
|
-
export default grameneFilters;
|
|
513
|
+
export default grameneFilters;
|
|
@@ -52,7 +52,7 @@ const PanLink = (props) => {
|
|
|
52
52
|
const gene = props.gene;
|
|
53
53
|
const pan = props.pan;
|
|
54
54
|
return <div className="gene-panlink">
|
|
55
|
-
<a target="_blank" href={pan.url + gene.id}>
|
|
55
|
+
<a target="_blank" href={pan.url + "?idList=" + gene.id}>
|
|
56
56
|
<img src={pan.svg} title={`View this gene at ${pan.name}`}/>
|
|
57
57
|
</a>
|
|
58
58
|
</div>;
|
|
@@ -38,6 +38,30 @@ function getLowestCommonAncestorName(tids, taxonomy) {
|
|
|
38
38
|
});
|
|
39
39
|
return taxonomy[lca[0]].short_name;
|
|
40
40
|
}
|
|
41
|
+
|
|
42
|
+
const TryPan = (props) => {
|
|
43
|
+
const query = props.query;
|
|
44
|
+
const pan = props.pan;
|
|
45
|
+
return <div className="suggestion-panlink">
|
|
46
|
+
<a target="_blank" href={pan.url + "?suggestion=" + query}>
|
|
47
|
+
<img src={pan.svg} title={`Search at ${pan.name}`}/>
|
|
48
|
+
</a>
|
|
49
|
+
</div>;
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
const TryAnotherSite = props => {
|
|
53
|
+
const query = props.query;
|
|
54
|
+
const config = props.config;
|
|
55
|
+
let sites = Object.keys(config.panSite);
|
|
56
|
+
if (config.id === 'main') {
|
|
57
|
+
return <div>
|
|
58
|
+
<Alert variant={'info'}>Don't see what you're looking for? Search for <b>{query}</b> on one of our sister sites</Alert>
|
|
59
|
+
{sites.map((p, idx) => <TryPan key={idx} query={query} pan={config.panSite[p]}/>)}
|
|
60
|
+
</div>
|
|
61
|
+
}
|
|
62
|
+
return <></>
|
|
63
|
+
}
|
|
64
|
+
|
|
41
65
|
const Suggestions = props => {
|
|
42
66
|
let suggestions = props.grameneSuggestions;
|
|
43
67
|
if (suggestions && suggestions.grouped) {
|
|
@@ -69,6 +93,7 @@ const Suggestions = props => {
|
|
|
69
93
|
onClick={() => {logAction(sugg2); props.doAcceptSuggestion(sugg2); props.doAcceptGrameneSuggestion(sugg2)}}>
|
|
70
94
|
{`All genes that contain a word that starts with "${props.suggestionsQuery}"`}
|
|
71
95
|
</Button>
|
|
96
|
+
<TryAnotherSite query={props.suggestionsQuery} config={props.configuration}/>
|
|
72
97
|
</div>
|
|
73
98
|
);
|
|
74
99
|
}
|
|
@@ -92,6 +117,7 @@ const Suggestions = props => {
|
|
|
92
117
|
)}
|
|
93
118
|
</div>
|
|
94
119
|
})}
|
|
120
|
+
<TryAnotherSite query={props.suggestionsQuery} config={props.configuration}/>
|
|
95
121
|
</div>
|
|
96
122
|
);
|
|
97
123
|
}
|
|
@@ -105,6 +131,7 @@ export default connect(
|
|
|
105
131
|
'selectGrameneSuggestions',
|
|
106
132
|
'selectSuggestionsQuery',
|
|
107
133
|
'selectGrameneTaxonomy',
|
|
134
|
+
'selectConfiguration',
|
|
108
135
|
'doAcceptSuggestion',
|
|
109
136
|
'doAcceptGrameneSuggestion',
|
|
110
137
|
Suggestions
|
package/src/demo.js
CHANGED
|
@@ -40,7 +40,7 @@ const subsitelut = {
|
|
|
40
40
|
const panSites = [
|
|
41
41
|
{
|
|
42
42
|
id: 'main',
|
|
43
|
-
name: 'Gramene
|
|
43
|
+
name: 'Gramene Plants',
|
|
44
44
|
url: 'https://www.gramene.org',
|
|
45
45
|
ensemblURL: 'https://ensembl.gramene.org',
|
|
46
46
|
ensemblSite: 'https://ensembl.gramene.org',
|
|
@@ -60,25 +60,25 @@ const panSites = [
|
|
|
60
60
|
xrefs: true
|
|
61
61
|
},
|
|
62
62
|
panSite : {
|
|
63
|
-
sorghum_bicolor : {
|
|
64
|
-
url: "https://sorghumbase.org/genes?idList=",
|
|
65
|
-
name: "SorghumBase",
|
|
66
|
-
svg: "./static/images/sorghum_logo.svg"
|
|
67
|
-
},
|
|
68
|
-
vitis_vinifera : {
|
|
69
|
-
url: "https://vitis.gramene.org?idList=",
|
|
70
|
-
name: "Gramene Grapevine",
|
|
71
|
-
svg: "./static/images/grapevine_logo.svg"
|
|
72
|
-
},
|
|
73
63
|
oryza_sativa : {
|
|
74
|
-
url: "https://oryza.gramene.org
|
|
64
|
+
url: "https://oryza.gramene.org",
|
|
75
65
|
name: "Gramene Oryza",
|
|
76
66
|
svg: "./static/images/oryza_logo.svg"
|
|
77
67
|
},
|
|
78
68
|
zea_mays : {
|
|
79
|
-
url: "https://maize-pangenome.gramene.org
|
|
69
|
+
url: "https://maize-pangenome.gramene.org",
|
|
80
70
|
name: "Gramene Maize",
|
|
81
71
|
svg: "./static/images/maize_logo.svg"
|
|
72
|
+
},
|
|
73
|
+
vitis_vinifera : {
|
|
74
|
+
url: "https://vitis.gramene.org",
|
|
75
|
+
name: "Gramene Grapevine",
|
|
76
|
+
svg: "./static/images/grapevine_logo.svg"
|
|
77
|
+
},
|
|
78
|
+
sorghum_bicolor : {
|
|
79
|
+
url: "https://sorghumbase.org/genes",
|
|
80
|
+
name: "SorghumBase",
|
|
81
|
+
svg: "./static/images/sorghum_logo.svg"
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
84
|
},
|