gramene-search 1.2.43 → 1.2.45
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/0eebcef07661bc3d +0 -0
- package/.parcel-cache/109421cc5334effc +0 -0
- package/.parcel-cache/2de2aad73a84c506.txt +2 -2
- package/.parcel-cache/475da2e0135128de +0 -0
- package/.parcel-cache/{7d5c38d7f620c528 → 576f7d1c36b6030e} +0 -0
- package/.parcel-cache/{67c53b36ad94e1ac → 88a6f19f4238c9d2} +0 -0
- package/.parcel-cache/{4571fc94d5a9c78d → 90782a5eb630f3a1} +0 -0
- package/.parcel-cache/data.mdb +0 -0
- package/.parcel-cache/lock.mdb +0 -0
- package/dist/index.js +35 -10
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/bundles/filters.js +9 -0
- package/src/components/results/GeneList.js +19 -3
- package/src/components/results/details/Homology.js +1 -23
- package/src/components/utils.js +22 -0
- package/src/demo.js +2 -2
package/package.json
CHANGED
package/src/bundles/filters.js
CHANGED
|
@@ -474,6 +474,15 @@ grameneFilters.reactGrameneFilters = createSelector(
|
|
|
474
474
|
if (queryObject.hasOwnProperty('idList')) {
|
|
475
475
|
return handleIdList(queryObject);
|
|
476
476
|
}
|
|
477
|
+
if (queryObject.hasOwnProperty('fq_field') && queryObject.hasOwnProperty('fq_value')
|
|
478
|
+
&& queryObject.hasOwnProperty('category') && queryObject.hasOwnProperty('name')) {
|
|
479
|
+
return {
|
|
480
|
+
type: 'BATCH_ACTIONS', actions: [
|
|
481
|
+
{type: 'GRAMENE_SEARCH_CLEARED'},
|
|
482
|
+
{type: 'GRAMENE_FILTER_ADDED', payload: queryObject}
|
|
483
|
+
]
|
|
484
|
+
};
|
|
485
|
+
}
|
|
477
486
|
const url = new URL(myUrl.href);
|
|
478
487
|
if (url.pathname === '/genes') {
|
|
479
488
|
return {type: 'GRAMENE_FILTERS_CLEARED'}
|
|
@@ -8,6 +8,7 @@ import Location from './details/Location'
|
|
|
8
8
|
import Pathways from "./details/Pathways"
|
|
9
9
|
import Xrefs from "./details/Xrefs"
|
|
10
10
|
import Publications from "./details/Publications"
|
|
11
|
+
import {suggestionToFilters} from "../utils";
|
|
11
12
|
import {GrFormPrevious, GrFormNextLink, GrFormNext, GrHpe} from 'react-icons/gr'
|
|
12
13
|
import { Badge, OverlayTrigger, Tooltip } from 'react-bootstrap'
|
|
13
14
|
|
|
@@ -44,24 +45,34 @@ function trimSummary(summary) {
|
|
|
44
45
|
}
|
|
45
46
|
}
|
|
46
47
|
|
|
47
|
-
const
|
|
48
|
+
const ClosestOrthologCmp = (props) =>
|
|
48
49
|
{
|
|
49
|
-
let name, desc, species;
|
|
50
|
+
let id, name, desc, species;
|
|
51
|
+
const gene = props.gene;
|
|
50
52
|
|
|
51
53
|
if (gene.model_rep_id) {
|
|
52
54
|
name = gene.model_rep_name || gene.model_rep_id;
|
|
53
55
|
desc = gene.model_rep_description;
|
|
54
56
|
species = gene.model_rep_species_name;
|
|
57
|
+
id = gene.model_rep_id;
|
|
55
58
|
}
|
|
56
59
|
|
|
57
60
|
else if (gene.closest_rep_id) {
|
|
58
61
|
name = gene.closest_rep_name || gene.closest_rep_id;
|
|
59
62
|
desc = gene.closest_rep_description;
|
|
60
63
|
species = gene.closest_rep_species_name;
|
|
64
|
+
id = gene.closest_rep_id;
|
|
61
65
|
}
|
|
62
66
|
|
|
63
67
|
return (
|
|
64
|
-
<div className="closest-ortholog"
|
|
68
|
+
<div className="closest-ortholog" onClick={
|
|
69
|
+
props.doReplaceGrameneFilters(suggestionToFilters({
|
|
70
|
+
category: 'Gene',
|
|
71
|
+
fq_field: 'id',
|
|
72
|
+
fq_value: id,
|
|
73
|
+
name: name
|
|
74
|
+
}))
|
|
75
|
+
}>
|
|
65
76
|
<h4>
|
|
66
77
|
<span className="gene-id">{name}</span>
|
|
67
78
|
<small className="species-name"> {species}</small>
|
|
@@ -71,6 +82,11 @@ const ClosestOrtholog = ({gene}) =>
|
|
|
71
82
|
);
|
|
72
83
|
};
|
|
73
84
|
|
|
85
|
+
const ClosestOrtholog = connect(
|
|
86
|
+
'doReplaceGrameneFilters',
|
|
87
|
+
ClosestOrthologCmp
|
|
88
|
+
);
|
|
89
|
+
|
|
74
90
|
function renderClosestOrtholog(gene) {
|
|
75
91
|
|
|
76
92
|
if (shouldShowClosestOrtholog(gene)) {
|
|
@@ -4,33 +4,11 @@ import {connect} from "redux-bundler-react";
|
|
|
4
4
|
import TreeVis from "gramene-genetree-vis";
|
|
5
5
|
import treesClient from "gramene-trees-client";
|
|
6
6
|
import {Detail, Title, Description, Content, Explore, Links} from "./generic";
|
|
7
|
+
import {suggestionToFilters} from "../../utils";
|
|
7
8
|
import {Spinner, Alert} from "react-bootstrap";
|
|
8
9
|
import '../../../../node_modules/gramene-genetree-vis/src/styles/msa.less';
|
|
9
10
|
import '../../../../node_modules/gramene-genetree-vis/src/styles/tree.less';
|
|
10
11
|
|
|
11
|
-
function suggestionToFilters(suggestion) {
|
|
12
|
-
return {
|
|
13
|
-
status: 'init',
|
|
14
|
-
rows: 20,
|
|
15
|
-
operation: 'AND',
|
|
16
|
-
negate: false,
|
|
17
|
-
leftIdx: 0,
|
|
18
|
-
rightIdx: 3,
|
|
19
|
-
children: [
|
|
20
|
-
{
|
|
21
|
-
fq_field: suggestion.fq_field,
|
|
22
|
-
fq_value: suggestion.fq_value,
|
|
23
|
-
name: suggestion.name,
|
|
24
|
-
category: suggestion.category,
|
|
25
|
-
leftIdx: 1,
|
|
26
|
-
rightIdx: 2,
|
|
27
|
-
negate: false,
|
|
28
|
-
marked: false
|
|
29
|
-
}
|
|
30
|
-
]
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
12
|
class Homology extends React.Component {
|
|
35
13
|
constructor(props) {
|
|
36
14
|
super(props);
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export const suggestionToFilters = (suggestion) => {
|
|
2
|
+
return {
|
|
3
|
+
status: 'init',
|
|
4
|
+
rows: 20,
|
|
5
|
+
operation: 'AND',
|
|
6
|
+
negate: false,
|
|
7
|
+
leftIdx: 0,
|
|
8
|
+
rightIdx: 3,
|
|
9
|
+
children: [
|
|
10
|
+
{
|
|
11
|
+
fq_field: suggestion.fq_field,
|
|
12
|
+
fq_value: suggestion.fq_value,
|
|
13
|
+
name: suggestion.name,
|
|
14
|
+
category: suggestion.category,
|
|
15
|
+
leftIdx: 1,
|
|
16
|
+
rightIdx: 2,
|
|
17
|
+
negate: false,
|
|
18
|
+
marked: false
|
|
19
|
+
}
|
|
20
|
+
]
|
|
21
|
+
}
|
|
22
|
+
}
|
package/src/demo.js
CHANGED
|
@@ -43,7 +43,7 @@ const panSites = [
|
|
|
43
43
|
url: 'https://www.gramene.org',
|
|
44
44
|
ensemblURL: 'https://ensembl.gramene.org',
|
|
45
45
|
ensemblSite: 'https://ensembl.gramene.org',
|
|
46
|
-
ensemblRest: 'https://data.gramene.org/
|
|
46
|
+
ensemblRest: 'https://data.gramene.org/ensembl66',
|
|
47
47
|
grameneData: 'https://data.gramene.org/v66',
|
|
48
48
|
targetTaxonId: 3702,
|
|
49
49
|
alertText: 'Main site'
|
|
@@ -101,7 +101,7 @@ const panSites = [
|
|
|
101
101
|
url: 'https://oryza.gramene.org',
|
|
102
102
|
ensemblStie: 'https://ensembl-oryza.gramene.org',
|
|
103
103
|
ensemblRest: 'https://data.gramene.org/pansite-ensembl-87',
|
|
104
|
-
grameneData: 'https://data.gramene.org/
|
|
104
|
+
grameneData: 'https://data.gramene.org/oryza_v5',
|
|
105
105
|
targetTaxonId: 3702,
|
|
106
106
|
alertText: 'Rice site'
|
|
107
107
|
},
|