EC2 Default User commited on
Commit
6c1102a
1 Parent(s): 7a718ee

Remove protein atlas data and add additional metadata

Browse files
Files changed (5) hide show
  1. README.md +14 -20
  2. deeploc-test.parquet +2 -2
  3. deeploc-train.parquet +2 -2
  4. deploc-val.parquet +2 -2
  5. prep.py +12 -12
README.md CHANGED
@@ -1,5 +1,5 @@
1
  ---
2
- license: cc-by-sa-3.0
3
  ---
4
 
5
  # DeepLoc-2.0 Training Data
@@ -11,22 +11,22 @@ Data downloaded and processed using the following Python script:
11
 
12
  ```python
13
  import pandas as pd
14
- from sklearn.model_selection import train_test_split
15
 
16
- train = pd.read_csv('https://services.healthtech.dtu.dk/services/DeepLoc-2.0/data/Swissprot_Train_Validation_dataset.csv')
17
- train = train.loc[:,['Sequence','Cell membrane', 'Cytoplasm','Endoplasmic reticulum', 'Extracellular', 'Golgi apparatus', 'Lysosome/Vacuole', 'Mitochondrion', 'Nucleus', 'Peroxisome', 'Plastid']]
18
- train = train.melt('Sequence', var_name='Location').query('value == 1.0').drop(labels='value', axis=1)
19
 
20
- train, val = train_test_split(train)
21
- val = val.reset_index(drop=True)
 
 
22
 
23
- test = pd.read_csv('https://services.healthtech.dtu.dk/services/DeepLoc-2.0/data/hpa_testset.csv')
24
- test = test.loc[:,['fasta','Cell membrane', 'Cytoplasm','Endoplasmic reticulum', 'Golgi apparatus', 'Lysosome/Vacuole', 'Mitochondrion', 'Nucleus', 'Peroxisome']].rename(columns={'fasta':'Sequence'})
25
- test = test.melt('Sequence', var_name='Location').query('value == 1.0').drop(labels='value', axis=1).sample(frac=1).reset_index(drop=True)
26
 
27
- train.to_parquet('data/deeploc/deeploc-train.parquet', index=False)
28
- val.to_parquet('data/deeploc/deploc-val.parquet', index=False)
29
- test.to_parquet('data/deeploc/deeploc-test.parquet', index=False)
30
  ```
31
 
32
  ## Citation
@@ -37,7 +37,7 @@ test.to_parquet('data/deeploc/deeploc-test.parquet', index=False)
37
  Vineet Thumuluri and others, DeepLoc 2.0: multi-label subcellular localization prediction using protein language models, Nucleic Acids Research, Volume 50, Issue W1, 5 July 2022, Pages W228–W234, https://doi.org/10.1093/nar/gkac278
38
  ```
39
 
40
- The DeepLoc data is a derivative of the following datasets:
41
 
42
  **UniProt**
43
 
@@ -46,9 +46,3 @@ The UniProt Consortium
46
  UniProt: the Universal Protein Knowledgebase in 2023
47
  Nucleic Acids Res. 51:D523–D531 (2023)
48
  ```
49
-
50
- **The Human Protein Atlas**
51
-
52
- ```
53
- Mathias Uhlén et al.,Tissue-based map of the human proteome.Science347,1260419(2015).DOI:10.1126/science.1260419
54
- ```
 
1
  ---
2
+ license: cc-by-4.0
3
  ---
4
 
5
  # DeepLoc-2.0 Training Data
 
11
 
12
  ```python
13
  import pandas as pd
 
14
 
15
+ df = pd.read_csv('https://services.healthtech.dtu.dk/services/DeepLoc-2.0/data/Swissprot_Train_Validation_dataset.csv').drop(['Unnamed: 0', 'Partition'], axis=1)
16
+ df = df.melt(['Kingdom', 'ACC', 'Sequence','Membrane'], var_name='Location').query('value == 1.0').drop(labels='value', axis=1).astype({'Membrane': 'int8'})
 
17
 
18
+ train = df.sample(frac=0.8)
19
+ df = df.drop(train.index)
20
+ val = df.sample(frac=0.5)
21
+ test = df.drop(val.index)
22
 
23
+ train = train.reset_index(drop=True)
24
+ val = val.reset_index(drop=True)
25
+ test = test.reset_index(drop=True)
26
 
27
+ train.to_parquet('deeploc-train.parquet', index=False)
28
+ val.to_parquet('deploc-val.parquet', index=False)
29
+ test.to_parquet('deeploc-test.parquet', index=False)
30
  ```
31
 
32
  ## Citation
 
37
  Vineet Thumuluri and others, DeepLoc 2.0: multi-label subcellular localization prediction using protein language models, Nucleic Acids Research, Volume 50, Issue W1, 5 July 2022, Pages W228–W234, https://doi.org/10.1093/nar/gkac278
38
  ```
39
 
40
+ The DeepLoc data is a derivative of the UniProt dataset:
41
 
42
  **UniProt**
43
 
 
46
  UniProt: the Universal Protein Knowledgebase in 2023
47
  Nucleic Acids Res. 51:D523–D531 (2023)
48
  ```
 
 
 
 
 
 
deeploc-test.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:9c3ba63829261f73c3f898b243151afb15bd7acb8764625cc6880869ccc90724
3
- size 505764
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a1e282132ec5d2681ca04ba6f131a4d13cf231b61c47186e3a53691791dcc036
3
+ size 2016514
deeploc-train.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:ab860ba3bb4b0f5cccd607d8b8f327b823cb115efb5687d0d6155f9b18dc20cc
3
- size 15201778
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4e60d7303b0cac6bfc2bb37d6671304b19f0846a197e58dc125143d3cacfc6ee
3
+ size 16422156
deploc-val.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:42f78d31d98b7c8c645ec45e86fc34f6ad627d475994982891b3080229fc4b1f
3
- size 5031310
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3d0a708c9338df6177c58fa5ee70c02f1e4fe1b47f79a5a36ec7ed9ad1ca8d0a
3
+ size 2045512
prep.py CHANGED
@@ -1,17 +1,17 @@
1
  import pandas as pd
2
- from sklearn.model_selection import train_test_split
3
 
4
- train = pd.read_csv('https://services.healthtech.dtu.dk/services/DeepLoc-2.0/data/Swissprot_Train_Validation_dataset.csv')
5
- train = train.loc[:,['Sequence','Cell membrane', 'Cytoplasm','Endoplasmic reticulum', 'Extracellular', 'Golgi apparatus', 'Lysosome/Vacuole', 'Mitochondrion', 'Nucleus', 'Peroxisome', 'Plastid']]
6
- train = train.melt('Sequence', var_name='Location').query('value == 1.0').drop(labels='value', axis=1)
7
 
8
- train, val = train_test_split(train)
9
- val = val.reset_index(drop=True)
 
 
10
 
11
- test = pd.read_csv('https://services.healthtech.dtu.dk/services/DeepLoc-2.0/data/hpa_testset.csv')
12
- test = test.loc[:,['fasta','Cell membrane', 'Cytoplasm','Endoplasmic reticulum', 'Golgi apparatus', 'Lysosome/Vacuole', 'Mitochondrion', 'Nucleus', 'Peroxisome']].rename(columns={'fasta':'Sequence'})
13
- test = test.melt('Sequence', var_name='Location').query('value == 1.0').drop(labels='value', axis=1).sample(frac=1).reset_index(drop=True)
14
 
15
- train.to_parquet('data/deeploc/deeploc-train.parquet', index=False)
16
- val.to_parquet('data/deeploc/deploc-val.parquet', index=False)
17
- test.to_parquet('data/deeploc/deeploc-test.parquet', index=False)
 
1
  import pandas as pd
 
2
 
3
+ df = pd.read_csv('https://services.healthtech.dtu.dk/services/DeepLoc-2.0/data/Swissprot_Train_Validation_dataset.csv').drop(['Unnamed: 0', 'Partition'], axis=1)
4
+ df = df.melt(['Kingdom', 'ACC', 'Sequence','Membrane'], var_name='Location').query('value == 1.0').drop(labels='value', axis=1).astype({'Membrane': 'int8'})
 
5
 
6
+ train = df.sample(frac=0.8)
7
+ df = df.drop(train.index)
8
+ val = df.sample(frac=0.5)
9
+ test = df.drop(val.index)
10
 
11
+ train = train.reset_index(drop=True)
12
+ val = val.reset_index(drop=True)
13
+ test = test.reset_index(drop=True)
14
 
15
+ train.to_parquet('deeploc-train.parquet', index=False)
16
+ val.to_parquet('deploc-val.parquet', index=False)
17
+ test.to_parquet('deeploc-test.parquet', index=False)