Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/COLA-Laboratory/OmniGenBench
/ functions
Functions
955 in github.com/COLA-Laboratory/OmniGenBench
⨍
Functions
955
◇
Types & classes
187
Method
dtype
(self)
omnigenbench/src/model/baselines.py:911
Method
dtype
(self)
omnigenbench/src/model/baselines.py:1202
Method
dtype
(self)
omnigenbench/src/model/baselines.py:2056
Method
dtype
(self)
omnigenbench/src/model/baselines.py:2458
Method
dtype
(self)
omnigenbench/src/model/baselines.py:2579
Method
dtype
(self)
omnigenbench/src/model/baselines.py:2729
Function
embedding_model
Load embedding model and tokenizer. Based on Quick Start section in README.md
tests/test_genomic_embeddings.py:40
Method
embedding_model
Load embedding model for attention extraction
tests/test_attention_extraction.py:47
Method
embedding_model
Load embedding model for batch extraction
tests/test_attention_extraction.py:166
Method
embedding_model
Load embedding model
tests/test_attention_extraction.py:316
Method
embedding_model
Load embedding model
tests/test_attention_extraction.py:385
Method
encode
Converts a sequence into a list of token IDs. Must be implemented by subclasses. Args: sequence (str): The input sequenc
omnigenbench/src/abc/abstract_tokenizer.py:285
Method
encode
Encode input IDs using the base tokenizer. Args: input_ids: Input IDs to encode **kwargs: Additional keyword
omnigenbench/src/tokenizer/kmers_tokenizer.py:184
Method
encode
Converts a sequence into a list of token IDs. This method encodes genomic sequences into token IDs using the underlying base
omnigenbench/src/tokenizer/single_nucleotide_tokenizer.py:191
Method
encode
Encode a sequence using the base BPE tokenizer. Args: sequence (str): Input sequence to encode **kwargs: Add
omnigenbench/src/tokenizer/bpe_tokenizer.py:178
Method
encode_plus
Encode a sequence with additional information. This method is not yet implemented for k-mers tokenizer. Args: s
omnigenbench/src/tokenizer/kmers_tokenizer.py:210
Method
encode_plus
Encodes a sequence with additional information. This method provides enhanced encoding with additional information like atte
omnigenbench/src/tokenizer/single_nucleotide_tokenizer.py:231
Method
encode_tokens
Encode a single sequence to token-level embeddings. Args: sequence (str): Input DNA/RNA sequence for token-level encodin
omnigenbench/src/abc/embedding_mixin.py:191
Method
encode_tokens
Encode a single sequence to token-level embeddings. Args: sequence (str): Input DNA/RNA sequence for token-level encodin
omnigenbench/src/model/embedding/model.py:210
Method
evaluate
Evaluate the model on the validation dataset. Returns: Dict[str, Any]: Dictionary containing evaluation metrics
omnigenbench/src/trainer/trainer.py:258
Method
execute
This method runs the RNA sequence design process using genetic algorithms. It validates parameters, loads the model, runs the design
omnigenbench/cli/commands/rna/rna_design.py:103
Method
explain
(self, sequence: str, **kwargs)
omnigenbench/src/explainability/attention/explainer.py:19
Method
explain
Generate LIME explanations for a given sequence. Args: sequence (str): The input sequence to explain. task_idx (int,
omnigenbench/src/explainability/shared_methods/lime_explainer.py:45
Method
explain
Generates 2D embeddings for a set of sequences using t-SNE. This method first obtains high-dimensional embeddings for the input sequences,
omnigenbench/src/explainability/shared_methods/tsne_explainer.py:46
Method
explain
Generate ISM explanations for a given sequence. Args: sequence (str): The input sequence to explain. task_idx (int, o
omnigenbench/src/explainability/shared_methods/ism_explainer.py:41
Method
explain
Generates feature attributions for an input sequence using the SQUID method. This method performs three main steps: Gene
omnigenbench/src/explainability/shared_methods/squid_explainer.py:70
Method
extract_attention_scores
Extract attention scores from a single genomic sequence. This method extracts attention weights from transformer layers, providing insights
omnigenbench/src/model/embedding/model.py:410
Method
find_invalid_positions
Find positions with invalid brackets
tests/test_structure_prediction.py:95
Method
fix_invalid_structure
Fix invalid brackets by replacing with dots
tests/test_structure_prediction.py:422
Function
fold
展示 Ground Truth、ViennaRNA 与模型预测的结构对比
examples/rna_secondary_structure_prediction/Secondary_Structure_Prediction.py:71
Method
forward
Perform a forward pass through the LoRA-adapted model. This method delegates the forward computation to the underlying LoRA model,
omnigenbench/src/lora/lora_model.py:281
Method
forward
Perform pooling operation on the last hidden state. This method handles different input formats and applies appropriate pooling:
omnigenbench/src/model/module_utils.py:47
Method
forward
Forward pass through the interacting attention mechanism. Args: query (torch.Tensor): Query tensor [batch_size, query_le
omnigenbench/src/model/module_utils.py:211
Method
forward
Masked global max-pooling over the sequence dimension. Parameters ---------- x : torch.Tensor Input features with
omnigenbench/src/model/baselines.py:25
Method
forward
Forward pass. Parameters ---------- input_ids : torch.LongTensor Token ids of shape ``(batch_size, seq_len)``.
omnigenbench/src/model/baselines.py:264
Method
forward
Forward pass producing multi-label probabilities and hidden state. Returns ------- dict Dictionary with keys ``lo
omnigenbench/src/model/baselines.py:540
Method
forward
Forward pass returning probabilities and last hidden state. Returns ------- dict Keys: ``logits`` (probabilities)
omnigenbench/src/model/baselines.py:706
Method
forward
Forward pass returning probabilities and last hidden state. Returns ------- dict Keys: ``logits`` (probabilities)
omnigenbench/src/model/baselines.py:999
Method
forward
Forward pass returning probabilities and last hidden state. Returns ------- dict Keys: ``logits`` (probabilities)
omnigenbench/src/model/baselines.py:1260
Method
forward
Compute forward features. Parameters ---------- input_ids : torch.LongTensor Shape ``(batch_size, seq_len)``.
omnigenbench/src/model/baselines.py:1471
Method
forward
Return token-level and pooled features. Returns ------- dict ``sequence_output``: ``(B, L, H)``, ``hidden_state``
omnigenbench/src/model/baselines.py:1517
Method
forward
Return token-level and pooled features using mean-pooling over mask.
omnigenbench/src/model/baselines.py:1553
Method
forward
Return sequence and pooled outputs from dilated conv stack.
omnigenbench/src/model/baselines.py:1619
Method
forward
(self, input_ids, attention_mask=None)
omnigenbench/src/model/baselines.py:1678
Method
forward
(self, input_ids, attention_mask=None)
omnigenbench/src/model/baselines.py:1769
Method
forward
(self, input_ids, attention_mask=None)
omnigenbench/src/model/baselines.py:1831
Method
forward
Compute logits ``(B, num_labels)`` and optional loss from pooled features.
omnigenbench/src/model/baselines.py:1886
Method
forward
Compute raw logits and optional BCE-with-logits loss.
omnigenbench/src/model/baselines.py:1905
Method
forward
Return continuous outputs and optional MSE loss.
omnigenbench/src/model/baselines.py:1924
Method
forward
Return per-token logits ``(B, L, num_labels)`` and optional loss.
omnigenbench/src/model/baselines.py:1943
Method
forward
Return per-token continuous outputs and optional loss.
omnigenbench/src/model/baselines.py:1967
Method
forward
Forward pass through backbone and task head. Returns ------- dict Always includes ``logits`` and passthrough ``la
omnigenbench/src/model/baselines.py:2272
Method
forward
Return token-level features only. Parameters ---------- input_ids : torch.LongTensor Shape ``(B, L)``. at
omnigenbench/src/model/baselines.py:2461
Method
forward
Return token-level hidden states only: ``{"last_hidden_state": (B, L, H)}``.
omnigenbench/src/model/baselines.py:2582
Method
forward
Return per-token hidden states only. Returns ------- dict ``{"last_hidden_state": (batch, seq_len, hidden_size)}`
omnigenbench/src/model/baselines.py:2743
Method
forward
Forward pass for masked language modeling. Args: **inputs: Input tensors including input_ids, attention_mask, and labels
omnigenbench/src/model/mlm/model.py:59
Method
forward
Forward pass for token-level regression. Args: **inputs: Input tensors including input_ids, attention_mask, and labels
omnigenbench/src/model/regression/model.py:55
Method
forward
Forward pass for sequence-level regression. Args: **inputs: Input tensors including input_ids, attention_mask, and label
omnigenbench/src/model/regression/model.py:205
Method
forward
Forward pass for structural imputation. Args: **inputs: Input tensors including input_ids, attention_mask, and labels
omnigenbench/src/model/regression/model.py:347
Method
forward
Forward pass for 2D structure-aware token regression. Args: **inputs: Input tensors including input_ids, attention_mask,
omnigenbench/src/model/regression/model.py:391
Method
forward
Forward pass for 2D structure-aware sequence regression. Args: **inputs: Input tensors including input_ids, attention_ma
omnigenbench/src/model/regression/model.py:434
Method
forward
Forward pass for matrix regression. Args: **inputs: Input tensors including matrix representations and labels R
omnigenbench/src/model/regression/model.py:487
Method
forward
Forward pass for matrix classification. Args: **inputs: Input tensors including matrix representations and labels
omnigenbench/src/model/regression/model.py:637
Method
forward
Forward pass through the BasicBlock. Args: x (Tensor): Input tensor [batch_size, channels, height, width] Retur
omnigenbench/src/model/regression/resnet.py:152
Method
forward
Forward pass through the Bottleneck block. Args: x (Tensor): Input tensor [batch_size, channels, height, width]
omnigenbench/src/model/regression/resnet.py:252
Method
forward
Forward pass through the ResNet. Args: x (Tensor): Input tensor [batch_size, channels, height, width] Returns:
omnigenbench/src/model/regression/resnet.py:450
Method
forward
Forward pass for token classification. This method performs the forward pass through the model, computing logits for each to
omnigenbench/src/model/classification/model.py:95
Method
forward
This method performs the forward pass through the model, computing sequence-level logits and applying softmax to produce probability
omnigenbench/src/model/classification/model.py:341
Method
forward
(self, **inputs)
omnigenbench/src/model/classification/model.py:644
Method
forward
(self, **inputs)
omnigenbench/src/model/classification/model.py:668
Method
forward
x is one‑hot with shape (N, L, A). Outputs latent φ with shape (N, 1).
omnigenbench/src/explainability/shared_methods/squid_explainer.py:525
Method
forward
(self, x: torch.Tensor)
omnigenbench/src/explainability/shared_methods/squid_explainer.py:553
Method
forward
(self, z)
omnigenbench/src/explainability/shared_methods/squid_explainer.py:584
Method
forward
Process BPP matrix to extract structural features. Args: bpp_matrix: BPP matrix [batch, seq_len, seq_len]
examples/translation_efficiency_prediction/te_bpp_model.py:338
Method
forward
Fuse sequence and BPP features. Args: seq_features: Sequence features [batch, seq_dim] bpp_features:
examples/translation_efficiency_prediction/te_bpp_model.py:407
Method
forward
Forward pass with BPP feature fusion. Args: input_ids: Token IDs [batch, seq_len] attention_mask: At
examples/translation_efficiency_prediction/te_bpp_model.py:517
Method
forward
Forward pass with BPP feature fusion. Args: input_ids: Token IDs from tokenizer attention_mask: Atte
examples/translation_efficiency_prediction/te_with_bpp_features.py:264
Method
from_huggingface
Create OmniDataset instances from a HuggingFace dataset. .. deprecated:: 0.3.0 `from_huggingface` is deprecated and will
omnigenbench/src/abc/abstract_dataset.py:503
Method
from_pretrained
Loads a tokenizer from a pre-trained model path. Args: config_or_model (str): The name or path of the pre-trained model.
omnigenbench/src/abc/abstract_tokenizer.py:172
Method
from_pretrained
( cls, save_directory: str, tokenizer=None, map_location=None, **kwargs )
omnigenbench/src/model/baselines.py:494
Method
from_pretrained
( cls, save_directory: str, tokenizer=None, map_location=None, **kwargs )
omnigenbench/src/model/baselines.py:767
Method
from_pretrained
( cls, save_directory: str, tokenizer=None, map_location=None, **kwargs )
omnigenbench/src/model/baselines.py:1062
Method
from_pretrained
( cls, save_directory: str, tokenizer=None, map_location=None, **kwargs )
omnigenbench/src/model/baselines.py:1317
Method
from_pretrained
Load model, config, and tokenizer from a directory.
omnigenbench/src/model/baselines.py:2207
Method
from_pretrained
Load backbone from a directory containing ``config.json`` and weights.
omnigenbench/src/model/baselines.py:2503
Method
from_pretrained
Load backbone from a directory containing ``config.json`` and weights.
omnigenbench/src/model/baselines.py:2615
Method
from_pretrained
( cls, save_directory: str, tokenizer=None, map_location=None, **kwargs )
omnigenbench/src/model/baselines.py:2802
Method
from_pretrained
Loads a single nucleotide tokenizer from a pre-trained model. This method creates a single nucleotide tokenizer wrapper around
omnigenbench/src/tokenizer/single_nucleotide_tokenizer.py:134
Method
from_pretrained
Create a BPE tokenizer from a pre-trained model. Args: config_or_model (str): Name or path of the pre-trained model
omnigenbench/src/tokenizer/bpe_tokenizer.py:136
Method
get_attention_statistics
Compute comprehensive statistics from attention scores. This method analyzes attention patterns by computing various statistical measures
omnigenbench/src/model/embedding/model.py:624
Method
get_base_pairs
Extract base pairs from structure
tests/test_structure_prediction.py:133
Method
get_base_pairs
Extract base pairs
tests/test_structure_prediction.py:215
Method
get_dataloader
Creates a PyTorch DataLoader for this dataset. Args: batch_size (int): Batch size for the DataLoader. shuffl
omnigenbench/src/abc/abstract_dataset.py:360
Method
get_info
Compute a *heuristic* predictive information metric. For GE we return the test‑set R². For MPA we return accuracy. This does *not* attempt
omnigenbench/src/explainability/shared_methods/squid_explainer.py:826
Method
get_inputs_length
Calculates and returns statistics about sequence and label lengths. Returns: dict: A dictionary with length statistics (
omnigenbench/src/abc/abstract_dataset.py:1427
Method
get_labels
Returns the set of unique labels in the dataset. Returns: set: The set of unique labels.
omnigenbench/src/abc/abstract_dataset.py:1418
Method
get_model
Get the trained model. Args: **kwargs: Additional keyword arguments Returns: torch.nn.Module: The t
omnigenbench/src/trainer/base_trainer.py:709
Method
get_model
Get the trained model. Args: **kwargs: Additional keyword arguments Returns: torch.nn.Module: The t
omnigenbench/src/trainer/hf_trainer.py:282
Function
gradio_genetic_algorithm
(structure)
examples/rna_sequence_design/web_rna_design.py:273
Function
gradio_visualize_generation
(sequence)
examples/rna_sequence_design/web_rna_design.py:268
← previous
next →
501–600 of 955, ranked by callers