valsv commited on
Commit
803f524
·
verified ·
1 Parent(s): f422b93

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +243 -1
README.md CHANGED
@@ -1 +1,243 @@
1
- TBD
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ # For reference on model card metadata, see the spec: https://github.com/huggingface/hub-docs/blob/main/modelcard.md?plain=1
3
+ # Doc / guide: https://huggingface.co/docs/hub/model-cards
4
+ library_name: scvi-tools
5
+ license: mit
6
+ tags:
7
+ - biology
8
+ - genomics
9
+ - single-cell
10
+ - model_cls_name:SCVI
11
+ - scvi_version:1.2.0
12
+ - anndata_version:0.11.1
13
+ - modality:rna
14
+ - tissue:None
15
+ - annotated:True
16
+ ---
17
+
18
+ # Model Card for Tahoe-100M-SCVI-v1
19
+
20
+ <!-- Provide a quick summary of what the model is/does. -->
21
+
22
+ An SCVI model and minified AnnData of the Tahoe-100M dataset from Vevo Tx.
23
+
24
+ ## Model Details
25
+
26
+ ### Model Description
27
+
28
+ <!-- Provide a longer summary of what this model is. -->
29
+
30
+ Tahoe-100M-SCVI-v1
31
+
32
+ - **Developed by:** Vevo Tx
33
+ - **Model type:** SCVI variational autoencoder
34
+ - **License:** This model is licensed under the MIT License.
35
+
36
+ ### Model Architecture
37
+
38
+ SCVI model
39
+
40
+ Layers: 1, Hidden Units: 128, Latent Dimensions: 10
41
+
42
+ ### Parameters
43
+ 40,390,510
44
+
45
+ ## Intended Use
46
+
47
+ <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
48
+
49
+ ### Direct Use
50
+
51
+ <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
52
+
53
+ - Decoding Tahoe-100M data representation vectors to gene expression.
54
+ - Encoding scRNA-seq data to Tahoe-100M cell state representation space.
55
+
56
+ ### Downstream Use
57
+
58
+ <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
59
+
60
+ - Adaptation to additional scRNA-seq data
61
+
62
+ ### Intended Users
63
+
64
+ - **Computational biologists** analyzing gene expression responses to drug perturbations.
65
+ - **Machine learning researchers** developing methods for downstream drug response prediction.
66
+
67
+ ## Bias, Risks, and Limitations
68
+
69
+ <!-- This section is meant to convey both technical and sociotechnical limitations. -->
70
+
71
+ Reconstruced gene expression values may be inaccurate. Calibration analysis shows that the model generates counts that contains the observed counts within the 95% confidence intervals from the posterior predictice distribution 97.7% of the time. However, a naive baseline of producing only 0-counts achieves 97.4% on the same metric.
72
+
73
+ The Tahoe-100M data is based on cancer cell lines under drug treatment, and the model is trained to represent this data. The model may not be directly applicable to other forms of scRNA-seq data, such as that from primary cells.
74
+
75
+ {{ bias_recommendations | default("Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.", true)}}
76
+
77
+ ## How to Get Started with the Model
78
+
79
+ Use the code below to get started with the model.
80
+
81
+ Loading the minified AnnData will require 41 GB storage (saved in the `cache-dir`)) and RAM. The model itself requires ~1 GB GPU memory.
82
+
83
+ ```
84
+ > import scvi.hub
85
+
86
+ > tahoe_hubmodel = scvi.hub.HubModel.pull_from_huggingface_hub(
87
+ repo_name = 'vevotx/Tahoe-100M-SCVI-v1',
88
+ cache_dir = '/path/to/cache'
89
+ )
90
+
91
+ > tahoe = tahoe_hubmodel.model
92
+
93
+ > tahoe
94
+ SCVI model with the following parameters:
95
+ n_hidden: 128, n_latent: 10, n_layers: 1, dropout_rate: 0.1, dispersion: gene, gene_likelihood: nb,
96
+ latent_distribution: normal.
97
+ Training status: Trained
98
+ Model's adata is minified?: True
99
+
100
+ > tahoe.adata
101
+ AnnData object with n_obs × n_vars = 95624334 × 62710
102
+ obs: 'sample', 'species', 'gene_count', 'tscp_count', 'mread_count', 'bc1_wind', 'bc2_wind', 'bc3_wind', 'bc1_well', 'bc2_well', 'bc3_well', 'id', 'drugname_drugconc', 'drug', 'INT_ID', 'NUM.SNPS', 'NUM.READS', 'demuxlet_call', 'BEST.LLK', 'NEXT.LLK', 'DIFF.LLK.BEST.NEXT', 'BEST.POSTERIOR', 'SNG.POSTERIOR', 'SNG.BEST.LLK', 'SNG.NEXT.LLK', 'SNG.ONLY.POSTERIOR', 'DBL.BEST.LLK', 'DIFF.LLK.SNG.DBL', 'sublibrary', 'BARCODE', 'pcnt_mito', 'S_score', 'G2M_score', 'phase', 'pass_filter', 'dataset', '_scvi_batch', '_scvi_labels', '_scvi_observed_lib_size', 'plate', 'Cell_Name_Vevo', 'Cell_ID_Cellosaur'
103
+ var: 'gene_id', 'genome', 'SUB_LIB_ID'
104
+ uns: '_scvi_adata_minify_type', '_scvi_manager_uuid', '_scvi_uuid'
105
+ obsm: 'X_latent_qzm', 'X_latent_qzv', '_scvi_latent_qzm', '_scvi_latent_qzv'
106
+ layers: 'counts'
107
+
108
+ > # Take some random genes
109
+ > gene_list = tahoe.adata.var.sample(10).index
110
+
111
+ > # Take some random cells
112
+ > cell_indices = tahoe.adata.obs.sample(10).index
113
+
114
+ > # Decoode gene expression
115
+ > gene_expression = tahoe.get_normalized_expression(tahoe.adata[cell_indices], gene_list = gene_list)
116
+ > print(gene_expression)
117
+ gene_name TSPAN13 ZSCAN9 ENSG00000200991 ENSG00000224901 \
118
+ BARCODE_SUB_LIB_ID
119
+ 73_177_027-lib_2615 0.000036 0.000005 4.255257e-10 9.856240e-08
120
+ 63_080_025-lib_2087 0.000012 0.000012 3.183158e-10 1.124618e-07
121
+ 01_070_028-lib_1543 0.000005 0.000010 1.604187e-10 1.022676e-07
122
+ 07_110_046-lib_1885 0.000035 0.000018 2.597950e-09 1.063819e-07
123
+ 93_082_010-lib_2285 0.000008 0.000009 8.147555e-10 9.102466e-08
124
+ 94_154_081-lib_2562 0.000035 0.000014 5.600219e-10 6.891351e-08
125
+ 47_102_103-lib_2596 0.000021 0.000010 7.320031e-10 1.190017e-07
126
+ 92_138_169-lib_2356 0.000038 0.000015 3.393952e-10 7.600610e-08
127
+ 35_035_133-lib_2378 0.000041 0.000004 1.503101e-10 9.447428e-08
128
+ 06_084_182-lib_2611 0.000007 0.000014 5.135248e-10 7.896663e-08
129
+
130
+ gene_name RN7SL69P ENSG00000263301 ENSG00000269886 \
131
+ BARCODE_SUB_LIB_ID
132
+ 73_177_027-lib_2615 2.390874e-10 1.896764e-07 7.665454e-08
133
+ 63_080_025-lib_2087 1.934646e-10 2.205981e-07 6.038700e-08
134
+ 01_070_028-lib_1543 9.687608e-11 9.900592e-08 5.225622e-08
135
+ 07_110_046-lib_1885 1.694676e-09 2.274248e-07 7.741949e-08
136
+ 93_082_010-lib_2285 6.253397e-10 2.593786e-07 7.113768e-08
137
+ 94_154_081-lib_2562 3.700961e-10 2.083358e-07 6.379186e-08
138
+ 47_102_103-lib_2596 4.534019e-10 2.551739e-07 4.840992e-08
139
+ 92_138_169-lib_2356 2.018963e-10 2.067301e-07 4.144172e-08
140
+ 35_035_133-lib_2378 8.090239e-11 1.658230e-07 3.890900e-08
141
+ 06_084_182-lib_2611 3.474709e-10 1.025397e-07 4.995985e-08
142
+ ...
143
+ 47_102_103-lib_2596 1.975285e-09 7.876221e-08 1.513182e-08
144
+ 92_138_169-lib_2356 1.214693e-09 4.208334e-08 1.091937e-08
145
+ 35_035_133-lib_2378 1.049879e-09 8.961482e-08 1.650536e-08
146
+ 06_084_182-lib_2611 2.311277e-09 5.680565e-08 1.824982e-08
147
+ ```
148
+
149
+ ## Training Details
150
+
151
+ ### Training Data
152
+
153
+ <!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
154
+
155
+ Tahoe-100M (to be described)
156
+
157
+ ### Training Procedure
158
+
159
+ <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
160
+
161
+ The model was trained using the SCVI `.train()` method. One plate (plate 14) of the training data was held out for training to be used for evaluation and criticism. A callback was used to evaluate reconstruction error of the training set and validation set every N minibatch rather than every epoch since a single epoch is too large to give informative training curves. An additional callback function was used to save snapshots of the model state at every epoch.
162
+
163
+
164
+ #### Training Hyperparameters
165
+
166
+ - **Training regime:** fp32 precision was used for training.
167
+
168
+ #### Speeds, Sizes, Times [optional]
169
+
170
+ <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
171
+
172
+ ## Evaluation
173
+
174
+ <!-- This section describes the evaluation protocols and provides the results. -->
175
+
176
+ ### Testing Data, Factors & Metrics
177
+
178
+ #### Testing Data
179
+
180
+ <!-- This should link to a Dataset Card if possible. -->
181
+
182
+ Data in the minified AnnData where the 'plate' column equals '14' was held out from training and used for evaluation and criticism.
183
+
184
+ #### Metrics
185
+
186
+ <!-- These are the evaluation metrics being used, ideally with a description of why. -->
187
+
188
+ The main metric is reconstruction error, defined as the average negative log likelihood of the observed counts given the representation vectors. This model uses a negative binomial likelihood.
189
+
190
+ ### Results
191
+
192
+ [Update with numbers]
193
+
194
+ #### Summary
195
+
196
+ {{ results_summary | default("", true) }}
197
+
198
+
199
+ ### Model Architecture and Objective
200
+
201
+ {{ model_specs | default("[More Information Needed]", true)}}
202
+
203
+ ### Compute Infrastructure
204
+
205
+ {{ compute_infrastructure | default("[More Information Needed]", true)}}
206
+
207
+ #### Hardware
208
+
209
+ {{ hardware_requirements | default("[More Information Needed]", true)}}
210
+
211
+ #### Software
212
+
213
+ {{ software | default("[More Information Needed]", true)}}
214
+
215
+ ## Citation [optional]
216
+
217
+ <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
218
+
219
+ **BibTeX:**
220
+
221
+ {{ citation_bibtex | default("[More Information Needed]", true)}}
222
+
223
+ **APA:**
224
+
225
+ {{ citation_apa | default("[More Information Needed]", true)}}
226
+
227
+ ## Glossary [optional]
228
+
229
+ <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
230
+
231
+ {{ glossary | default("[More Information Needed]", true)}}
232
+
233
+ ## More Information [optional]
234
+
235
+ {{ more_information | default("[More Information Needed]", true)}}
236
+
237
+ ## Model Card Authors [optional]
238
+
239
+ {{ model_card_authors | default("[More Information Needed]", true)}}
240
+
241
+ ## Model Card Contact
242
+
243
+ {{ model_card_contact | default("[More Information Needed]", true)}}