DeltaSplice¶
Reference-informed prediction of alternative splicing and splicing-altering mutations from sequences.
Disclaimer¶
This is an UNOFFICIAL implementation of Reference-informed prediction of alternative splicing and splicing-altering mutations from sequences by Chencheng Xu, Suying Bao, et al.
The OFFICIAL repository of DeltaSplice is at chaolinzhanglab/DeltaSplice.
Tip
The MultiMolecule team has confirmed that the provided model and checkpoints are producing the same intermediate representations as the original implementation.
The team releasing DeltaSplice did not write this model card for this model so this model card has been written by the MultiMolecule team.
Model Details¶
DeltaSplice predicts splice-site usage (SSU) and splicing-altering mutation effects from sequence. The model uses a valid-convolution dilated residual encoder and three prediction modules: splice-site usage, reference-informed delta-SSU, and an auxiliary splice-site head. The official package uses the average prediction of five checkpoints for SSU and delta-SSU prediction; MultiMolecule stores the five seed checkpoints of each released data variant as internal ensemble members and returns their average prediction.
Variants¶
- multimolecule/deltasplice: DeltaSplice trained on the multi-species training set used by the upstream default checkpoints.
- multimolecule/deltasplice-human: DeltaSplice human-only comparison checkpoint set released by the upstream project.
Model Specification¶
| Variant | Num Layers | Hidden Size | Context | Ensemble Members | Num Parameters (M) | FLOPs (M) | MACs (M) |
|---|---|---|---|---|---|---|---|
| DeltaSplice | 24 | 64 | 30000 | 5 | 40.376 | 1642965.72 | 820284.36 |
| DeltaSplice-Human | 24 | 64 | 30000 | 5 | 40.376 | 1642965.72 | 820284.36 |
(FLOPs and MACs measured on one requested output nucleotide with the default 30 kb padded context.)
Links¶
- Code: multimolecule.deltasplice
- Paper: Reference-informed prediction of alternative splicing and splicing-altering mutations from sequences
- Developed by: Chencheng Xu, Suying Bao, Ye Wang, Wenxing Li, Hao Chen, Yufeng Shen, Tao Jiang, Chaolin Zhang
- Model type: Dilated residual 1D CNN ensemble for splice-site usage and delta-SSU prediction
- Original Repository: chaolinzhanglab/DeltaSplice
Usage¶
The model file depends on the multimolecule library. You can install it using pip:
| Bash | |
|---|---|
Direct Use¶
Splice-Site Usage¶
Variant Effect¶
Interface¶
- Input: RNA sequence tokenized with
RnaTokenizer;Nis encoded as zero nucleotide channels - Output channels:
no_splice,acceptor,donor - Reference-only call: returns per-position splice-site usage probabilities in
probabilities - Reference + alternative call: pass the reference sequence as
input_idsand the alternate sequence asalternative_input_ids - Reference usage: pass
reference_usagewith shape(batch_size, sequence_length, 3)or omit it to use the model’s own reference usage as the reference signal
Training Details¶
DeltaSplice was trained to predict splice-site usage from gene sequence and to improve mutation-effect prediction by incorporating reference splice-site usage.
Training Data¶
The upstream repository describes training from gene_dataset.tsu.txt, which contains splice-site usage in adult brains of eight mammalian species.
Training Procedure¶
The official release provides five seed checkpoints with the same architecture and data split. MultiMolecule represents these seed checkpoints as internal ensemble members rather than public model variants.
Citation¶
Note
The artifacts distributed in this repository are part of the MultiMolecule project. If MultiMolecule supports your research, please cite the MultiMolecule project as follows:
| BibTeX | |
|---|---|
Contact¶
Please use GitHub issues of MultiMolecule for any questions or comments on the model card.
Please contact the authors of the DeltaSplice paper for questions or comments on the paper/model.
License¶
This model implementation is licensed under the GNU Affero General Public License.
For additional terms and clarifications, please refer to our License FAQ.
| Text Only | |
|---|---|
API Reference¶
DeltaSpliceConfig
¶
Bases: PreTrainedConfig
This is the configuration class to store the configuration of a
DeltaSpliceModel. It is used to instantiate a DeltaSplice model
according to the specified arguments, defining the model architecture. Instantiating a configuration with the
defaults will yield a configuration similar to the official
chaolinzhanglab/DeltaSplice architecture.
Configuration objects inherit from PreTrainedConfig and can be used to
control the model outputs. Read the documentation from PreTrainedConfig
for more information.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
int
|
Vocabulary size of the DeltaSplice one-hot input channels. Defaults to 4 ( |
4
|
|
int
|
Number of flanking nucleotides represented around the requested output positions. The model pads
|
30000
|
|
int
|
Dimensionality of the convolutional encoder. |
64
|
|
list[DeltaSpliceLayerConfig] | None
|
Configuration for each dilated residual layer. Each layer is a [ |
None
|
|
str
|
The non-linear activation function (function or string) in the encoder and prediction heads. |
'relu'
|
|
float
|
Dropout probability used between the two convolutions of each residual layer. |
0.3
|
|
float
|
The epsilon used by batch normalization layers. |
1e-05
|
|
float
|
The momentum used by batch normalization layers. |
0.1
|
|
int
|
Number of internal checkpoint members averaged by the model. The official DeltaSplice releases provide five seed checkpoints per variant. |
5
|
|
int
|
Number of splice-site usage labels ( |
3
|
|
HeadConfig | None
|
Configuration of the optional token prediction head. |
None
|
|
str | None
|
Problem type for the optional token prediction head. |
'regression'
|
|
bool
|
Whether to output intermediate encoder representations. |
False
|
Examples:
Source code in multimolecule/models/deltasplice/configuration_deltasplice.py
| Python | |
|---|---|
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 | |
DeltaSpliceLayerConfig
¶
Bases: FlatDict
Configuration for a single DeltaSplice dilated residual layer.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
Convolution kernel size used by both convolutions in the residual layer. |
required | |
|
Dilation (atrous rate) used by both convolutions in the residual layer. |
required |
Source code in multimolecule/models/deltasplice/configuration_deltasplice.py
DeltaSpliceForTokenPrediction
¶
Bases: DeltaSplicePreTrainedModel
DeltaSplice model with a shared MultiMolecule token prediction head.
Examples:
Source code in multimolecule/models/deltasplice/modeling_deltasplice.py
DeltaSpliceModel
¶
Bases: DeltaSplicePreTrainedModel
DeltaSplice backbone and official five-seed ensemble for per-position splice-site usage prediction.
Examples:
Source code in multimolecule/models/deltasplice/modeling_deltasplice.py
| Python | |
|---|---|
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 | |
postprocess
¶
postprocess(
outputs: DeltaSpliceModelOutput | ModelOutput | Tensor,
) -> tuple[Tensor, list[str]]
Return DeltaSplice splice-site usage probabilities with semantic channel names.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
DeltaSpliceModelOutput | ModelOutput | Tensor
|
The output of |
required |
Returns:
| Type | Description |
|---|---|
Tensor
|
A tuple of |
list[str]
|
change ( |
Source code in multimolecule/models/deltasplice/modeling_deltasplice.py
DeltaSpliceModelOutput
dataclass
¶
Bases: ModelOutput
Base class for outputs of the DeltaSplice model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
`torch.FloatTensor` of shape `(batch_size, sequence_length, hidden_size)`
|
Per-position encoder representation averaged across ensemble members. |
None
|
|
`torch.FloatTensor` of shape `(batch_size, sequence_length, num_labels)`
|
DeltaSplice splice-site usage probabilities ( |
None
|
|
`torch.FloatTensor` of shape `(batch_size, sequence_length, num_labels)`
|
DeltaSplice splice-site probability module outputs averaged across ensemble members. |
None
|
|
`torch.FloatTensor` of shape `(batch_size, sequence_length, num_labels)`, *optional*
|
|
None
|
|
`tuple(torch.FloatTensor)`, *optional*
|
Per-layer valid-convolution representations cropped to the input sequence length. |
None
|
|
`tuple(torch.FloatTensor)`, *optional*
|
Same content as |
None
|
Source code in multimolecule/models/deltasplice/modeling_deltasplice.py
DeltaSplicePreTrainedModel
¶
Bases: PreTrainedModel
An abstract class to handle weights initialization and a simple interface for downloading and loading pretrained models.
Source code in multimolecule/models/deltasplice/modeling_deltasplice.py
DeltaSpliceTokenPredictorOutput
dataclass
¶
Bases: ModelOutput
Base class for outputs of DeltaSplice token prediction models.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
`torch.FloatTensor`, *optional*, returned when `labels` is provided
|
Token prediction loss. |
None
|
|
`torch.FloatTensor` of shape `(batch_size, sequence_length, num_labels)`
|
Per-nucleotide token prediction outputs. |
None
|
|
`tuple(torch.FloatTensor)`, *optional*, returned when `output_contexts=True`
|
Per-layer context representations. |
None
|
|
`tuple(torch.FloatTensor)`, *optional*, returned when `output_hidden_states=True`
|
Per-layer context representations. |
None
|