Skip to content

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Repository files navigation

Transcriptomic Platform Translation with Vector Embeddings

We present TransPlatformer for translating toxicogenomics from one platform to another. Transcriptomic profiling has evolved through multiple generations of technology, from microarrays (e.g., Affymetrix, CodeLink) to more recent high-throughput sequencing and targeted panels such as S1500+. Microarrays, which dominated gene expression studies in the early 2000s, provided affordable and high-throughput transcript quantification but suffered from cross-hybridization issues and limited dynamic range . RNA-Seq, introduced in the late 2000s, revolutionized transcriptomics by enabling unbiased and comprehensive gene expression analysis, albeit at higher costs and computational demands .

Despite advances, many studies rely on historical microarray data, necessitating the translation of legacy data into modern platforms to ensure continuity and comparability. This translation is complicated by factors such as platform-specific probe design, differences in transcript coverage, and batch effects . Existing methods for cross-platform mapping include statistical normalization, machine learning models, and biological anchoring approaches.

The ability to translate transcriptomic data between platforms has broad implications, including enhanced meta-analyses, improved toxicological modeling, and better integration of historical datasets with contemporary research. TransPlatformer seeks to contribute to this effort by evaluating translation methodologies and proposing novel strategies to improve cross-platform gene expression harmonization.

In this repository there are code examples for MLP, Transformer, and TransPlatformer implementations.

This repository provides code to translate transcriptomic profiles across platforms (e.g., CodeLink, Affymetrix, BioSpyder WT / S1500) using vector embeddings and attention-based neural architectures.


Dependencies

The code requires the following Python packages:

  • PyTorch (> 1.0)
  • pandas
  • numpy

A CUDA-enabled GPU is recommended for training.


Instructions

1. Prepare the Input Data

Organize transcriptomic profiles as a matrix stored in a CSV file:

  • Rows: gene profiles
  • Columns: treatment conditions

An example file, sciome_min.csv, is provided and contains liver (LI) tissue data.

Example CSV Structure

                            PIRACETAM-3d-2500mg/kg  ACETAMINOPHE-.25d-486mg/kg  ...  VALPROIC ACI-3d-1340mg/kg  VALPROIC ACI-5d-1340mg/kg
assay-pathology-probe                                                        ...                                                      
Pick1_47651-LI                            -0.01                       -0.09  ...                       0.03                      -0.01
Olr831_49527-LI                            0.02                        0.01  ...                       0.01                       0.04
Arl6_35444-LI                              0.06                        0.04  ...                       0.04                      -0.06
Ptbp1_32416-LI                            -0.19                       -0.31  ...                       0.01                      -0.06
Kif26b_35137-LI                            0.04                       -0.02  ...                      -0.02                      -0.03
...

2. Platform Encoding

sciome_min.csv includes samples from three transcriptomic platforms, encoded via row names:

CodeLink: rows starting with LI_RU1

Affymetrix: rows starting with LI_RG230

BioSpyder WT / S1500: rows ending with -LI

These conventions are used internally to identify platform and tissue.

3. Set Training Options

Example model and training parameters are in run-vect.sh.

tgt='S1500'
src='Affymetrix'
gpu=1
data='sciome_mini'
database=$data".csv"

bs=10
epochs=40
save_weights=0
maxlen=50
version=0

dropout=0.1
layers=1
d=128

4. Run the Model

Execute: ./run-vect.sh The parsed configuration will be printed, for example:

Namespace(
  lr=0.001,
  epochs=40,
  bs=10,
  database='sciome_mini.csv',
  src_platform='Affymetrix',
  tgt_platform='S1500',
  src_tissues=['LI_'],
  special_tissues=['None'],
  save_weights=0,
  layers=1,
  d=128,
  commonwithru1=0,
  maxlen=50,
  seed=42,
  version=0,
  savemodel=0,
  dropout=0.1,
  testall=0,
  usesrcpredicted=0
)

and you will see output like

In this version, we do 1->r, then several layers of r->r, bnnr,bnnr->bnr, followed by cross attention bnr, bnmr->bmr
Epoch [1/40], Loss: 0.1267
Epoch [2/40], Loss: 0.0498
Epoch [3/40], Loss: 0.0375
Epoch [4/40], Loss: 0.0285
Epoch [5/40], Loss: 0.0211
Epoch [6/40], Loss: 0.0185
Epoch [7/40], Loss: 0.0160
Epoch [8/40], Loss: 0.0157
Epoch [9/40], Loss: 0.0134
Epoch [10/40], Loss: 0.0151
Epoch [11/40], Loss: 0.0126
Epoch [12/40], Loss: 0.0126
Epoch [13/40], Loss: 0.0115
Epoch [14/40], Loss: 0.0118
Epoch [15/40], Loss: 0.0112
Epoch [16/40], Loss: 0.0112
Epoch [17/40], Loss: 0.0110
Epoch [18/40], Loss: 0.0106
Epoch [19/40], Loss: 0.0108
Epoch [20/40], Loss: 0.0107
Epoch [21/40], Loss: 0.0105
Epoch [22/40], Loss: 0.0097
Epoch [23/40], Loss: 0.0089
Epoch [24/40], Loss: 0.0080
Epoch [25/40], Loss: 0.0083
Epoch [26/40], Loss: 0.0082
Epoch [27/40], Loss: 0.0082
Epoch [28/40], Loss: 0.0077
Epoch [29/40], Loss: 0.0073
Epoch [30/40], Loss: 0.0071
Epoch [31/40], Loss: 0.0078
Epoch [32/40], Loss: 0.0075
Epoch [33/40], Loss: 0.0074
Epoch [34/40], Loss: 0.0070
Epoch [35/40], Loss: 0.0070
Epoch [36/40], Loss: 0.0067
Setting lr as 0.0001
Epoch [37/40], Loss: 0.0068
Epoch [38/40], Loss: 0.0067
Epoch [39/40], Loss: 0.0065
Epoch [40/40], Loss: 0.0066
Test Loss: 0.0078, MAE: 0.050484705716371536, Rare MAE:0.49178099632263184, Rare count:3
Rare count 3

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages