Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 39 additions & 39 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,45 +135,45 @@ For detailed explanations of BioNeuralNet's supported GNN architectures and thei

```Python

import pandas as pd
from bioneuralnet.external_tools import SmCCNet
from bioneuralnet.downstream_task import DPMON
from bioneuralnet.datasets import DatasetLoadeR

# Load the dataset and access individual omics modalities
example = DatasetLoader("example1")
omics_genes = example.data["X1"]
omics_proteins = example.data["X2"]
phenotype = example.data["Y"]
clinical = example.data["clinical"]

# Network Construction with SmCCNet
smccnet = SmCCNet(
phenotype_df=phenotype,
omics_dfs=[omics_genes, omics_proteins],
data_types=["Genes", "Proteins"],
kfold=5,
summarization="PCA",
)
global_network, clusters = smccnet.run()
print("Adjacency matrix generated." )

# Disease Prediction using DPMON
dpmon = DPMON(
adjacency_matrix=global_network,
omics_list=[omics_genes, omics_proteins],
phenotype_data=phenotype,
clinical_data=clinical,
model="GCN",
repeat_num=5,
tune=True,
gpu=True,
cuda=0,
output_dir="./output"
)

predictions, avg_accuracy = dpmon.run()
print("Disease phenotype predictions:\n", predictions)
import pandas as pd
from bioneuralnet.external_tools import SmCCNet
from bioneuralnet.downstream_task import DPMON
from bioneuralnet.datasets import DatasetLoader

# Load the dataset and access individual omics modalities
example = DatasetLoader("example1")
omics_genes = example.data["X1"]
omics_proteins = example.data["X2"]
phenotype = example.data["Y"]
clinical = example.data["clinical_data"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice catch on these two.


# Network Construction with SmCCNet
smccnet = SmCCNet(
phenotype_df=phenotype,
omics_dfs=[omics_genes, omics_proteins],
data_types=["Genes", "Proteins"],
kfold=5,
summarization="PCA",
)
global_network, clusters = smccnet.run()
print("Adjacency matrix generated." )

# Disease Prediction using DPMON
dpmon = DPMON(
adjacency_matrix=global_network,
omics_list=[omics_genes, omics_proteins],
phenotype_data=phenotype,
clinical_data=clinical,
model="GCN",
repeat_num=5,
tune=True,
gpu=True,
cuda=0,
output_dir="./output"
)

predictions, avg_accuracy = dpmon.run()
print("Disease phenotype predictions:\n", predictions)
```

## 5. Explore BioNeuralNet's Documentation
Expand Down
Loading