Skip to content

Commit 334256c

Browse files
author
Baohong Zhang
committed
Conflicts: VIPInterface.py config.sh update.index_template.sh
2 parents 7b96bf9 + 062b82c commit 334256c

4 files changed

Lines changed: 26 additions & 2 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ whole or sliced single cell dataset.
3838

3939
# Installation instruction
4040

41-
## 0. Install anaconda python 3.7 and nodejs if not available on server
41+
## 0. Install anaconda python 3.7 if not available on server
4242
- Anaconda3-2020.02-Linux-x86_64.sh
43-
- node-v12.16.2-linux-x64
43+
- jq is needed for cellxgene ver > 0.16 ("yum install jq" or "apt-get install jq" or "brew install jq")
4444

4545
## 1. create and enable conda environment
4646
``` bash

VIPInterface.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
api_version = "/api/v0.2"
3939

4040
def route(data,appConfig=None,CLItmp="/tmp"):
41+
ppr.pprint("current working dir:%s"%os.getcwd())
4142
if appConfig is None:
4243
data["url"] = f'http://127.0.0.1:8888/{api_version}'
4344
else:
@@ -1146,7 +1147,12 @@ def CLI(data):
11461147
f.write(script)
11471148

11481149
res = subprocess.run('jupytext --to notebook --output - %s | jupyter nbconvert --ExecutePreprocessor.timeout=1800 --to html --execute --stdin --stdout'%strScript,capture_output=True,shell=True)
1150+
<<<<<<< HEAD
11491151
# ppr.pprint(res)
1152+
=======
1153+
if 'Error' in res.stderr.decode('utf-8'):
1154+
raise ValueError(res.stderr.decode('utf-8'))
1155+
>>>>>>> 062b82c9e32d649226ea12dd019b458f6aa5782d
11501156
html = res.stdout.decode('utf-8')
11511157
h,s,e = html.partition('<div class="cell border-box-sizing code_cell rendered">')
11521158
h1,s,e = e.partition('<div class="cell border-box-sizing code_cell rendered">') ## remove the first cell

config.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@ conda install -c conda-forge -y nodejs=13 fsspec=0.8.2
1515
rm -rf cellxgene
1616
git clone https://github.com/chanzuckerberg/cellxgene.git
1717
cd cellxgene
18+
<<<<<<< HEAD
1819
git checkout d99aac49564b98a51ebfab114fd59846c693fd62 # 735eb11eb78b5e6c35ba84438970d0ce369604e1 (v0.15.0)
20+
=======
21+
git checkout 735eb11eb78b5e6c35ba84438970d0ce369604e1
22+
>>>>>>> 062b82c9e32d649226ea12dd019b458f6aa5782d
1923
cd ..
2024

2125
## update the client-side source code of cellxgene for VIP

update.index_template.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
#!/usr/bin/env bash
22
## obtain original index_template.html etc.
3+
<<<<<<< HEAD
34
cd cellxgene; git checkout d99aac49564b98a51ebfab114fd59846c693fd62 client/index_template.html client/src/components/leftSidebar/topLeftLogoAndTitle.js client/src/components/leftSidebar/index.js; cd ..
5+
=======
6+
cd cellxgene
7+
git checkout 735eb11eb78b5e6c35ba84438970d0ce369604e1 client/index_template.html client/src/components/leftSidebar/topLeftLogoAndTitle.js client/src/components/leftSidebar/index.js
8+
cd ..
9+
>>>>>>> 062b82c9e32d649226ea12dd019b458f6aa5782d
410

511
read -d '' insertL << EOF
612
<script src="https://interactivereport.github.io/cellxgene_VIP/static/jquery.min.js"></script>
@@ -39,7 +45,11 @@ read -d '' insertL << EOF
3945
},
4046
headerTitle: function () {return '<strong>Visualization in Plugin</strong>'},
4147
contentAjax: {
48+
<<<<<<< HEAD
4249
url: 'static/interface.html',
50+
=======
51+
url: window.location.href.replace(/\\\/+$/,'')+'/static/interface.html',
52+
>>>>>>> 062b82c9e32d649226ea12dd019b458f6aa5782d
4353
done: function (panel) {
4454
setInnerHTML(panel.content, this.responseText);
4555
}
@@ -71,9 +81,13 @@ sed -i "s|<div id=\"root\"></div>|$insertL\n&|" "cellxgene/client/index_template
7181
sed -i "s|logoRelatedPadding = 50|logoRelatedPadding = 60|" "cellxgene/client/src/components/leftSidebar/index.js"
7282

7383
strPath=$(python -c "import server as _; print(_.__file__.replace('/server/__init__.py',''))")
84+
<<<<<<< HEAD
7485
cd cellxgene/client; make build
7586
cp build/index.html $strPath/server/common/web/templates/
7687
rm $strPath/server/common/web/static/main-*.*
7788
rm $strPath/server/common/web/static/obsolete-*.*
7889
cp build/static/* $strPath/server/common/web/static/
7990
cd ../..
91+
=======
92+
cd cellxgene/client; make build; cp build/index.html $strPath/server/common/web/templates/; cd ../..
93+
>>>>>>> 062b82c9e32d649226ea12dd019b458f6aa5782d

0 commit comments

Comments
 (0)