miraesunnykim commited on
Commit
46b9da0
·
verified ·
1 Parent(s): 825aadc

use load_datasets

Browse files
Files changed (1) hide show
  1. README.md +38 -3
README.md CHANGED
@@ -31,8 +31,43 @@ meta files contain the following:
31
  - Original.ID: Most descriptive UBERON ID
32
  - Original.Name: Tissue name for original ID
33
 
34
- ## Quick start
35
- If using our model:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
36
  ```
37
  git clone https://github.com/ylaboratory/methylation-classification.git
38
  cd methylation-classification
@@ -48,7 +83,7 @@ If using only our data:
48
  mkdir methyl-classification
49
  cd download
50
  huggingface-cli download ylab/methyl-classification
51
- ```
52
 
53
  ## Citation Information
54
 
 
31
  - Original.ID: Most descriptive UBERON ID
32
  - Original.Name: Tissue name for original ID
33
 
34
+ ## Quick start
35
+ ```
36
+ # Load the dataset using the Hugging Face datasets library
37
+ from datasets import load_dataset
38
+ import seaborn as sns
39
+ import matplotlib.pyplot as plt
40
+
41
+ training_mv = load_dataset(
42
+ "parquet",
43
+ data_files="https://huggingface.co/datasets/ylab/methyl-classification/resolve/main/training_mvalues.parquet"
44
+ ).to_pandas().set_index('Sample')
45
+ training_meta = load_dataset(
46
+ "parquet",
47
+ data_files="https://huggingface.co/datasets/ylab/methyl-classification/resolve/main/training_meta.parquet"
48
+ ).to_pandas().set_index('Sample')
49
+
50
+ labtransfer_mv = load_dataset(
51
+ "parquet",
52
+ data_files="https://huggingface.co/datasets/ylab/methyl-classification/resolve/main/labtransfer_mvalues.parquet"
53
+ ).to_pandas().set_index('Sample')
54
+ labtransfer_meta = load_dataset(
55
+ "parquet",
56
+ data_files="https://huggingface.co/datasets/ylab/methyl-classification/resolve/main/labtransfer_meta.parquet"
57
+ ).to_pandas().set_index('Sample')
58
+
59
+ # Describe tissue distribution
60
+ print(training_meta.describe())
61
+
62
+ # Plot mvalue density plots for first five samples
63
+ sns.kdeplot(data=training_mv.iloc[:5].T, common_norm=False)
64
+ plt.xlabel("Methylation Value")
65
+ plt.ylabel("Density")
66
+ plt.title("Methylation Density for 5 Samples")
67
+ plt.show()
68
+
69
+ ```
70
+ <!-- If using our model:
71
  ```
72
  git clone https://github.com/ylaboratory/methylation-classification.git
73
  cd methylation-classification
 
83
  mkdir methyl-classification
84
  cd download
85
  huggingface-cli download ylab/methyl-classification
86
+ ``` -->
87
 
88
  ## Citation Information
89