Skip to content

Commit

Permalink
Nvwa
Browse files Browse the repository at this point in the history
  • Loading branch information
JiaqiLiZju authored Jul 7, 2022
1 parent e0ae312 commit f6406b9
Show file tree
Hide file tree
Showing 17 changed files with 103,262 additions and 77 deletions.
27 changes: 17 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
# NvWA
code used for ```Inferring genetic models from cross-species cell landscapes```
Code used for ```Deep learning of cross-species single cell atlases identifies conserved regulatory programs underlying cell types```

Nvwa, a deep learning–based strategy, to predict expression landscapes and decipher regulatory elements (Filters) at the single-cell level.

## Requirements
- Python packages
```
> h5py >= 2.7.0
> numpy >= 1.14.2
> pandas == 0.22.0
> scipy >= 0.19.1
> pyfasta >= 0.5.2
> torch >= 1.0.0
h5py >= 2.7.0
numpy >= 1.14.2
pandas == 0.22.0
scipy >= 0.19.1
pyfasta >= 0.5.2
torch >= 1.0.0
captum
```

## Descriptions
Expand All @@ -23,9 +24,15 @@ Nvwa, a deep learning–based strategy, to predict expression landscapes and dec
- ```3_application``` for predicting genomic tracks
- ```main``` examples for run model in each species
- ```Analysis_plotting``` analysis and plotting function
- ```Results``` results for Filter PWMs, annotation, functional genomic data overlap test and TFModisco Results.

For reproducing the Nvwa analysis from scratch, we recomand reading the `dmel.sh` in `main` folder, and downloading the drosophila dataset from the url below.

## Datasets for eight species
We provided single cell labels for eight species in URL.
We provided single cell labels for eight species in http://bis.zju.edu.cn/nvwa/dataset.html.

For the single cell labels, we provided the expression label, and corresponding cell, gene informations. The ready-to-use machine learning dataset were also publically accessed, which were paired with one-hot sequence, cell annotation information and split into train, validation, test set. The detailed preprocessing procedures were also described step by step.


## Running Nvwa
**Example**
Expand All @@ -47,6 +54,6 @@ python 2_explain/1_run_explain.py ./Dataset.Dmel_train_test.h5
`--help`: print help info.

## Note
Nvwa is now more like in-house scripts for reproducing our work in ```Inferring genetic models from cross-species cell landscapes```, if you find any problem running Nvwa code, please contant me.
Nvwa is now more like in-house scripts for reproducing our work, if you find any problem running Nvwa code, please contant me. If you run into errors loading trained model weights files, it is likely the result of differences in PyTorch or CUDA toolkit versions.

NvTK (NvwaToolKit), a more systemmatic software is under acitivate development. It will support modern deep learning achitectures in genomics, such as ResNet, Attention Module, and Transformer. I recommend to use NvTK for generating your own model.
NvTK (NvwaToolKit, https://github.com/JiaqiLiZju/NvTK), a more systemmatic software is under acitivate development. It will support modern deep learning achitectures in genomics, such as ResNet, Attention Module, and Transformer. I recommend to use NvTK for generating your own model.
129 changes: 129 additions & 0 deletions Results/Filters/Celegan_explain_filter_result.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
,ID,freq,IC,Reductant,influence,MotifName,Anno,Query_ID,sum_cnt,sum_match
0,0,0.004664406,8.744090863,0,1.0053518,0,0,Motif_0,18,10
1,1,0.001468288,10.41164977,0,1.1068792,0,0,Motif_1,31,10
2,2,0.015302281,7.030109504,1,0.9899453,0,0,Motif_2,184,10
3,3,0.00227655,9.778934864,0,1.0248092,0,0,Motif_3,10,10
4,4,0.020252182,6.625778832,1,1.0130149,0,0,Motif_4,32,10
5,5,0.002165374,9.851167735,0,1.025655,Motif_5,1,Motif_5,10,10
6,6,0.001379092,10.50206521,1,1.007117,0,0,Motif_6,52,10
7,7,0.000317856,12.61933963,0,1.0088136,Motif_7,1,Motif_7,37,10
8,8,0.0278681,6.165241568,1,1.0052832,0,0,Motif_8,85,10
9,9,0.003473688,9.169315913,0,1.021794,0,0,Motif_9,10,10
10,10,0.023728943,6.397208339,1,0.9882634,0,0,Motif_10,102,10
11,11,0.001689921,10.20882817,1,1.0163807,Motif_11,1,Motif_11,74,10
12,12,0.002393724,9.706527711,0,1.0028284,0,0,Motif_12,10,10
13,13,0.003130437,9.319420161,0,1.0167451,0,0,Motif_13,22,10
14,14,0.00271847,9.522989585,0,0.9916791,0,0,Motif_14,6,6
15,15,0.009879278,7.661378638,1,1.0027467,0,0,Motif_15,32,10
16,16,0.002107759,9.890074042,0,0.9648484,0,0,Motif_16,14,10
17,17,0.01242053,7.331129472,0,0.9934762,0,0,Motif_17,36,10
18,18,0.000724662,11.43040373,1,1.0511352,0,0,Motif_18,123,10
19,19,0.011083271,7.495472426,0,0.99305284,0,0,Motif_19,52,10
20,20,0.014358447,7.121956488,0,1.0009296,0,0,Motif_20,23,10
21,21,0.001550341,10.33319885,1,1.0039362,Motif_21,1,Motif_21,131,10
22,22,0.002468074,9.662398774,0,1.0607406,0,0,Motif_22,45,10
23,23,0.001873681,10.05990905,0,1.020856,0,0,Motif_23,12,10
24,24,0.00122803,10.66943795,0,1.0239325,0,0,Motif_24,49,10
25,25,0.004419806,8.821801123,0,1.0107605,0,0,Motif_25,10,10
26,26,0.005472991,8.513454838,0,1.0100491,Motif_26,1,Motif_26,16,10
27,27,0.02704841,6.20831239,1,0.98747104,0,0,Motif_27,192,10
28,28,0.000983027,10.9904817,1,1.026014,Motif_28,1,Motif_28,82,10
29,29,0.000645034,11.59833724,0,1.0326574,Motif_29,1,Motif_29,100,10
30,30,0.016580394,6.914377881,1,1.0285152,0,0,Motif_30,190,10
31,31,0.003573936,9.128270351,0,0.9916924,0,0,Motif_31,9,9
32,32,0.001219908,10.67901212,0,1.050049,0,0,Motif_32,14,10
33,33,0.020871864,6.582296764,1,0.99862885,Motif_33,1,Motif_33,192,10
34,34,0.006647025,8.233075499,0,1.0209464,0,0,Motif_34,60,10
35,35,0.004612051,8.760375746,0,0.9722336,0,0,Motif_35,10,10
36,36,0.001915446,10.02810381,0,0.99309534,0,0,Motif_36,31,10
37,37,0.009018465,7.792902327,1,1.0111924,0,0,Motif_37,19,10
38,38,0.01055942,7.565325619,0,0.99645984,Motif_38,1,Motif_38,43,10
39,39,0.003869984,9.013456543,0,0.97120297,0,0,Motif_39,16,10
40,40,0.007058343,8.146454688,0,1.016564,0,0,Motif_40,32,10
41,41,0.016176383,6.949967121,1,1.0101556,0,0,Motif_41,171,10
42,42,0.017781605,6.81347064,1,1.0200458,0,0,Motif_42,125,10
43,43,0.001001012,10.96432547,1,1.0011668,Motif_43,1,Motif_43,84,10
44,44,0.001548776,10.33465581,1,0.9964692,0,0,Motif_44,45,9
45,45,0.010076563,7.632852516,0,1.032186,0,0,Motif_45,21,10
46,46,0.024240633,6.366428833,1,1.003686,0,0,Motif_46,75,10
47,47,0.007484322,8.061912628,0,1.0377142,Motif_47,1,Motif_47,47,10
48,48,0.002412195,9.69543766,0,1.0149714,0,0,Motif_48,12,10
49,49,0.001252299,10.64120508,0,0.9841825,0,0,Motif_49,10,10
50,50,0.001723559,10.18039377,0,0.98666596,0,0,Motif_50,11,10
51,51,0.001129712,10.78982965,0,1.0595683,Motif_51,1,Motif_51,37,10
52,52,0.001728794,10.17601803,0,0.93925583,0,0,Motif_52,11,10
53,53,0.015658298,6.996928772,1,1.0214508,0,0,Motif_53,126,10
54,54,0.031697257,5.97949819,1,1.0040511,0,0,Motif_54,89,10
55,55,0.018977653,6.719554635,0,0.9857886,0,0,Motif_55,127,10
56,56,0.007725261,8.016200523,0,1.0181947,0,0,Motif_56,20,10
57,57,0.001237556,10.65829095,1,1.0276866,Motif_57,1,Motif_57,77,10
58,58,0.012539817,7.31733989,0,1.0063452,0,0,Motif_58,66,10
59,59,0.001489023,10.39141811,0,1.0170138,0,0,Motif_59,11,10
60,60,0.001627968,10.26271183,1,0.9943645,0,0,Motif_60,26,10
61,61,0.001334326,10.54967268,1,1.0880712,0,0,Motif_61,48,10
62,62,0.003202752,9.286472032,0,1.0887581,0,0,Motif_62,25,10
63,63,0.001022785,10.93328132,0,0.99921197,0,0,Motif_63,11,10
64,64,0.000923455,11.08067142,0,1.0067234,Motif_64,1,Motif_64,120,10
65,65,0.009454923,7.724718611,1,1.08737,0,0,Motif_65,69,10
66,66,0.001159518,10.75225887,0,1.0019563,0,0,Motif_66,10,10
67,67,0.006295058,8.311564561,0,1.0045815,0,0,Motif_67,20,10
68,68,0.017148933,6.865737405,0,0.99436635,0,0,Motif_68,63,10
69,69,0.002510681,9.63770534,1,1.0028454,Motif_69,1,Motif_69,62,10
70,70,0.02013868,6.633887093,0,0.9977761,0,0,Motif_70,11,10
71,71,0.015308104,7.029560543,0,1.0075617,0,0,Motif_71,107,10
72,72,0.000714462,11.45085603,0,1.0075787,Motif_72,1,Motif_72,32,10
73,73,0.001532598,10.34980532,1,0.9999515,0,0,Motif_73,24,10
74,74,0.011183376,7.482500361,0,0.99875337,0,0,Motif_74,29,10
75,75,0.000505212,11.95082208,0,0.9955131,0,0,Motif_75,12,10
76,76,0.000765883,11.35058864,0,1.022546,Motif_76,1,Motif_76,19,10
77,77,0.019428721,6.685665277,0,0.99691504,0,0,Motif_77,62,10
78,78,0.024143146,6.372242518,1,1.00128,0,0,Motif_78,221,10
79,79,0.016906696,6.886261474,0,1.0091797,0,0,Motif_79,45,10
80,80,0.000523245,11.90022613,0,1.0175482,0,0,Motif_80,10,10
81,81,0.001000522,10.96503144,1,1.0054951,0,0,Motif_81,24,10
82,82,0.000602779,11.69608245,0,1.0177684,0,0,Motif_82,42,10
83,83,0.002565889,9.606325752,0,0.9938866,0,0,Motif_83,10,10
84,84,0.021607386,6.532331657,0,0.9812788,0,0,Motif_84,44,10
85,85,0.007936375,7.977304169,1,0.98591065,0,0,Motif_85,20,10
86,86,0.010885796,7.521409325,0,1.0020772,0,0,Motif_86,10,10
87,87,0.001512182,10.36915206,0,0.9999888,0,0,Motif_87,20,10
88,88,0.000668249,11.54732643,0,1.0115422,0,0,Motif_88,50,10
89,89,0.008178738,7.933906093,0,1.0241011,0,0,Motif_89,124,10
90,90,0.014754759,7.082675793,0,0.97093403,0,0,Motif_90,150,10
91,91,0.02336525,6.419491704,1,0.99551153,0,0,Motif_91,90,10
92,92,0.023131653,6.433987834,1,1.0064815,0,0,Motif_92,127,10
93,93,0.000854303,11.1929648,1,0.9963403,0,0,Motif_93,77,10
94,94,0.001322695,10.56230333,0,0.9937671,0,0,Motif_94,10,10
95,95,0.000261916,12.89861056,0,1.0029414,0,0,Motif_95,65,10
96,96,0.008652054,7.85274158,0,1.0571495,0,0,Motif_96,46,10
97,97,0.001464713,10.41516667,0,1.0035768,0,0,Motif_97,10,10
98,98,0.00425552,8.876448854,0,0.997898,Motif_98,1,Motif_98,12,10
99,99,0.022691526,6.461702581,1,0.99814886,0,0,Motif_99,132,10
100,100,0.024593804,6.345561296,1,1.0028235,0,0,Motif_100,203,10
101,101,0.000926343,11.07616622,1,1.0025668,0,0,Motif_101,76,10
102,102,0.00115691,10.75550775,0,1.0112522,0,0,Motif_102,40,10
103,103,0.006708902,8.219707576,0,1.0450346,0,0,Motif_103,33,10
104,104,0.002593306,9.590991576,0,1.0011638,0,0,Motif_104,14,10
105,105,0.001275904,10.614265,0,1.0043329,0,0,Motif_105,23,10
106,106,0.001238399,10.65730803,1,1.0410546,0,0,Motif_106,85,10
107,107,0.005723185,8.448965946,0,1.010196,0,0,Motif_107,10,10
108,108,0.027433216,6.187932432,1,1.0011756,0,0,Motif_108,235,10
109,109,0.013825487,7.176525842,0,1.0036203,0,0,Motif_109,84,10
110,110,0.000764913,11.35241692,0,1.0058706,0,0,Motif_110,31,10
111,111,0.003065742,9.349547917,0,0.9894582,0,0,Motif_111,10,10
112,112,0.003087099,9.339532398,0,1.006593,0,0,Motif_112,10,10
113,113,0.000949098,11.04115514,1,1.0200311,Motif_113,1,Motif_113,131,10
114,114,0.004671545,8.741884635,0,1.0587674,0,0,Motif_114,17,10
115,115,0.001616141,10.27323141,0,0.99593145,0,0,Motif_115,21,10
116,116,0.001714158,10.18828419,0,1.0205306,0,0,Motif_116,10,10
117,117,0.0002875,12.76415102,0,1.0125726,0,0,Motif_117,141,10
118,118,0.013941094,7.164512398,0,1.0419934,0,0,Motif_118,10,10
119,119,0.001237074,10.65885257,0,1.003611,0,0,Motif_119,10,10
120,120,0.001890618,10.04692634,1,1.0478351,0,0,Motif_120,97,10
121,121,0.009659318,7.693862882,0,0.99883723,0,0,Motif_121,5,5
122,122,0.011180656,7.482851397,0,0.99478376,0,0,Motif_122,15,10
123,123,0.024941769,6.325292378,0,0.9969126,0,0,Motif_123,93,10
124,124,0.001291434,10.59681042,0,1.0029675,0,0,Motif_124,10,10
125,125,0.006881548,8.183051053,0,1.0549486,0,0,Motif_125,11,10
126,126,0.003963768,8.978911752,0,1.0071008,0,0,Motif_126,10,10
127,127,0.003342637,9.224797783,0,1.0262302,0,0,Motif_127,20,10
Loading

0 comments on commit f6406b9

Please sign in to comment.