EC2 Default User
commited on
Commit
·
50b2c7c
1
Parent(s):
c8af5a7
add cdr metadata
Browse files- download_oas_data.py +5 -9
- test.parquet +2 -2
- train.parquet +2 -2
download_oas_data.py
CHANGED
@@ -2,22 +2,18 @@ import pandas as pd
|
|
2 |
|
3 |
# Download data from OAS
|
4 |
list_of_df = []
|
5 |
-
with open("
|
6 |
for url in f:
|
7 |
print(url)
|
8 |
df = pd.read_csv(url, skiprows=1, compression="gzip")
|
9 |
df = df[df["complete_vdj_heavy"] == "T"]
|
10 |
df = df[df["complete_vdj_light"] == "T"]
|
11 |
-
df = df[["sequence_alignment_aa_heavy", "sequence_alignment_aa_light"]]
|
12 |
-
df["sequence_alignment_aa_joint"] = (
|
13 |
-
df["sequence_alignment_aa_heavy"]
|
14 |
-
+ "-" * 25
|
15 |
-
+ df["sequence_alignment_aa_light"]
|
16 |
-
)
|
17 |
list_of_df.append(df)
|
18 |
df = pd.concat(list_of_df, ignore_index=True)
|
19 |
train=df.sample(frac=0.8, ignore_index=True)
|
20 |
test = df.drop(train.index)
|
21 |
|
22 |
-
train.to_parquet("
|
23 |
-
test.to_parquet("
|
|
|
|
2 |
|
3 |
# Download data from OAS
|
4 |
list_of_df = []
|
5 |
+
with open("oas_uri_list.txt", "r") as f:
|
6 |
for url in f:
|
7 |
print(url)
|
8 |
df = pd.read_csv(url, skiprows=1, compression="gzip")
|
9 |
df = df[df["complete_vdj_heavy"] == "T"]
|
10 |
df = df[df["complete_vdj_light"] == "T"]
|
11 |
+
df = df[["sequence_alignment_aa_heavy", "cdr1_start_heavy", "cdr1_end_heavy", "cdr2_start_heavy", "cdr2_end_heavy", "cdr3_start_heavy", "cdr3_end_heavy", "sequence_alignment_aa_light", "cdr1_start_light", "cdr1_end_light", "cdr2_start_light", "cdr2_end_light", "cdr3_start_light", "cdr3_end_light"]]
|
|
|
|
|
|
|
|
|
|
|
12 |
list_of_df.append(df)
|
13 |
df = pd.concat(list_of_df, ignore_index=True)
|
14 |
train=df.sample(frac=0.8, ignore_index=True)
|
15 |
test = df.drop(train.index)
|
16 |
|
17 |
+
train.to_parquet("train.parquet", index=False)
|
18 |
+
test.to_parquet("test.parquet", index=False)
|
19 |
+
|
test.parquet
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:35058619ee7d0dc9b57966825ea075056b3e7fde75d9013dda0a8dbee6cfe076
|
3 |
+
size 12091279
|
train.parquet
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:eeb084b4aaaa46a627e98b730eb70f86bcae1185f65b610a5f982ad3bb1a50e3
|
3 |
+
size 43728897
|