gramene-search 1.2.79 → 1.2.81

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.
@@ -1,2 +1,2 @@
1
- 411207239
2
- 1698676733984303000
1
+ 412207113
2
+ 1698694476766638000
Binary file
Binary file
Binary file
Binary file
Binary file
package/dist/index.js CHANGED
@@ -1804,12 +1804,92 @@ var $541b8b0d8c5501d2$export$2e2bcd8739ae039 = (0, $gXNCa$reduxbundlerreact.conn
1804
1804
 
1805
1805
 
1806
1806
 
1807
+ const $9e29a4f60318db7a$var$ImageLoader = (props)=>{
1808
+ const [loading, setLoading] = (0, $gXNCa$react.useState)(true);
1809
+ (0, $gXNCa$react.useEffect)(()=>{
1810
+ const image = new Image();
1811
+ image.src = props.url;
1812
+ image.onload = ()=>{
1813
+ setLoading(false);
1814
+ };
1815
+ }, []);
1816
+ return /*#__PURE__*/ (0, $gXNCa$reactjsxruntime.jsxs)("div", {
1817
+ className: "BAR-container",
1818
+ children: [
1819
+ loading && /*#__PURE__*/ (0, $gXNCa$reactjsxruntime.jsx)("img", {
1820
+ src: "https://www.sorghumbase.org/static/images/dna_spinner.svg",
1821
+ alt: "Loading..."
1822
+ }),
1823
+ !loading && /*#__PURE__*/ (0, $gXNCa$reactjsxruntime.jsx)("img", {
1824
+ style: {
1825
+ "max-width": "100%"
1826
+ },
1827
+ src: props.url
1828
+ })
1829
+ ]
1830
+ });
1831
+ };
1807
1832
  const $9e29a4f60318db7a$var$Detail = (props)=>{
1808
1833
  const gene = props.geneDocs[props.searchResult.id];
1809
1834
  let paralogs_url;
1810
- let efp_browser;
1835
+ let efp_browser = {
1836
+ show: false
1837
+ };
1811
1838
  let gene_url = `/static/atlasWidget.html?reference=0&genes=${gene.atlas_id || gene._id}`;
1812
- gene.taxon_id;
1839
+ if (gene.system_name === "sorghum_bicolor") {
1840
+ efp_browser.show = true;
1841
+ efp_browser.options = [
1842
+ {
1843
+ value: "Developmental_Atlas",
1844
+ label: "Developmental Atlas"
1845
+ },
1846
+ {
1847
+ value: "Stress_Atlas",
1848
+ label: "Stress Atlas"
1849
+ }
1850
+ ];
1851
+ efp_browser.gene = gene._id.replace("SORBI_3", "Sobic.");
1852
+ efp_browser.path = `https://bar.utoronto.ca/api/efp_image/efp_sorghum`;
1853
+ efp_browser.bar = "https://bar.utoronto.ca/~asher/efp_sorghum/cgi-bin/efpWeb.cgi?";
1854
+ // efp_browser = `https://bar.utoronto.ca/api/efp_image/efp_sorghum/Stress_Atlas/Absolute/${gene._id.replace('SORBI_3','Sobic.')}`
1855
+ // efp_browser = `https://bar.utoronto.ca/api/efp_image/efp_sorghum/`
1856
+ // efp_browser = `https://bar.utoronto.ca/~asher/efp_sorghum/cgi-bin/efpWeb.cgi?dataSource=Developmental_Atlas&mode=Absolute&primaryGene=${gene._id.replace('SORBI_3','Sobic.')}`
1857
+ }
1858
+ if (efp_browser.show) {
1859
+ const [selectedStudy, setSelectedStudy] = (0, $gXNCa$react.useState)(efp_browser.options[0].value);
1860
+ const handleSelectChange = (event)=>{
1861
+ setSelectedStudy(event.target.value);
1862
+ };
1863
+ efp_browser.content = /*#__PURE__*/ (0, $gXNCa$reactjsxruntime.jsxs)("div", {
1864
+ children: [
1865
+ /*#__PURE__*/ (0, $gXNCa$reactjsxruntime.jsx)("label", {
1866
+ children: "Select a study:"
1867
+ }),
1868
+ /*#__PURE__*/ (0, $gXNCa$reactjsxruntime.jsx)("select", {
1869
+ value: selectedStudy,
1870
+ onChange: handleSelectChange,
1871
+ children: efp_browser.options.map((o)=>/*#__PURE__*/ (0, $gXNCa$reactjsxruntime.jsx)("option", {
1872
+ value: o.value,
1873
+ children: o.label
1874
+ }))
1875
+ }),
1876
+ /*#__PURE__*/ (0, $gXNCa$reactjsxruntime.jsx)("br", {}),
1877
+ /*#__PURE__*/ (0, $gXNCa$reactjsxruntime.jsx)($9e29a4f60318db7a$var$ImageLoader, {
1878
+ url: `${efp_browser.path}/${selectedStudy}/Absolute/${efp_browser.gene}`
1879
+ }),
1880
+ /*#__PURE__*/ (0, $gXNCa$reactjsxruntime.jsxs)("a", {
1881
+ href: `${efp_browser.bar}?dataSource=${selectedStudy}&mode=Absolute&primaryGene=${efp_browser.gene}`,
1882
+ children: [
1883
+ "Powered by ",
1884
+ /*#__PURE__*/ (0, $gXNCa$reactjsxruntime.jsx)("img", {
1885
+ src: "https://bar.utoronto.ca/bbc_logo_small.gif"
1886
+ }),
1887
+ " BAR Webservices"
1888
+ ]
1889
+ })
1890
+ ]
1891
+ });
1892
+ }
1813
1893
  if (props.paralogExpression && props.paralogExpression[gene._id]) {
1814
1894
  let paralogs = props.paralogExpression[gene._id].map((p)=>p.atlas_id || p.id);
1815
1895
  if (paralogs.length > 1) paralogs_url = `/static/atlasWidget.html?reference=1&genes=${paralogs.join(" ")}`;
@@ -1836,9 +1916,10 @@ const $9e29a4f60318db7a$var$Detail = (props)=>{
1836
1916
  height: "500px"
1837
1917
  })
1838
1918
  }),
1839
- efp_browser && /*#__PURE__*/ (0, $gXNCa$reactjsxruntime.jsx)((0, $gXNCa$reactbootstrap.Tab), {
1919
+ efp_browser.show && /*#__PURE__*/ (0, $gXNCa$reactjsxruntime.jsx)((0, $gXNCa$reactbootstrap.Tab), {
1840
1920
  eventKey: "eFP",
1841
- title: "eFP browser (BAR)"
1921
+ title: "eFP browser (BAR)",
1922
+ children: efp_browser.content
1842
1923
  })
1843
1924
  ]
1844
1925
  });
@@ -4300,6 +4381,28 @@ const $693dd8c7a5607c3a$var$ViewsCmp = (props)=>/*#__PURE__*/ (0, $gXNCa$reactjs
4300
4381
  },
4301
4382
  children: view.name
4302
4383
  }, idx))
4384
+ }),
4385
+ /*#__PURE__*/ (0, $gXNCa$reactjsxruntime.jsxs)("div", {
4386
+ children: [
4387
+ "\xa0Key:",
4388
+ /*#__PURE__*/ (0, $gXNCa$reactjsxruntime.jsxs)("ul", {
4389
+ className: "gramene-view",
4390
+ children: [
4391
+ /*#__PURE__*/ (0, $gXNCa$reactjsxruntime.jsx)("li", {
4392
+ className: "gramene-view-on",
4393
+ children: "On"
4394
+ }),
4395
+ /*#__PURE__*/ (0, $gXNCa$reactjsxruntime.jsx)("li", {
4396
+ className: "gramene-view-off",
4397
+ children: "Off"
4398
+ }),
4399
+ /*#__PURE__*/ (0, $gXNCa$reactjsxruntime.jsx)("li", {
4400
+ className: "gramene-view-disabled",
4401
+ children: "Disabled"
4402
+ })
4403
+ ]
4404
+ })
4405
+ ]
4303
4406
  })
4304
4407
  ]
4305
4408
  });