Skip to content

Commit d522b05

Browse files
committed
update readme and docs
1 parent f32e26f commit d522b05

23 files changed

+284
-322
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,13 @@ Click picture to view the source code
7070
</a>
7171
</td>
7272
<td style="width:33%; background-color:white;text-align:center; vertical-align:middle">
73-
<a href="https://dingwb.github.io/PyComplexHeatmap/build/html/notebooks/kwargs.html#Modifying-xlabel-and-ylabel-using-xlabel_kws-and-ylabel_kws">
73+
<a href="https://dingwb.github.io/PyComplexHeatmap/build/html/notebooks/anno_img_example.html#Visualizing-motif-enrichment-results-using-anno_img">
7474
<img src="docs/images/gallery11.png" title="Modify labels" align="center" width="250px">
7575
</a>
7676
</td>
7777
<td style="width:33%; background-color:white;text-align:center; vertical-align:middle">
7878
<a href="https://dingwb.github.io/PyComplexHeatmap/build/html/notebooks/composite_heatmaps.html#Composite-two-heatmaps-horizontally-for-mouse-DNA-methylation-array-dataset">
79-
<img src="docs/images/gallery3.jpg" title="Combine two heatmap horizontally" align="center" width="250px">
79+
<img src="docs/images/gallery3.png" title="Combine two heatmap horizontally" align="center" width="250px">
8080
</a>
8181
</td>
8282
</tr>
355 Bytes
Binary file not shown.

docs/build/doctrees/nbsphinx/notebooks/anno_img_example.ipynb

Lines changed: 61 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"mpl.rcParams['figure.dpi'] = 80\n",
3333
"mpl.rcParams['savefig.dpi']=300\n",
3434
"import pickle\n",
35-
"# sys.path.append(os.path.expanduser(\"~/Projects/Github/PyComplexHeatmap\"))\n",
35+
"sys.path.append(os.path.expanduser(\"~/Projects/Github/PyComplexHeatmap\"))\n",
3636
"from PyComplexHeatmap import (\n",
3737
" ClusterMapPlotter,DotClustermapPlotter,HeatmapAnnotation,anno_simple,anno_scatterplot,anno_lineplot,anno_barplot,\n",
3838
" anno_label,anno_boxplot,anno_img,\n",
@@ -701,25 +701,6 @@
701701
"execution_count": 6,
702702
"id": "70924974-bcda-4a49-9552-01cf38312a52",
703703
"metadata": {},
704-
"outputs": [],
705-
"source": [
706-
"# # download image to local\n",
707-
"# import requests\n",
708-
"# img_dir='images'\n",
709-
"# if not os.path.exists(img_dir):\n",
710-
"# os.mkdir(img_dir)\n",
711-
"# for url in df_row.Logo.tolist():\n",
712-
"# img_data = requests.get(url).content\n",
713-
"# file=os.path.basename(url)\n",
714-
"# with open(os.path.join(img_dir,file), 'wb') as handler:\n",
715-
"# handler.write(img_data)"
716-
]
717-
},
718-
{
719-
"cell_type": "code",
720-
"execution_count": 7,
721-
"id": "3ffb2fa2-b1b6-4211-999f-c6978bbdf15a",
722-
"metadata": {},
723704
"outputs": [
724705
{
725706
"data": {
@@ -767,7 +748,7 @@
767748
" <td>0.767527</td>\n",
768749
" <td>-0.149461</td>\n",
769750
" <td>ASC|Nfia</td>\n",
770-
" <td>images/jaspar__MA0670.1.png</td>\n",
751+
" <td>https://motifcollections.aertslab.org/v10nr_cl...</td>\n",
771752
" </tr>\n",
772753
" <tr>\n",
773754
" <th>Tcf4</th>\n",
@@ -776,7 +757,7 @@
776757
" <td>0.508175</td>\n",
777758
" <td>-0.282496</td>\n",
778759
" <td>CGE-Vip|Tcf4</td>\n",
779-
" <td>images/tfdimers__MD00119.png</td>\n",
760+
" <td>https://motifcollections.aertslab.org/v10nr_cl...</td>\n",
780761
" </tr>\n",
781762
" <tr>\n",
782763
" <th>Erg</th>\n",
@@ -785,7 +766,7 @@
785766
" <td>0.857981</td>\n",
786767
" <td>-0.114057</td>\n",
787768
" <td>EC|Erg</td>\n",
788-
" <td>images/metacluster_135.7.png</td>\n",
769+
" <td>https://motifcollections.aertslab.org/v10nr_cl...</td>\n",
789770
" </tr>\n",
790771
" <tr>\n",
791772
" <th>Fli1</th>\n",
@@ -794,7 +775,7 @@
794775
" <td>0.747177</td>\n",
795776
" <td>-0.171242</td>\n",
796777
" <td>EC|Fli1</td>\n",
797-
" <td>images/metacluster_135.7.png</td>\n",
778+
" <td>https://motifcollections.aertslab.org/v10nr_cl...</td>\n",
798779
" </tr>\n",
799780
" <tr>\n",
800781
" <th>Zbtb43</th>\n",
@@ -803,7 +784,7 @@
803784
" <td>0.784200</td>\n",
804785
" <td>-0.144034</td>\n",
805786
" <td>Exc|Zbtb43</td>\n",
806-
" <td>images/metacluster_131.8.png</td>\n",
787+
" <td>https://motifcollections.aertslab.org/v10nr_cl...</td>\n",
807788
" </tr>\n",
808789
" <tr>\n",
809790
" <th>Mef2c</th>\n",
@@ -812,7 +793,7 @@
812793
" <td>0.680693</td>\n",
813794
" <td>-0.177612</td>\n",
814795
" <td>IT-L6|Mef2c</td>\n",
815-
" <td>images/transfac_pro__M04846.png</td>\n",
796+
" <td>https://motifcollections.aertslab.org/v10nr_cl...</td>\n",
816797
" </tr>\n",
817798
" <tr>\n",
818799
" <th>Spi1</th>\n",
@@ -821,7 +802,7 @@
821802
" <td>0.736412</td>\n",
822803
" <td>-0.185941</td>\n",
823804
" <td>MGC|Spi1</td>\n",
824-
" <td>images/metacluster_167.5.png</td>\n",
805+
" <td>https://motifcollections.aertslab.org/v10nr_cl...</td>\n",
825806
" </tr>\n",
826807
" <tr>\n",
827808
" <th>Hdx</th>\n",
@@ -830,7 +811,7 @@
830811
" <td>0.852639</td>\n",
831812
" <td>-0.120034</td>\n",
832813
" <td>MGC|Hdx</td>\n",
833-
" <td>images/tfdimers__MD00488.png</td>\n",
814+
" <td>https://motifcollections.aertslab.org/v10nr_cl...</td>\n",
834815
" </tr>\n",
835816
" <tr>\n",
836817
" <th>Bach1</th>\n",
@@ -839,7 +820,7 @@
839820
" <td>0.855795</td>\n",
840821
" <td>-0.100834</td>\n",
841822
" <td>MGE-Pvalb|Bach1</td>\n",
842-
" <td>images/jaspar__MA1633.2.png</td>\n",
823+
" <td>https://motifcollections.aertslab.org/v10nr_cl...</td>\n",
843824
" </tr>\n",
844825
" <tr>\n",
845826
" <th>Sox10</th>\n",
@@ -848,7 +829,7 @@
848829
" <td>0.280051</td>\n",
849830
" <td>-0.354296</td>\n",
850831
" <td>ODC|Sox10</td>\n",
851-
" <td>images/metacluster_4.1.png</td>\n",
832+
" <td>https://motifcollections.aertslab.org/v10nr_cl...</td>\n",
852833
" </tr>\n",
853834
" <tr>\n",
854835
" <th>Sox8</th>\n",
@@ -857,7 +838,7 @@
857838
" <td>0.361547</td>\n",
858839
" <td>-0.215307</td>\n",
859840
" <td>ODC|Sox8</td>\n",
860-
" <td>images/metacluster_4.1.png</td>\n",
841+
" <td>https://motifcollections.aertslab.org/v10nr_cl...</td>\n",
861842
" </tr>\n",
862843
" <tr>\n",
863844
" <th>Emx1</th>\n",
@@ -866,7 +847,7 @@
866847
" <td>0.655946</td>\n",
867848
" <td>-0.114102</td>\n",
868849
" <td>P|Emx1</td>\n",
869-
" <td>images/metacluster_164.1.png</td>\n",
850+
" <td>https://motifcollections.aertslab.org/v10nr_cl...</td>\n",
870851
" </tr>\n",
871852
" <tr>\n",
872853
" <th>Lhx2</th>\n",
@@ -875,7 +856,7 @@
875856
" <td>0.623909</td>\n",
876857
" <td>-0.101292</td>\n",
877858
" <td>P|Lhx2</td>\n",
878-
" <td>images/metacluster_164.1.png</td>\n",
859+
" <td>https://motifcollections.aertslab.org/v10nr_cl...</td>\n",
879860
" </tr>\n",
880861
" <tr>\n",
881862
" <th>Lhx3</th>\n",
@@ -884,7 +865,7 @@
884865
" <td>0.550733</td>\n",
885866
" <td>-0.109488</td>\n",
886867
" <td>P|Lhx3</td>\n",
887-
" <td>images/metacluster_9.26.png</td>\n",
868+
" <td>https://motifcollections.aertslab.org/v10nr_cl...</td>\n",
888869
" </tr>\n",
889870
" <tr>\n",
890871
" <th>Pou5f1</th>\n",
@@ -893,7 +874,7 @@
893874
" <td>0.800837</td>\n",
894875
" <td>-0.124454</td>\n",
895876
" <td>P|Pou5f1</td>\n",
896-
" <td>images/taipale_cyt_meth__POU5F1_NYTAATTATGCGNR...</td>\n",
877+
" <td>https://motifcollections.aertslab.org/v10nr_cl...</td>\n",
897878
" </tr>\n",
898879
" <tr>\n",
899880
" <th>Barhl1</th>\n",
@@ -902,7 +883,7 @@
902883
" <td>0.469806</td>\n",
903884
" <td>-0.116628</td>\n",
904885
" <td>P|Barhl1</td>\n",
905-
" <td>images/metacluster_124.2.png</td>\n",
886+
" <td>https://motifcollections.aertslab.org/v10nr_cl...</td>\n",
906887
" </tr>\n",
907888
" <tr>\n",
908889
" <th>Emx2</th>\n",
@@ -911,7 +892,7 @@
911892
" <td>0.522485</td>\n",
912893
" <td>-0.105113</td>\n",
913894
" <td>P|Emx2</td>\n",
914-
" <td>images/metacluster_164.1.png</td>\n",
895+
" <td>https://motifcollections.aertslab.org/v10nr_cl...</td>\n",
915896
" </tr>\n",
916897
" <tr>\n",
917898
" <th>Hnf1b</th>\n",
@@ -920,7 +901,7 @@
920901
" <td>0.793915</td>\n",
921902
" <td>-0.115062</td>\n",
922903
" <td>PC|Hnf1b</td>\n",
923-
" <td>images/tfdimers__MD00345.png</td>\n",
904+
" <td>https://motifcollections.aertslab.org/v10nr_cl...</td>\n",
924905
" </tr>\n",
925906
" <tr>\n",
926907
" <th>Ebf4</th>\n",
@@ -929,7 +910,7 @@
929910
" <td>0.797483</td>\n",
930911
" <td>-0.125697</td>\n",
931912
" <td>PC|Ebf4</td>\n",
932-
" <td>images/metacluster_172.20.png</td>\n",
913+
" <td>https://motifcollections.aertslab.org/v10nr_cl...</td>\n",
933914
" </tr>\n",
934915
" <tr>\n",
935916
" <th>Ebf1</th>\n",
@@ -938,7 +919,7 @@
938919
" <td>0.821295</td>\n",
939920
" <td>-0.125705</td>\n",
940921
" <td>PC|Ebf1</td>\n",
941-
" <td>images/metacluster_172.20.png</td>\n",
922+
" <td>https://motifcollections.aertslab.org/v10nr_cl...</td>\n",
942923
" </tr>\n",
943924
" <tr>\n",
944925
" <th>Ovol2</th>\n",
@@ -947,7 +928,7 @@
947928
" <td>0.775894</td>\n",
948929
" <td>-0.119117</td>\n",
949930
" <td>PC|Ovol2</td>\n",
950-
" <td>images/tfdimers__MD00481.png</td>\n",
931+
" <td>https://motifcollections.aertslab.org/v10nr_cl...</td>\n",
951932
" </tr>\n",
952933
" <tr>\n",
953934
" <th>Ikzf2</th>\n",
@@ -956,7 +937,7 @@
956937
" <td>0.830263</td>\n",
957938
" <td>-0.130275</td>\n",
958939
" <td>PC|Ikzf2</td>\n",
959-
" <td>images/tfdimers__MD00008.png</td>\n",
940+
" <td>https://motifcollections.aertslab.org/v10nr_cl...</td>\n",
960941
" </tr>\n",
961942
" </tbody>\n",
962943
"</table>\n",
@@ -990,44 +971,55 @@
990971
"\n",
991972
" Logo \n",
992973
"Gene \n",
993-
"Nfia images/jaspar__MA0670.1.png \n",
994-
"Tcf4 images/tfdimers__MD00119.png \n",
995-
"Erg images/metacluster_135.7.png \n",
996-
"Fli1 images/metacluster_135.7.png \n",
997-
"Zbtb43 images/metacluster_131.8.png \n",
998-
"Mef2c images/transfac_pro__M04846.png \n",
999-
"Spi1 images/metacluster_167.5.png \n",
1000-
"Hdx images/tfdimers__MD00488.png \n",
1001-
"Bach1 images/jaspar__MA1633.2.png \n",
1002-
"Sox10 images/metacluster_4.1.png \n",
1003-
"Sox8 images/metacluster_4.1.png \n",
1004-
"Emx1 images/metacluster_164.1.png \n",
1005-
"Lhx2 images/metacluster_164.1.png \n",
1006-
"Lhx3 images/metacluster_9.26.png \n",
1007-
"Pou5f1 images/taipale_cyt_meth__POU5F1_NYTAATTATGCGNR... \n",
1008-
"Barhl1 images/metacluster_124.2.png \n",
1009-
"Emx2 images/metacluster_164.1.png \n",
1010-
"Hnf1b images/tfdimers__MD00345.png \n",
1011-
"Ebf4 images/metacluster_172.20.png \n",
1012-
"Ebf1 images/metacluster_172.20.png \n",
1013-
"Ovol2 images/tfdimers__MD00481.png \n",
1014-
"Ikzf2 images/tfdimers__MD00008.png "
974+
"Nfia https://motifcollections.aertslab.org/v10nr_cl... \n",
975+
"Tcf4 https://motifcollections.aertslab.org/v10nr_cl... \n",
976+
"Erg https://motifcollections.aertslab.org/v10nr_cl... \n",
977+
"Fli1 https://motifcollections.aertslab.org/v10nr_cl... \n",
978+
"Zbtb43 https://motifcollections.aertslab.org/v10nr_cl... \n",
979+
"Mef2c https://motifcollections.aertslab.org/v10nr_cl... \n",
980+
"Spi1 https://motifcollections.aertslab.org/v10nr_cl... \n",
981+
"Hdx https://motifcollections.aertslab.org/v10nr_cl... \n",
982+
"Bach1 https://motifcollections.aertslab.org/v10nr_cl... \n",
983+
"Sox10 https://motifcollections.aertslab.org/v10nr_cl... \n",
984+
"Sox8 https://motifcollections.aertslab.org/v10nr_cl... \n",
985+
"Emx1 https://motifcollections.aertslab.org/v10nr_cl... \n",
986+
"Lhx2 https://motifcollections.aertslab.org/v10nr_cl... \n",
987+
"Lhx3 https://motifcollections.aertslab.org/v10nr_cl... \n",
988+
"Pou5f1 https://motifcollections.aertslab.org/v10nr_cl... \n",
989+
"Barhl1 https://motifcollections.aertslab.org/v10nr_cl... \n",
990+
"Emx2 https://motifcollections.aertslab.org/v10nr_cl... \n",
991+
"Hnf1b https://motifcollections.aertslab.org/v10nr_cl... \n",
992+
"Ebf4 https://motifcollections.aertslab.org/v10nr_cl... \n",
993+
"Ebf1 https://motifcollections.aertslab.org/v10nr_cl... \n",
994+
"Ovol2 https://motifcollections.aertslab.org/v10nr_cl... \n",
995+
"Ikzf2 https://motifcollections.aertslab.org/v10nr_cl... "
1015996
]
1016997
},
1017-
"execution_count": 7,
998+
"execution_count": 6,
1018999
"metadata": {},
10191000
"output_type": "execute_result"
10201001
}
10211002
],
10221003
"source": [
1023-
"img_dir='images'\n",
1024-
"df_row.Logo=df_row.Logo.apply(lambda x:os.path.join(img_dir,os.path.basename(x)))\n",
1004+
"# # Images could be a url or file path, for example: download image to local\n",
1005+
"# import requests\n",
1006+
"# img_dir='images'\n",
1007+
"# if not os.path.exists(img_dir):\n",
1008+
"# os.mkdir(img_dir)\n",
1009+
"# for url in df_row.Logo.tolist():\n",
1010+
"# img_data = requests.get(url).content\n",
1011+
"# file=os.path.basename(url)\n",
1012+
"# with open(os.path.join(img_dir,file), 'wb') as handler:\n",
1013+
"# handler.write(img_data)\n",
1014+
"\n",
1015+
"# img_dir='images'\n",
1016+
"# df_row.Logo=df_row.Logo.apply(lambda x:os.path.join(img_dir,os.path.basename(x)))\n",
10251017
"df_row"
10261018
]
10271019
},
10281020
{
10291021
"cell_type": "code",
1030-
"execution_count": 11,
1022+
"execution_count": 7,
10311023
"id": "8683f2d4-cea6-445f-ae32-cbfdb835b2ee",
10321024
"metadata": {
10331025
"tags": []
@@ -1110,7 +1102,7 @@
11101102
},
11111103
{
11121104
"cell_type": "code",
1113-
"execution_count": 12,
1105+
"execution_count": 8,
11141106
"id": "17c5d0c9-c934-4fa5-ae24-1a5110e7f0a9",
11151107
"metadata": {
11161108
"tags": []
-262 KB
Binary file not shown.
252 KB
Loading
9.87 KB
Loading
666 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)