EC2 Default User
commited on
Commit
•
8e17b21
1
Parent(s):
fe4d392
single-file parquet
Browse files- .gitattributes +4 -0
- README.md +10 -0
- human.parquet +3 -0
- mouse_BALB_c.parquet +3 -0
- mouse_C57BL_6.parquet +3 -0
- rat_SD.parquet +3 -0
- src/download_and_process_data.py +20 -44
- src/human_oas_paired.txt +1 -1
- src/mouse_BALB_c_oas_paired.txt +1 -1
- src/mouse_C57BL_6_oas_paired.txt +1 -1
- oas-paired-sequence-data.py → src/oas-paired-sequence-data.py +0 -0
- src/rat_SD_oas_paired.txt +1 -1
.gitattributes
CHANGED
@@ -58,3 +58,7 @@ mouse_BALB_c.zip filter=lfs diff=lfs merge=lfs -text
|
|
58 |
mouse_C57BL_6.zip filter=lfs diff=lfs merge=lfs -text
|
59 |
rat_SD.zip filter=lfs diff=lfs merge=lfs -text
|
60 |
human.zip filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
58 |
mouse_C57BL_6.zip filter=lfs diff=lfs merge=lfs -text
|
59 |
rat_SD.zip filter=lfs diff=lfs merge=lfs -text
|
60 |
human.zip filter=lfs diff=lfs merge=lfs -text
|
61 |
+
human.parquet filter=lfs diff=lfs merge=lfs -text
|
62 |
+
mouse_BALB_c.parquet filter=lfs diff=lfs merge=lfs -text
|
63 |
+
mouse_C57BL_6.parquet filter=lfs diff=lfs merge=lfs -text
|
64 |
+
rat_SD.parquet filter=lfs diff=lfs merge=lfs -text
|
README.md
CHANGED
@@ -4,7 +4,17 @@ language: en
|
|
4 |
task_categories:
|
5 |
- fill-mask
|
6 |
license: cc-by-4.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
---
|
|
|
8 |
# Dataset Card for OAS Paired Sequence Data
|
9 |
|
10 |
## Dataset Description
|
|
|
4 |
task_categories:
|
5 |
- fill-mask
|
6 |
license: cc-by-4.0
|
7 |
+
configs:
|
8 |
+
- config_name: human
|
9 |
+
data_files: "human.parquet"
|
10 |
+
- config_name: rat_SD
|
11 |
+
data_files: "rat_SD.parquet"
|
12 |
+
- config_name: mouse_BALB_c
|
13 |
+
data_files: "mouse_BALB_c.parquet"
|
14 |
+
- config_name: mouse_C57BL_6
|
15 |
+
data_files: "mouse_C57BL_6.parquet"
|
16 |
---
|
17 |
+
|
18 |
# Dataset Card for OAS Paired Sequence Data
|
19 |
|
20 |
## Dataset Description
|
human.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:15f68167648ede70b384eb9671c162617a251bf47ce758702ce6912c2cbfe05b
|
3 |
+
size 60616532
|
mouse_BALB_c.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:2e0991362b6f59e1fec7751d2696db0d4ef4ab6c609a9d87d98c8ec6061df705
|
3 |
+
size 319404
|
mouse_C57BL_6.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:33b0a43b2d4bcc9e24d6d1f5c747dbc9a21b4e46220da6786f0fda6e024b6f35
|
3 |
+
size 90331
|
rat_SD.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:1dd3a2a45f22e9e87cc13891f2db9c9e74129c23b7e8b94eda81fa1423863c40
|
3 |
+
size 1082597
|
src/download_and_process_data.py
CHANGED
@@ -1,65 +1,41 @@
|
|
1 |
-
import pandas as pd
|
2 |
import os
|
3 |
-
|
|
|
4 |
|
5 |
-
data_dir = os.
|
|
|
6 |
|
7 |
species_list = ["human", "rat_SD", "mouse_BALB_c", "mouse_C57BL_6"]
|
8 |
|
9 |
for species in species_list:
|
10 |
-
|
|
|
|
|
|
|
|
|
11 |
with open(species_url_file, "r") as f:
|
12 |
for csv_file in f.readlines():
|
13 |
print(csv_file)
|
14 |
filename = os.path.basename(csv_file)
|
15 |
-
|
16 |
-
|
17 |
-
df = pd.read_csv(
|
18 |
csv_file,
|
19 |
header=1,
|
20 |
compression="gzip",
|
21 |
on_bad_lines="warn",
|
22 |
)
|
23 |
-
|
24 |
[
|
25 |
-
"sequence_id_heavy",
|
26 |
-
"sequence_heavy",
|
27 |
-
"locus_heavy",
|
28 |
-
"stop_codon_heavy",
|
29 |
-
"productive_heavy",
|
30 |
-
"rev_comp_heavy",
|
31 |
"sequence_alignment_aa_heavy",
|
32 |
-
"fwr1_aa_heavy",
|
33 |
-
"cdr1_aa_heavy",
|
34 |
-
"fwr2_aa_heavy",
|
35 |
-
"cdr2_aa_heavy",
|
36 |
-
"fwr3_aa_heavy",
|
37 |
-
"cdr3_aa_heavy",
|
38 |
-
"junction_aa_heavy",
|
39 |
-
"sequence_id_light",
|
40 |
-
"sequence_light",
|
41 |
-
"locus_light",
|
42 |
-
"stop_codon_light",
|
43 |
-
"productive_light",
|
44 |
-
"rev_comp_light",
|
45 |
"sequence_alignment_aa_light",
|
46 |
-
"fwr1_aa_light",
|
47 |
-
"cdr1_aa_light",
|
48 |
-
"fwr2_aa_light",
|
49 |
-
"cdr2_aa_light",
|
50 |
-
"fwr3_aa_light",
|
51 |
-
"cdr3_aa_light",
|
52 |
-
"junction_aa_light",
|
53 |
]
|
54 |
]
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
x = load_dataset(output_path)
|
64 |
-
print(x.num_rows)
|
65 |
|
|
|
|
|
1 |
import os
|
2 |
+
import pandas as pd
|
3 |
+
import re
|
4 |
|
5 |
+
data_dir = os.getcwd()
|
6 |
+
output_path = os.getcwd()
|
7 |
|
8 |
species_list = ["human", "rat_SD", "mouse_BALB_c", "mouse_C57BL_6"]
|
9 |
|
10 |
for species in species_list:
|
11 |
+
print(f"Downloading {species} files")
|
12 |
+
species_df = pd.DataFrame(
|
13 |
+
columns=["run_id", "sequence_alignment_aa_heavy", "sequence_alignment_aa_light"]
|
14 |
+
)
|
15 |
+
species_url_file = os.path.join(data_dir, species + "_oas_paired.txt")
|
16 |
with open(species_url_file, "r") as f:
|
17 |
for csv_file in f.readlines():
|
18 |
print(csv_file)
|
19 |
filename = os.path.basename(csv_file)
|
20 |
+
run_id = str(re.search(r"^(.*)_[Pp]aired", filename)[1])
|
21 |
+
run_data = pd.read_csv(
|
|
|
22 |
csv_file,
|
23 |
header=1,
|
24 |
compression="gzip",
|
25 |
on_bad_lines="warn",
|
26 |
)
|
27 |
+
run_data = run_data[
|
28 |
[
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
"sequence_alignment_aa_heavy",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
"sequence_alignment_aa_light",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
]
|
32 |
]
|
33 |
+
run_data.insert(0, "run_id", run_id)
|
34 |
+
species_df = pd.concat([species_df, run_data])
|
35 |
+
print(f"{species} output summary:")
|
36 |
+
print(species_df.head())
|
37 |
+
print(species_df.shape)
|
38 |
+
output_file_name = os.path.join(output_path, species + ".parquet")
|
39 |
+
print(f"Creating {output_file_name}")
|
40 |
+
species_df.to_parquet(output_file_name, compression="gzip")
|
|
|
|
|
41 |
|
src/human_oas_paired.txt
CHANGED
@@ -167,4 +167,4 @@ https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Phad_2022/csv_paired/AT7ma_S7__
|
|
167 |
https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Phad_2022/csv_paired/AT7mb_S1__1_Paired_All.csv.gz
|
168 |
https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Phad_2022/csv_paired/AT7mc_S2__1_Paired_All.csv.gz
|
169 |
https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Phad_2022/csv_paired/AT7md_S3__1_Paired_All.csv.gz
|
170 |
-
https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Phad_2022/csv_paired/AT7me_S4__1_Paired_All.csv.gz
|
|
|
167 |
https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Phad_2022/csv_paired/AT7mb_S1__1_Paired_All.csv.gz
|
168 |
https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Phad_2022/csv_paired/AT7mc_S2__1_Paired_All.csv.gz
|
169 |
https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Phad_2022/csv_paired/AT7md_S3__1_Paired_All.csv.gz
|
170 |
+
https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Phad_2022/csv_paired/AT7me_S4__1_Paired_All.csv.gz
|
src/mouse_BALB_c_oas_paired.txt
CHANGED
@@ -5,4 +5,4 @@ https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Goldstein_2019/csv/SRR9179280_p
|
|
5 |
https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Goldstein_2019/csv/SRR9179283_paired.csv.gz
|
6 |
https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Goldstein_2019/csv/SRR9179284_paired.csv.gz
|
7 |
https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Goldstein_2019/csv/SRR9179285_paired.csv.gz
|
8 |
-
https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Goldstein_2019/csv/SRR9179286_paired.csv.gz
|
|
|
5 |
https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Goldstein_2019/csv/SRR9179283_paired.csv.gz
|
6 |
https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Goldstein_2019/csv/SRR9179284_paired.csv.gz
|
7 |
https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Goldstein_2019/csv/SRR9179285_paired.csv.gz
|
8 |
+
https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Goldstein_2019/csv/SRR9179286_paired.csv.gz
|
src/mouse_C57BL_6_oas_paired.txt
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Alsoiussi_2020/csv/SRR11528761_paired.csv.gz
|
2 |
-
https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Alsoiussi_2020/csv/SRR11528762_paired.csv.gz
|
|
|
1 |
https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Alsoiussi_2020/csv/SRR11528761_paired.csv.gz
|
2 |
+
https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Alsoiussi_2020/csv/SRR11528762_paired.csv.gz
|
oas-paired-sequence-data.py → src/oas-paired-sequence-data.py
RENAMED
File without changes
|
src/rat_SD_oas_paired.txt
CHANGED
@@ -17,4 +17,4 @@ https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Goldstein_2019/csv/SRR9179296_p
|
|
17 |
https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Goldstein_2019/csv/SRR9179297_paired.csv.gz
|
18 |
https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Goldstein_2019/csv/SRR9179298_paired.csv.gz
|
19 |
https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Goldstein_2019/csv/SRR9179299_paired.csv.gz
|
20 |
-
https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Goldstein_2019/csv/SRR9179300_paired.csv.gz
|
|
|
17 |
https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Goldstein_2019/csv/SRR9179297_paired.csv.gz
|
18 |
https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Goldstein_2019/csv/SRR9179298_paired.csv.gz
|
19 |
https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Goldstein_2019/csv/SRR9179299_paired.csv.gz
|
20 |
+
https://opig.stats.ox.ac.uk/webapps/ngsdb/paired/Goldstein_2019/csv/SRR9179300_paired.csv.gz
|