From 4ea86eb85ef65e827aa9f62828f035dc9248d983 Mon Sep 17 00:00:00 2001
From: "Gervaise H. Henry" <gervaise.henry@gmail.com>
Date: Mon, 3 Aug 2020 11:11:19 -0500
Subject: [PATCH] Add CZI hosted cellxgene visualizations

---
 archetypes/sc.data.md                            |  3 +++
 content/sc.data/PdPgb.md                         |  3 +++
 content/sc.data/cellxgene_2018CellReports.md     | 13 -------------
 content/sc.data/cellxgene_2020Prostate.PdPgb.md  | 13 -------------
 content/sc.data/cellxgene_2020Prostate.muPrUr.md | 13 -------------
 content/sc.data/cellxgene_huPr_PdPgb_epi.md      | 15 +++++++++++++++
 content/sc.data/cellxgene_huPr_Pd_all.md         | 15 +++++++++++++++
 content/sc.data/cellxgene_huPr_Pd_epi.md         | 15 +++++++++++++++
 content/sc.data/cellxgene_huPr_Pd_fmst.md        | 15 +++++++++++++++
 content/sc.data/cellxgene_muPrUr_epi.md          | 15 +++++++++++++++
 content/sc.data/hu.Pd.deep.md                    |  3 +++
 content/sc.data/muPrUr.md                        |  3 +++
 layouts/custom/cellxgene.html                    |  2 +-
 layouts/custom/sc.data.html                      |  9 ++++++++-
 14 files changed, 96 insertions(+), 41 deletions(-)
 delete mode 100644 content/sc.data/cellxgene_2018CellReports.md
 delete mode 100644 content/sc.data/cellxgene_2020Prostate.PdPgb.md
 delete mode 100644 content/sc.data/cellxgene_2020Prostate.muPrUr.md
 create mode 100644 content/sc.data/cellxgene_huPr_PdPgb_epi.md
 create mode 100644 content/sc.data/cellxgene_huPr_Pd_all.md
 create mode 100644 content/sc.data/cellxgene_huPr_Pd_epi.md
 create mode 100644 content/sc.data/cellxgene_huPr_Pd_fmst.md
 create mode 100644 content/sc.data/cellxgene_muPrUr_epi.md

diff --git a/archetypes/sc.data.md b/archetypes/sc.data.md
index 02b9016..d3f009c 100644
--- a/archetypes/sc.data.md
+++ b/archetypes/sc.data.md
@@ -7,7 +7,10 @@ draft: true
 weight: ""
 type: "custom"
 layout: ""
+cellxgene: false
+cxg_link: ""
 current: true
+location: ""
 ---
 
 **PENDING**
\ No newline at end of file
diff --git a/content/sc.data/PdPgb.md b/content/sc.data/PdPgb.md
index 5d3d398..91faaa1 100644
--- a/content/sc.data/PdPgb.md
+++ b/content/sc.data/PdPgb.md
@@ -7,5 +7,8 @@ draft: false
 weight: "2"
 type: "custom"
 layout: "hu.PdPgb"
+cellxgene: false
+cxg_link: ""
 current: true
+location: ""
 ---
diff --git a/content/sc.data/cellxgene_2018CellReports.md b/content/sc.data/cellxgene_2018CellReports.md
deleted file mode 100644
index 6be3f18..0000000
--- a/content/sc.data/cellxgene_2018CellReports.md
+++ /dev/null
@@ -1,13 +0,0 @@
----
-title: "Human Normal Prostate"
-description: "As published in 2018 Cell Reports (cellxgene: in development)"
-name: "Human Normal Prostate: As published in 2018 Cell Reports"
-date: 2019-12-24T21:46:39-06:00
-draft: false
-weight: "2"
-type: "custom"
-layout: "cellxgene"
-current: false
-location: "PublishedData/2018CellReports/2018CellReports_huPr_all"
----
-
diff --git a/content/sc.data/cellxgene_2020Prostate.PdPgb.md b/content/sc.data/cellxgene_2020Prostate.PdPgb.md
deleted file mode 100644
index 96643b7..0000000
--- a/content/sc.data/cellxgene_2020Prostate.PdPgb.md
+++ /dev/null
@@ -1,13 +0,0 @@
----
-title: "Human Normal and BPH Prostate Epithelia"
-description: ": As published in 2020 Prostate (cellxgene: in development)"
-name: "Human Normal and BPH Prostate Epithelia: As published in 2020 Prostate"
-date: 2019-12-24T21:46:39-06:00
-draft: false
-weight: "3"
-type: "custom"
-layout: "cellxgene"
-current: false
-location: "PublishedData/2020Prostate/2020Prostate_huPr_PdPgb_epi"
----
-
diff --git a/content/sc.data/cellxgene_2020Prostate.muPrUr.md b/content/sc.data/cellxgene_2020Prostate.muPrUr.md
deleted file mode 100644
index 8bd60a7..0000000
--- a/content/sc.data/cellxgene_2020Prostate.muPrUr.md
+++ /dev/null
@@ -1,13 +0,0 @@
----
-title: "Mouse Prostate and Urethral Epithelia"
-description: "As published in 2020 Prostate (cellxgene: in development)"
-name: "Mouse Prostate and Urethral Epithelia: As published in 2020 Prostate"
-date: 2019-12-24T21:46:39-06:00
-draft: false
-weight: "4"
-type: "custom"
-layout: "cellxgene"
-current: false
-location: "PublishedData/2020Prostate/2020Prostate_muPrUr_epi"
----
-
diff --git a/content/sc.data/cellxgene_huPr_PdPgb_epi.md b/content/sc.data/cellxgene_huPr_PdPgb_epi.md
new file mode 100644
index 0000000..ea99eda
--- /dev/null
+++ b/content/sc.data/cellxgene_huPr_PdPgb_epi.md
@@ -0,0 +1,15 @@
+---
+title: "Human Normal and BPH Prostate: Epithelial Cells"
+description: "As published in 2020 Prostate (cellxgene)"
+name: "Human Normal and BPH Prostate: Epithelial Cells"
+date: 2019-12-24T21:46:39-06:00
+draft: false
+weight: "4"
+type: "custom"
+layout: "cellxgene"
+cellxgene: true
+cxg_link: "https://cellxgene.cziscience.com/d/599b5549-3611-41e1-884f-d5c16b2efd31.cxg"
+current: true
+location: ""
+---
+
diff --git a/content/sc.data/cellxgene_huPr_Pd_all.md b/content/sc.data/cellxgene_huPr_Pd_all.md
new file mode 100644
index 0000000..656592d
--- /dev/null
+++ b/content/sc.data/cellxgene_huPr_Pd_all.md
@@ -0,0 +1,15 @@
+---
+title: "Human Normal Prostate: All Cells"
+description: "As published in 2018 Cell Reports and updated in 2020 The Prostate (cellxgene)"
+name: "Human Normal Prostate: All Cells"
+date: 2019-12-24T21:46:39-06:00
+draft: false
+weight: "1"
+type: "custom"
+layout: "cellxgene"
+cellxgene: true
+cxg_link: "https://cellxgene.cziscience.com/d/dd811609-3d83-4bdb-801f-d6c6c93d1a9e.cxg"
+current: true
+location: ""
+---
+
diff --git a/content/sc.data/cellxgene_huPr_Pd_epi.md b/content/sc.data/cellxgene_huPr_Pd_epi.md
new file mode 100644
index 0000000..def5ed9
--- /dev/null
+++ b/content/sc.data/cellxgene_huPr_Pd_epi.md
@@ -0,0 +1,15 @@
+---
+title: "Human Normal Prostate: Epithelial Cells"
+description: "As published in 2018 Cell Reports and updated in 2020 The Prostate (cellxgene)"
+name: "Human Normal Prostate: Epithelial Cells"
+date: 2019-12-24T21:46:39-06:00
+draft: false
+weight: "2"
+type: "custom"
+layout: "cellxgene"
+cellxgene: true
+cxg_link: "https://cellxgene.cziscience.com/d/47d05a66-7b83-4439-ad18-180d4c262f7a.cxg"
+current: true
+location: ""
+---
+
diff --git a/content/sc.data/cellxgene_huPr_Pd_fmst.md b/content/sc.data/cellxgene_huPr_Pd_fmst.md
new file mode 100644
index 0000000..a714570
--- /dev/null
+++ b/content/sc.data/cellxgene_huPr_Pd_fmst.md
@@ -0,0 +1,15 @@
+---
+title: "Human Normal Prostate: Fibromuscular Cells"
+description: "As published in 2018 Cell Reports and updated in 2020 The Prostate (cellxgene)"
+name: "Human Normal Prostate: Fibromuscular Cells"
+date: 2019-12-24T21:46:39-06:00
+draft: false
+weight: "2"
+type: "custom"
+layout: "cellxgene"
+cellxgene: true
+cxg_link: "https://cellxgene.cziscience.com/d/e0802089-01a0-4e3a-9dbf-03eac64b15d9.cxg"
+current: true
+location: ""
+---
+
diff --git a/content/sc.data/cellxgene_muPrUr_epi.md b/content/sc.data/cellxgene_muPrUr_epi.md
new file mode 100644
index 0000000..c9af907
--- /dev/null
+++ b/content/sc.data/cellxgene_muPrUr_epi.md
@@ -0,0 +1,15 @@
+---
+title: "Mouse Prostate and Urethral: Epithelial Cells"
+description: "As published in 2020 The Prostate (cellxgene)"
+name: "Mouse Prostate and Urethral: Epithelial Cells"
+date: 2019-12-24T21:46:39-06:00
+draft: false
+weight: "5"
+type: "custom"
+layout: "cellxgene"
+cellxgene: true
+cxg_link: "https://cellxgene.cziscience.com/d/6a2facf2-ea03-407b-b73b-82d582da3930.cxg"
+current: true
+location: ""
+---
+
diff --git a/content/sc.data/hu.Pd.deep.md b/content/sc.data/hu.Pd.deep.md
index 1df059c..5f2fae4 100644
--- a/content/sc.data/hu.Pd.deep.md
+++ b/content/sc.data/hu.Pd.deep.md
@@ -7,7 +7,10 @@ draft: false
 weight: "1"
 type: "custom"
 layout: "hu.Pd.deep"
+cellxgene: false
+cxg_link: ""
 current: true
+location: ""
 aliases: /analysis.php
 ---
 
diff --git a/content/sc.data/muPrUr.md b/content/sc.data/muPrUr.md
index efd8938..e1d9f8d 100644
--- a/content/sc.data/muPrUr.md
+++ b/content/sc.data/muPrUr.md
@@ -7,5 +7,8 @@ draft: false
 weight: "3"
 type: "custom"
 layout: "mu.PrUr"
+cellxgene: false
+cxg_link: ""
 current: true
+location: ""
 ---
diff --git a/layouts/custom/cellxgene.html b/layouts/custom/cellxgene.html
index 9a151a2..19923a5 100644
--- a/layouts/custom/cellxgene.html
+++ b/layouts/custom/cellxgene.html
@@ -29,7 +29,7 @@
 }
 </style>
 <div class="cellxgene">
-    <iframe name="embed" src="https://cellxgene.strandlab.net/view/{{ .Params.location }}.h5ad/" width="100%" height="100%" frameborder="0" allowfullscreen="" ></iframe>
+    <iframe name="embed" src="{{ .Params.cxg_link }}" width="100%" height="100%" frameborder="0" allowfullscreen="" ></iframe>
 </div>
 <div class="no-cellxgene">
     <h2>Screen width too narrow to display cellxgene</h1>
diff --git a/layouts/custom/sc.data.html b/layouts/custom/sc.data.html
index d6903cb..6364915 100644
--- a/layouts/custom/sc.data.html
+++ b/layouts/custom/sc.data.html
@@ -109,12 +109,19 @@
 </div>
 <div class="content">
     <hr>
+    <h2>Visualization with <a href="https://chanzuckerberg.github.io/cellxgene/">CZI's cellxgene</a></h2>
+    {{ range where .Pages.ByWeight "Params.cellxgene" true }}
+    <li><b><a href="{{.Permalink}}">{{.Params.name}}</a></b></li>
+    {{ end }}
     <br>
-    {{ range where .Pages.ByWeight "Params.current" true }}
+    <hr>
+    <h2>Legacy Visualization</h2>
+    {{ range where .Pages.ByWeight "Params.cellxgene" false }}
     <li><b><a href="{{.Permalink}}">{{.Params.name}}</a></b></li>
     {{ end }}
     <br>
     <hr>
+    <br>
 </div>
 
 <script>
-- 
GitLab