zqy2000116 commited on
Commit
2e5b846
·
verified ·
1 Parent(s): ef6fa03

Add files using upload-large-folder tool

Browse files
.gitattributes CHANGED
@@ -109,3 +109,7 @@ Unpaired_Cross_molecular_Benchmark/enhancer_design/Val.csv filter=lfs diff=lfs m
109
  Unpaired_Cross_molecular_Benchmark/Isoform/HSPE1.csv filter=lfs diff=lfs merge=lfs -text
110
  Unpaired_Cross_molecular_Benchmark/ec/train.csv filter=lfs diff=lfs merge=lfs -text
111
  Unpaired_Cross_molecular_Benchmark/contact/train.csv filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
109
  Unpaired_Cross_molecular_Benchmark/Isoform/HSPE1.csv filter=lfs diff=lfs merge=lfs -text
110
  Unpaired_Cross_molecular_Benchmark/ec/train.csv filter=lfs diff=lfs merge=lfs -text
111
  Unpaired_Cross_molecular_Benchmark/contact/train.csv filter=lfs diff=lfs merge=lfs -text
112
+ Multi_molecular_Benchmark/AntibodyAntigen/train.csv filter=lfs diff=lfs merge=lfs -text
113
+ Multi_molecular_Benchmark/ncRNAProteinInter/train.csv filter=lfs diff=lfs merge=lfs -text
114
+ Multi_molecular_Benchmark/EnhancerPromoter/train.csv filter=lfs diff=lfs merge=lfs -text
115
+ Multi_molecular_Benchmark/sirnaEfficiency/train.csv filter=lfs diff=lfs merge=lfs -text
Multi_molecular_Benchmark/AntibodyAntigen/test_unseen.csv ADDED
The diff for this file is too large to render. See raw diff
 
Multi_molecular_Benchmark/AntibodyAntigen/train.csv ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:aee655263ab973774107b1879a845b64fe627c794ddfdf2693dea76f09c0bc4d
3
+ size 24559020
Multi_molecular_Benchmark/AntibodyAntigen/val.csv ADDED
The diff for this file is too large to render. See raw diff
 
Multi_molecular_Benchmark/CRISPROffTarget/test.csv ADDED
The diff for this file is too large to render. See raw diff
 
Multi_molecular_Benchmark/CRISPROffTarget/train.csv ADDED
The diff for this file is too large to render. See raw diff
 
Multi_molecular_Benchmark/CRISPROffTarget/val.csv ADDED
The diff for this file is too large to render. See raw diff
 
Multi_molecular_Benchmark/EnhancerPromoter/balance.py ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import pandas as pd
2
+ from sklearn.utils import resample
3
+
4
+ def balance_data(file_path, target_count):
5
+ data = pd.read_csv(file_path)
6
+ # 分离两个类别
7
+ data_label0 = data[data['label'] == 0]
8
+ data_label1 = data[data['label'] == 1]
9
+
10
+ # 下采样多数类
11
+ data_label0_downsampled = data_label0.sample(n=target_count, random_state=42) # 使用sample进行随机下采样
12
+
13
+ # 合并回数据集
14
+ balanced_data = pd.concat([data_label0_downsampled, data_label1])
15
+
16
+ # 重新保存文件
17
+ balanced_data.to_csv(file_path, index=False)
18
+ print(f'Balanced data saved to {file_path}')
19
+
20
+
21
+ # 路径配置
22
+ train_file_path = 'train.csv'
23
+ val_file_path = 'val.csv'
24
+ test_file_path = 'test.csv'
25
+
26
+ # 获取每个类别在train、val和test中的目标数量
27
+ train_majority_count = 7144 # train.csv中Label 1的数量
28
+ val_majority_count = 886 # val.csv中Label 1的数量
29
+ test_majority_count = 881 # test.csv中Label 1的数量
30
+
31
+
32
+ # 平衡每个文件
33
+ balance_data(train_file_path, train_majority_count)
34
+ balance_data(val_file_path, val_majority_count)
35
+ balance_data(test_file_path, test_majority_count)
Multi_molecular_Benchmark/EnhancerPromoter/stat.py ADDED
@@ -0,0 +1,104 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # import pandas as pd
2
+ # train_file = '/home/bingxing2/ailab/group/ai4bio/public/multi-omics/multi-omics/downstream/EnhancerPromoter/train.csv'
3
+ # val_file = '/home/bingxing2/ailab/group/ai4bio/public/multi-omics/multi-omics/downstream/EnhancerPromoter/val.csv'
4
+ # test_file = '/home/bingxing2/ailab/group/ai4bio/public/multi-omics/multi-omics/downstream/EnhancerPromoter/test.csv'
5
+
6
+ # # File paths
7
+ # file_paths = [train_file, val_file, test_file]
8
+
9
+
10
+ # def calculate_combined_statistics(file_paths, column_name):
11
+ # """ Calculate max and mean lengths of the specified column across multiple CSV files """
12
+ # combined_df = pd.concat([pd.read_csv(file_path) for file_path in file_paths], ignore_index=True)
13
+ # # Drop rows with NaN values in the specified column
14
+ # combined_df = combined_df[combined_df[column_name].notna()]
15
+ # # Compute lengths of the sequences
16
+ # lengths = combined_df[column_name].apply(len)
17
+ # return lengths.max(), lengths.mean()
18
+
19
+
20
+ # # Calculate statistics for siRNA_sense_seq
21
+ # print("enhancer statistics:")
22
+ # max_len, mean_len = calculate_combined_statistics(file_paths, 'enhancer')
23
+ # print(f"Max length = {max_len}, Mean length = {mean_len:.2f}")
24
+
25
+ # # Calculate statistics for gene_target_seq
26
+ # print("\npromoter statistics:")
27
+ # max_len, mean_len = calculate_combined_statistics(file_paths, 'promoter')
28
+ # print(f"Max length = {max_len}, Mean length = {mean_len:.2f}")
29
+
30
+
31
+ # import matplotlib.pyplot as plt
32
+
33
+ # def calculate_lengths(file_paths, column_name):
34
+ # """ Calculate lengths of the specified column across multiple CSV files """
35
+ # lengths = []
36
+ # for file_path in file_paths:
37
+ # df = pd.read_csv(file_path)
38
+ # # Drop rows with NaN values in the specified column
39
+ # df = df[df[column_name].notna()]
40
+ # # Compute lengths of the sequences
41
+ # lengths.extend(df[column_name].apply(len))
42
+ # return lengths
43
+
44
+ # # File paths
45
+
46
+
47
+ # # Calculate lengths for siRNA_sense_seq and gene_target_seq
48
+ # siRNA_lengths = calculate_lengths(file_paths, 'enhancer')
49
+ # gene_target_lengths = calculate_lengths(file_paths, 'promoter')
50
+
51
+ # # Create histograms
52
+ # plt.figure(figsize=(14, 7))
53
+
54
+ # # Plot for siRNA_sense_seq lengths
55
+ # plt.subplot(1, 2, 1)
56
+ # plt.hist(siRNA_lengths, bins=30, color='skyblue', edgecolor='black')
57
+ # plt.title('enhancer Length Distribution')
58
+ # plt.xlabel('Length')
59
+ # plt.ylabel('Frequency')
60
+
61
+ # # Plot for gene_target_seq lengths
62
+ # plt.subplot(1, 2, 2)
63
+ # plt.hist(gene_target_lengths, bins=30, color='lightgreen', edgecolor='black')
64
+ # plt.title('promoter Length Distribution')
65
+ # plt.xlabel('Length')
66
+ # plt.ylabel('Frequency')
67
+
68
+ # # Save the figure
69
+ # plt.tight_layout()
70
+ # plt.savefig('length_distributions.png')
71
+
72
+
73
+
74
+ import pandas as pd
75
+
76
+ # 定义 CSV 文件路径
77
+ csv_files = ['train.csv',
78
+ 'val.csv',
79
+ 'test.csv']
80
+
81
+ # 初始化统计字典
82
+ label_stats = {'train': {0: 0, 1: 0}, 'val': {0: 0, 1: 0}, 'test': {0: 0, 1: 0}}
83
+
84
+ # 统计每个文件中的 label 数量
85
+ for file in csv_files:
86
+ # 读取 CSV 文件
87
+ df = pd.read_csv(file)
88
+
89
+ # 提取文件名(去掉 .csv 后缀)
90
+ file_name = file.split('.')[0]
91
+
92
+ # 统计 label 列中的 0 和 1 的数量
93
+ label_counts = df['label'].value_counts()
94
+
95
+ # 更新统计字典
96
+ for label in label_counts.index:
97
+ label_stats[file_name][label] = label_counts[label]
98
+
99
+ # 打印统计结果
100
+ for dataset, counts in label_stats.items():
101
+ print(f"{dataset}.csv")
102
+ print(f"Label 0: {counts[0]}")
103
+ print(f"Label 1: {counts[1]}")
104
+ print()
Multi_molecular_Benchmark/EnhancerPromoter/test.csv ADDED
The diff for this file is too large to render. See raw diff
 
Multi_molecular_Benchmark/EnhancerPromoter/train.csv ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cfe2519da87dd0b2875006a33f8d28cc1d7b657903bdb35d7b2419df9942b26d
3
+ size 71589312
Multi_molecular_Benchmark/EnhancerPromoter/val.csv ADDED
The diff for this file is too large to render. See raw diff
 
Multi_molecular_Benchmark/ncRNAProteinInter/stat.py ADDED
@@ -0,0 +1,104 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # import pandas as pd
2
+ # train_file = '/home/bingxing2/ailab/group/ai4bio/public/multi-omics/multi-omics/downstream/EnhancerPromoter/train.csv'
3
+ # val_file = '/home/bingxing2/ailab/group/ai4bio/public/multi-omics/multi-omics/downstream/EnhancerPromoter/val.csv'
4
+ # test_file = '/home/bingxing2/ailab/group/ai4bio/public/multi-omics/multi-omics/downstream/EnhancerPromoter/test.csv'
5
+
6
+ # # File paths
7
+ # file_paths = [train_file, val_file, test_file]
8
+
9
+
10
+ # def calculate_combined_statistics(file_paths, column_name):
11
+ # """ Calculate max and mean lengths of the specified column across multiple CSV files """
12
+ # combined_df = pd.concat([pd.read_csv(file_path) for file_path in file_paths], ignore_index=True)
13
+ # # Drop rows with NaN values in the specified column
14
+ # combined_df = combined_df[combined_df[column_name].notna()]
15
+ # # Compute lengths of the sequences
16
+ # lengths = combined_df[column_name].apply(len)
17
+ # return lengths.max(), lengths.mean()
18
+
19
+
20
+ # # Calculate statistics for siRNA_sense_seq
21
+ # print("enhancer statistics:")
22
+ # max_len, mean_len = calculate_combined_statistics(file_paths, 'enhancer')
23
+ # print(f"Max length = {max_len}, Mean length = {mean_len:.2f}")
24
+
25
+ # # Calculate statistics for gene_target_seq
26
+ # print("\npromoter statistics:")
27
+ # max_len, mean_len = calculate_combined_statistics(file_paths, 'promoter')
28
+ # print(f"Max length = {max_len}, Mean length = {mean_len:.2f}")
29
+
30
+
31
+ # import matplotlib.pyplot as plt
32
+
33
+ # def calculate_lengths(file_paths, column_name):
34
+ # """ Calculate lengths of the specified column across multiple CSV files """
35
+ # lengths = []
36
+ # for file_path in file_paths:
37
+ # df = pd.read_csv(file_path)
38
+ # # Drop rows with NaN values in the specified column
39
+ # df = df[df[column_name].notna()]
40
+ # # Compute lengths of the sequences
41
+ # lengths.extend(df[column_name].apply(len))
42
+ # return lengths
43
+
44
+ # # File paths
45
+
46
+
47
+ # # Calculate lengths for siRNA_sense_seq and gene_target_seq
48
+ # siRNA_lengths = calculate_lengths(file_paths, 'enhancer')
49
+ # gene_target_lengths = calculate_lengths(file_paths, 'promoter')
50
+
51
+ # # Create histograms
52
+ # plt.figure(figsize=(14, 7))
53
+
54
+ # # Plot for siRNA_sense_seq lengths
55
+ # plt.subplot(1, 2, 1)
56
+ # plt.hist(siRNA_lengths, bins=30, color='skyblue', edgecolor='black')
57
+ # plt.title('enhancer Length Distribution')
58
+ # plt.xlabel('Length')
59
+ # plt.ylabel('Frequency')
60
+
61
+ # # Plot for gene_target_seq lengths
62
+ # plt.subplot(1, 2, 2)
63
+ # plt.hist(gene_target_lengths, bins=30, color='lightgreen', edgecolor='black')
64
+ # plt.title('promoter Length Distribution')
65
+ # plt.xlabel('Length')
66
+ # plt.ylabel('Frequency')
67
+
68
+ # # Save the figure
69
+ # plt.tight_layout()
70
+ # plt.savefig('length_distributions.png')
71
+
72
+
73
+
74
+ import pandas as pd
75
+
76
+ # 定义 CSV 文件路径
77
+ csv_files = ['train.csv',
78
+ 'val.csv',
79
+ 'test.csv']
80
+
81
+ # 初始化统计字典
82
+ label_stats = {'train': {0: 0, 1: 0}, 'val': {0: 0, 1: 0}, 'test': {0: 0, 1: 0}}
83
+
84
+ # 统计每个文件中的 label 数量
85
+ for file in csv_files:
86
+ # 读取 CSV 文件
87
+ df = pd.read_csv(file)
88
+
89
+ # 提取文件名(去掉 .csv 后缀)
90
+ file_name = file.split('.')[0]
91
+
92
+ # 统计 label 列中的 0 和 1 的数量
93
+ label_counts = df['label'].value_counts()
94
+
95
+ # 更新统计字典
96
+ for label in label_counts.index:
97
+ label_stats[file_name][label] = label_counts[label]
98
+
99
+ # 打印统计结果
100
+ for dataset, counts in label_stats.items():
101
+ print(f"{dataset}.csv")
102
+ print(f"Label 0: {counts[0]}")
103
+ print(f"Label 1: {counts[1]}")
104
+ print()
Multi_molecular_Benchmark/ncRNAProteinInter/test.csv ADDED
The diff for this file is too large to render. See raw diff
 
Multi_molecular_Benchmark/ncRNAProteinInter/train.csv ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3d3d0c1c133296e4d53d47a25d4d8d847c12a80b12dbf114dea07fa86f9c58cd
3
+ size 35832781
Multi_molecular_Benchmark/ncRNAProteinInter/val.csv ADDED
The diff for this file is too large to render. See raw diff
 
Multi_molecular_Benchmark/sirnaEfficiency/test.csv ADDED
The diff for this file is too large to render. See raw diff
 
Multi_molecular_Benchmark/sirnaEfficiency/train.csv ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:edf9d0aecfd6911a7f4cee76e2413d478646399fa7cac626ac598c36ad2cb3a3
3
+ size 80975764
Multi_molecular_Benchmark/sirnaEfficiency/val.csv ADDED
The diff for this file is too large to render. See raw diff