import numpy as np
import pandas as pd
import os
import subprocess
import sys
import pkg_resources
import time
import platform
import psutil
import joblib
from pathlib import Path
⚠️ Note:
The following is an example demonstration. Here, we train a model using only a single fold and tune it on a smaller grid of hyperparameters.
In the manuscript, we utilized five models trained across five folds.
For the hyperparameters used in the manuscript, please refer to the comments in the script:
scripts/2.Cell_type_fraction_model/2.1.main_cell_type_model.py.
# Function to get system information
def get_system_info():
print("\n--- System Information ---")
print(f"Operating System: {platform.system()} {platform.release()} ({platform.version()})")
print(f"Processor: {platform.processor()}")
print(f"CPU Cores: {psutil.cpu_count(logical=False)} (Physical), {psutil.cpu_count(logical=True)} (Logical)")
print(f"Total RAM: {psutil.virtual_memory().total / (1024**3):.2f} GB")
# Check for GPU availability (if NVIDIA GPU is installed)
try:
gpu_info = subprocess.run("nvidia-smi --query-gpu=name --format=csv,noheader",
shell=True, capture_output=True, text=True, check=True)
print(f"GPU: {gpu_info.stdout.strip()}")
except subprocess.CalledProcessError:
print("GPU: Not needed")
root_dir = os.path.abspath(os.path.join(os.getcwd(), "../"))
path2input = f'{root_dir}/input_data/Cell_type_fraction_model/'
path2output = f'{root_dir}/output_data/Cell_type_fraction_model/'
# Load the .npz file
file_path = f"{path2input}train_test_idx_split.npz"
split_file = np.load(file_path, allow_pickle = True)
# List all keys in the .npz file
print("Keys in the .npz file:", split_file.files)
Keys in the .npz file: ['train_idx', 'test_idx']
# Explore the contents of each key
for key in split_file.files:
print(f"\nKey: {key}")
print("Shape:", split_file[key].shape)
print("First 5 elements:", split_file[key][:5]) # Preview first 10 elements
Key: train_idx
Shape: (5,)
First 5 elements: [array([ 0, 1, 2, ..., 1312, 1313, 1316])
array([ 0, 1, 2, ..., 1314, 1315, 1316])
array([ 4, 5, 6, ..., 1314, 1315, 1316])
array([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43,
44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76,
77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98,
99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109,
110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120,
121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131,
132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142,
143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153,
154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164,
165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175,
176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186,
187, 188, 189, 190, 191, 192, 193, 195, 196, 197, 198,
199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209,
210, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271,
272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282,
345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355,
356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366,
367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377,
378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388,
389, 390, 391, 392, 393, 420, 421, 422, 423, 424, 425,
426, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466,
467, 468, 469, 470, 471, 472, 473, 481, 482, 483, 484,
485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495,
496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506,
507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517,
518, 519, 520, 549, 550, 551, 552, 553, 554, 555, 556,
557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567,
568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578,
579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589,
590, 591, 592, 593, 594, 615, 616, 617, 618, 619, 620,
621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631,
632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642,
643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653,
654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664,
665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675,
676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686,
687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 719,
720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730,
731, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741,
742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752,
753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763,
764, 765, 766, 767, 768, 769, 770, 771, 772, 773, 774,
775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 785,
786, 787, 788, 789, 790, 791, 792, 793, 794, 795, 796,
797, 798, 799, 800, 801, 802, 803, 804, 805, 806, 807,
808, 809, 810, 811, 812, 813, 814, 815, 816, 817, 818,
819, 820, 821, 829, 830, 831, 832, 833, 834, 835, 836,
837, 838, 839, 840, 841, 842, 843, 844, 845, 846, 847,
848, 849, 850, 851, 881, 882, 883, 884, 885, 886, 887,
888, 889, 890, 891, 892, 893, 894, 895, 896, 897, 898,
899, 900, 901, 902, 903, 904, 905, 906, 907, 908, 909,
910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 920,
921, 922, 923, 924, 925, 926, 927, 928, 929, 930, 931,
932, 933, 934, 935, 936, 937, 938, 939, 940, 941, 942,
943, 944, 973, 974, 975, 976, 977, 978, 979, 980, 981,
982, 983, 984, 985, 986, 987, 988, 989, 990, 991, 992,
993, 994, 995, 996, 997, 998, 999, 1000, 1001, 1002, 1003,
1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1025, 1026, 1027,
1028, 1029, 1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038,
1039, 1040, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049,
1050, 1051, 1052, 1053, 1054, 1055, 1056, 1057, 1058, 1059, 1060,
1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071,
1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1083, 1084, 1085,
1086, 1087, 1088, 1089, 1090, 1091, 1092, 1093, 1094, 1095, 1096,
1097, 1098, 1099, 1100, 1101, 1102, 1103, 1104, 1105, 1106, 1107,
1108, 1109, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 1117, 1118,
1119, 1120, 1121, 1122, 1123, 1124, 1125, 1126, 1127, 1128, 1129,
1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137, 1138, 1139, 1140,
1141, 1142, 1143, 1144, 1145, 1146, 1147, 1148, 1149, 1150, 1151,
1152, 1153, 1154, 1155, 1156, 1157, 1158, 1163, 1164, 1165, 1166,
1167, 1168, 1169, 1170, 1171, 1172, 1173, 1174, 1175, 1176, 1177,
1178, 1179, 1180, 1181, 1182, 1183, 1184, 1185, 1186, 1187, 1188,
1189, 1190, 1191, 1192, 1193, 1194, 1195, 1196, 1197, 1198, 1199,
1200, 1201, 1202, 1203, 1204, 1205, 1206, 1207, 1208, 1209, 1210,
1211, 1212, 1216, 1217, 1218, 1219, 1220, 1221, 1222, 1223, 1224,
1225, 1226, 1227, 1228, 1229, 1230, 1231, 1232, 1233, 1234, 1235,
1236, 1237, 1238, 1239, 1240, 1241, 1242, 1253, 1254, 1255, 1256,
1257, 1258, 1259, 1260, 1261, 1262, 1263, 1264, 1265, 1266, 1267,
1268, 1269, 1270, 1271, 1272, 1273, 1274, 1275, 1276, 1277, 1278,
1279, 1280, 1281, 1282, 1283, 1284, 1285, 1286, 1287, 1288, 1289,
1290, 1291, 1292, 1293, 1294, 1295, 1296, 1305, 1306, 1307, 1308,
1309, 1310, 1311, 1312, 1313, 1314, 1315])
array([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43,
44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76,
77, 78, 79, 80, 81, 82, 83, 84, 126, 127, 128,
129, 130, 131, 132, 184, 185, 186, 187, 188, 189, 190,
191, 192, 194, 195, 196, 197, 198, 199, 200, 201, 202,
203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213,
214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224,
225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235,
236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246,
247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257,
258, 259, 260, 261, 262, 263, 264, 265, 266, 283, 284,
285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295,
296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306,
307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317,
318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328,
329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339,
340, 341, 342, 343, 344, 350, 351, 352, 353, 354, 376,
394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404,
405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415,
416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426,
427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437,
438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448,
449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 474,
475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485,
486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496,
497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507,
508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518,
519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529,
530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540,
541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551,
552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562,
563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573,
574, 575, 595, 596, 597, 598, 599, 600, 601, 602, 603,
604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614,
615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625,
626, 627, 628, 629, 667, 668, 669, 670, 671, 672, 673,
674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684,
685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695,
696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706,
707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717,
718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728,
761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771,
772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782,
783, 784, 785, 786, 787, 788, 789, 790, 791, 792, 793,
794, 795, 796, 797, 798, 799, 800, 801, 802, 803, 804,
805, 806, 807, 808, 809, 810, 811, 812, 813, 814, 815,
816, 817, 818, 819, 820, 821, 822, 823, 824, 825, 826,
827, 828, 829, 830, 831, 832, 833, 834, 835, 836, 837,
838, 839, 840, 841, 842, 843, 844, 845, 846, 847, 848,
849, 850, 851, 852, 853, 854, 855, 856, 857, 858, 859,
860, 861, 862, 863, 864, 865, 866, 867, 868, 869, 870,
871, 872, 873, 874, 875, 876, 877, 878, 879, 880, 881,
882, 883, 884, 885, 886, 887, 888, 889, 890, 891, 892,
893, 894, 895, 896, 897, 898, 899, 900, 901, 902, 903,
904, 905, 906, 907, 908, 909, 910, 911, 912, 913, 919,
920, 921, 922, 923, 924, 925, 926, 927, 928, 929, 930,
931, 932, 933, 934, 935, 936, 937, 938, 939, 940, 941,
942, 943, 944, 945, 946, 947, 948, 949, 950, 951, 952,
953, 954, 955, 956, 957, 958, 959, 960, 961, 962, 963,
964, 965, 966, 967, 968, 969, 970, 971, 972, 973, 974,
989, 990, 991, 992, 993, 994, 995, 996, 997, 998, 999,
1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1012, 1013, 1014,
1015, 1016, 1017, 1018, 1019, 1020, 1021, 1022, 1023, 1024, 1025,
1026, 1027, 1028, 1029, 1030, 1031, 1032, 1033, 1034, 1035, 1036,
1068, 1069, 1070, 1071, 1072, 1073, 1074, 1075, 1076, 1077, 1078,
1079, 1080, 1081, 1082, 1083, 1084, 1085, 1086, 1087, 1088, 1092,
1093, 1094, 1095, 1096, 1097, 1098, 1099, 1100, 1101, 1102, 1103,
1104, 1105, 1106, 1107, 1108, 1109, 1110, 1111, 1155, 1156, 1157,
1158, 1159, 1160, 1161, 1162, 1163, 1164, 1165, 1166, 1167, 1168,
1169, 1170, 1171, 1172, 1173, 1174, 1175, 1176, 1177, 1178, 1179,
1180, 1181, 1182, 1183, 1184, 1187, 1188, 1189, 1190, 1191, 1192,
1193, 1194, 1195, 1196, 1197, 1198, 1199, 1200, 1201, 1202, 1203,
1204, 1205, 1206, 1207, 1208, 1209, 1210, 1211, 1212, 1213, 1214,
1215, 1216, 1217, 1218, 1219, 1229, 1230, 1231, 1232, 1233, 1234,
1235, 1236, 1240, 1241, 1242, 1243, 1244, 1245, 1246, 1247, 1248,
1249, 1250, 1251, 1252, 1253, 1254, 1255, 1256, 1257, 1258, 1267,
1268, 1269, 1270, 1271, 1272, 1273, 1274, 1275, 1276, 1277, 1278,
1279, 1280, 1281, 1282, 1283, 1284, 1285, 1286, 1287, 1288, 1289,
1290, 1291, 1292, 1293, 1294, 1295, 1296, 1297, 1298, 1299, 1300,
1301, 1302, 1303, 1304, 1305, 1306, 1307, 1308, 1309, 1310, 1311,
1312, 1313, 1314, 1315, 1316]) ]
Key: test_idx
Shape: (5,)
First 5 elements: [array([ 4, 5, 6, 7, 8, 9, 10, 11, 184, 185, 186,
187, 188, 189, 190, 191, 192, 262, 263, 264, 265, 266,
420, 421, 422, 423, 424, 425, 426, 513, 514, 515, 516,
517, 518, 519, 520, 719, 720, 721, 722, 723, 724, 725,
726, 727, 728, 775, 776, 777, 778, 779, 780, 781, 782,
783, 809, 810, 811, 812, 813, 814, 815, 816, 817, 829,
830, 831, 832, 833, 834, 835, 836, 837, 838, 839, 840,
841, 842, 843, 844, 845, 846, 847, 848, 849, 850, 851,
889, 890, 891, 892, 893, 894, 895, 896, 897, 989, 990,
991, 992, 993, 994, 995, 996, 997, 998, 999, 1000, 1096,
1097, 1098, 1099, 1100, 1101, 1102, 1103, 1104, 1105, 1106, 1107,
1108, 1109, 1110, 1111, 1155, 1156, 1157, 1158, 1163, 1164, 1165,
1166, 1167, 1168, 1169, 1187, 1188, 1189, 1190, 1191, 1192, 1193,
1194, 1195, 1196, 1197, 1205, 1206, 1207, 1208, 1209, 1210, 1211,
1212, 1240, 1241, 1242, 1289, 1290, 1291, 1292, 1293, 1294, 1295,
1296, 1305, 1306, 1307, 1314, 1315])
array([ 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66,
67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77,
78, 79, 80, 81, 82, 83, 84, 350, 351, 352, 353,
354, 376, 457, 458, 481, 482, 483, 484, 485, 486, 487,
488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498,
499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509,
510, 511, 512, 549, 550, 551, 552, 553, 554, 555, 556,
575, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624,
625, 626, 627, 628, 629, 769, 770, 771, 772, 773, 774,
818, 819, 820, 821, 898, 899, 900, 901, 902, 903, 904,
905, 906, 907, 908, 909, 910, 911, 912, 913, 973, 974,
1025, 1026, 1027, 1028, 1029, 1030, 1031, 1032, 1033, 1034, 1035,
1036, 1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1216, 1217,
1218, 1219, 1253, 1254, 1255, 1256, 1271, 1272, 1273, 1274, 1278,
1279, 1280, 1281, 1282, 1283, 1284, 1285, 1286, 1287, 1288])
array([ 0, 1, 2, 3, 126, 127, 128, 129, 130, 131, 132,
195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205,
206, 207, 208, 209, 210, 557, 558, 559, 560, 561, 562,
563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573,
574, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676,
677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687,
688, 689, 690, 691, 692, 693, 694, 695, 696, 761, 762,
763, 764, 765, 766, 767, 768, 784, 785, 786, 787, 788,
789, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799,
800, 801, 802, 803, 804, 805, 806, 807, 808, 881, 882,
883, 884, 885, 886, 887, 888, 919, 920, 921, 922, 923,
924, 925, 926, 927, 928, 929, 930, 931, 932, 933, 934,
935, 936, 937, 938, 939, 940, 941, 942, 943, 944, 1001,
1002, 1003, 1004, 1005, 1006, 1007, 1068, 1069, 1070, 1071, 1083,
1084, 1085, 1086, 1087, 1088, 1092, 1093, 1094, 1095, 1170, 1171,
1172, 1173, 1174, 1175, 1176, 1177, 1178, 1179, 1180, 1181, 1182,
1183, 1184, 1198, 1199, 1200, 1201, 1202, 1203, 1204, 1229, 1230,
1231, 1232, 1233, 1234, 1235, 1236, 1257, 1258, 1267, 1268, 1269,
1270, 1275, 1276, 1277, 1308, 1309, 1310, 1311, 1312, 1313])
array([ 194, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220,
221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231,
232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242,
243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253,
254, 255, 256, 257, 258, 259, 260, 261, 283, 284, 285,
286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296,
297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307,
308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318,
319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329,
330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340,
341, 342, 343, 344, 394, 395, 396, 397, 398, 399, 400,
401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411,
412, 413, 414, 415, 416, 417, 418, 419, 427, 428, 429,
430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440,
441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451,
452, 453, 454, 455, 456, 474, 475, 476, 477, 478, 479,
480, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530,
531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541,
542, 543, 544, 545, 546, 547, 548, 595, 596, 597, 598,
599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609,
610, 611, 612, 613, 614, 697, 698, 699, 700, 701, 702,
703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713,
714, 715, 716, 717, 718, 822, 823, 824, 825, 826, 827,
828, 852, 853, 854, 855, 856, 857, 858, 859, 860, 861,
862, 863, 864, 865, 866, 867, 868, 869, 870, 871, 872,
873, 874, 875, 876, 877, 878, 879, 880, 945, 946, 947,
948, 949, 950, 951, 952, 953, 954, 955, 956, 957, 958,
959, 960, 961, 962, 963, 964, 965, 966, 967, 968, 969,
970, 971, 972, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019,
1020, 1021, 1022, 1023, 1024, 1072, 1073, 1074, 1159, 1160, 1161,
1162, 1213, 1214, 1215, 1243, 1244, 1245, 1246, 1247, 1248, 1249,
1250, 1251, 1252, 1297, 1298, 1299, 1300, 1301, 1302, 1303, 1304,
1316])
array([ 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106,
107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117,
118, 119, 120, 121, 122, 123, 124, 125, 133, 134, 135,
136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157,
158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168,
169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179,
180, 181, 182, 183, 193, 267, 268, 269, 270, 271, 272,
273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 345,
346, 347, 348, 349, 355, 356, 357, 358, 359, 360, 361,
362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372,
373, 374, 375, 377, 378, 379, 380, 381, 382, 383, 384,
385, 386, 387, 388, 389, 390, 391, 392, 393, 459, 460,
461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471,
472, 473, 576, 577, 578, 579, 580, 581, 582, 583, 584,
585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 630,
631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641,
642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652,
653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663,
664, 665, 666, 729, 730, 731, 732, 733, 734, 735, 736,
737, 738, 739, 740, 741, 742, 743, 744, 745, 746, 747,
748, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758,
759, 760, 914, 915, 916, 917, 918, 975, 976, 977, 978,
979, 980, 981, 982, 983, 984, 985, 986, 987, 988, 1008,
1009, 1010, 1011, 1037, 1038, 1039, 1040, 1041, 1042, 1043, 1044,
1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052, 1053, 1054, 1055,
1056, 1057, 1058, 1059, 1060, 1061, 1062, 1063, 1064, 1065, 1066,
1067, 1089, 1090, 1091, 1112, 1113, 1114, 1115, 1116, 1117, 1118,
1119, 1120, 1121, 1122, 1123, 1124, 1125, 1126, 1127, 1128, 1129,
1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137, 1138, 1139, 1140,
1141, 1142, 1143, 1144, 1145, 1146, 1147, 1148, 1149, 1150, 1151,
1152, 1153, 1154, 1185, 1186, 1220, 1221, 1222, 1223, 1224, 1225,
1226, 1227, 1228, 1237, 1238, 1239, 1259, 1260, 1261, 1262, 1263,
1264, 1265, 1266]) ]
gene_file = pd.read_pickle(f'{path2input}gene_file.pkl')
genes = gene_file['gene'].to_list()
features_labels_df = pd.read_pickle(f'{path2input}features_labels.pkl')
features_labels_df.head()
| TILs | Stromal | Epithelial | AL627309.5 | LINC01409 | LINC01128 | LINC00115 | FAM41C | NOC2L | KLHL17 | ... | MT-ATP6 | MT-CO3 | MT-ND3 | MT-ND4L | MT-ND4 | MT-ND5 | MT-ND6 | MT-CYB | AC011043.1 | AC007325.4 | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| TCGA-AR-A0TU-DX1_left-89903_top-23884_bottom-25129_right-91148.png | 0.166667 | 0.500000 | 0.000000 | 0.000519 | 0.035213 | 0.043430 | 0.001663 | 0.001138 | 0.235900 | 0.047755 | ... | 1.969919 | 2.151024 | 1.809668 | 0.671306 | 2.065333 | 1.000582 | 0.050490 | 1.826033 | 0.011722 | 0.054106 |
| TCGA-AR-A0TU-DX1_left-89643_top-23896_bottom-25141_right-90888.png | 0.052632 | 0.052632 | 0.315789 | 0.000389 | 0.043471 | 0.062677 | 0.000157 | 0.005236 | 0.308557 | 0.040854 | ... | 1.953880 | 2.165448 | 1.820518 | 0.648900 | 2.110679 | 0.964448 | 0.039847 | 1.850050 | 0.011130 | 0.091851 |
| TCGA-AR-A0TU-DX1_left-88624_top-23113_bottom-24358_right-89869.png | 0.000000 | 0.750000 | 0.000000 | 0.001053 | 0.035831 | 0.072600 | 0.000708 | 0.001890 | 0.291906 | 0.048278 | ... | 2.045151 | 2.286623 | 1.914977 | 0.723103 | 2.138538 | 1.079847 | 0.055628 | 1.879725 | 0.011281 | 0.084963 |
| TCGA-AR-A0TU-DX1_left-90153_top-24126_bottom-25371_right-91398.png | 0.055556 | 0.166667 | 0.555556 | 0.000706 | 0.024441 | 0.063758 | 0.000750 | 0.004932 | 0.229347 | 0.034557 | ... | 1.882058 | 2.137590 | 1.750186 | 0.604933 | 2.015732 | 0.915779 | 0.041312 | 1.730508 | 0.004355 | 0.050627 |
| TCGA-D8-A143-DX1_left-58588_top-19753_bottom-20992_right-59827.png | 0.694444 | 0.000000 | 0.000000 | 0.001382 | 0.042224 | 0.070376 | 0.001412 | 0.011441 | 0.312223 | 0.060430 | ... | 1.907822 | 2.140898 | 1.851192 | 0.711008 | 2.018238 | 0.987548 | 0.039834 | 1.769907 | 0.004523 | 0.097950 |
5 rows × 14071 columns
The variable ik_fold specifies the index of the data fold to be used in the training/testing process.
ik_fold = 0
The command to execute the script 1main.py is dynamically created using the specified fold index,
input path (path2input), and output path (path2output).
command = f"python 2.1.main_cell_type_model.py {ik_fold} {path2input} {path2output}"
command # Display the constructed command
'python 2.1.main_cell_type_model.py 0 /vf/users/Ruppin_AI/st/zenodo/Path2Space/input_data/Cell_type_fraction_model/ /vf/users/Ruppin_AI/st/zenodo/Path2Space/output_data/Cell_type_fraction_model/'
Capture the start time before running the command to measure how long it takes to execute.
start_time = time.time()
The script is executed using subprocess.run(), capturing the output and handling any errors.
script_dir = f'{root_dir}/scripts/2.Cell_type_fraction_model'
try:
result = subprocess.run(command, shell=True,
check=True, capture_output=True,
text=True, cwd=script_dir)
print("\n--- Command Output ---")
print(result.stdout)
except subprocess.CalledProcessError as e:
print("\n--- Error Occurred ---")
print(e.stderr)
--- Command Output --- X_train.shape: (14068, 1146), y_train.shape: (3, 1146) X_test.shape: (14068, 171), y_test.shape: (3, 171)
The script calculates the total runtime by subtracting the start time from the end time.
# Calculate elapsed time
end_time = time.time()
elapsed_time = end_time - start_time
print(f"\nExecution Time: {elapsed_time:.2f} seconds")
Execution Time: 18.89 seconds
Display system information, such as OS, CPU, memory, and GPU details, using the get_system_info() function.
# Print system info
get_system_info()
--- System Information --- Operating System: Linux 4.18.0-425.19.2.el8_7.x86_64 (#1 SMP Tue Apr 4 22:38:11 UTC 2023) Processor: x86_64 CPU Cores: 28 (Physical), 56 (Logical) Total RAM: 251.50 GB GPU: Tesla K80
The following outputs are generated:
files = os.listdir(path2output)
print("\n".join(files))
best_features_fold_0.txt model_fold_0.joblib predictions_test_fold_0.pkl
Selected features (genes)
selected_features = np.loadtxt(f'{path2output}best_features_fold_{ik_fold}.txt', dtype=str)
selected_features[0:10]
array(['PLCB3', 'LAMTOR5', 'ACTR10', 'HTATSF1', 'VIPAS39', 'ZNF77',
'AIMP2', 'PSMB2', 'MAGEE1', 'ALDH7A1'], dtype='<U11')
len(selected_features)
1000
predictions_cross_val_fold = pd.read_pickle(f'{path2output}predictions_test_fold_{ik_fold}.pkl')
predictions_cross_val_fold.head()
| TILs_label | Stromal_label | Epithelial_label | TILs_predicted | Stromal_predicted | Epithelial_predicted | |
|---|---|---|---|---|---|---|
| TCGA-D8-A143-DX1_left-58588_top-19753_bottom-20992_right-59827.png | 0.694444 | 0.000000 | 0.000000 | 0.539663 | 0.252178 | 0.182922 |
| TCGA-D8-A143-DX1_left-58084_top-20002_bottom-21241_right-59322.png | 0.500000 | 0.166667 | 0.000000 | 0.592722 | 0.308322 | 0.052979 |
| TCGA-D8-A143-DX1_left-57057_top-22556_bottom-23795_right-58295.png | 0.088235 | 0.058824 | 0.558824 | 0.161026 | 0.206072 | 0.486312 |
| TCGA-D8-A143-DX1_left-58339_top-20005_bottom-21244_right-59578.png | 0.600000 | 0.000000 | 0.000000 | 0.580570 | 0.208289 | 0.151891 |
| TCGA-D8-A143-DX1_left-57812_top-20007_bottom-21246_right-59050.png | 0.392857 | 0.214286 | 0.000000 | 0.326230 | 0.299659 | 0.277582 |
Columns ending with _label represent the actual labels, while those ending with _predicted indicate the predicted cell type fractions for each spot.
# import the required prediction function from the predict_cell_type module.
script_path = Path(f"{root_dir}/scripts/2.Cell_type_fraction_model")
sys.path.append(str(script_path))
from predict_cell_type import *
Load the Predicted Spatial Transcriptomics (ST) Data from a TCGA Test Slide (Generated in the ST Prediction Tutorial)
tcga_st_pred = pd.read_pickle(f'{root_dir}/output_data/smoothed_preds_tcga.pkl')
tcga_st_pred.head()
| slide_file_name | x | y | AL627309.5 | LINC01409 | LINC01128 | LINC00115 | FAM41C | NOC2L | KLHL17 | ... | MT-ATP6 | MT-CO3 | MT-ND3 | MT-ND4L | MT-ND4 | MT-ND5 | MT-ND6 | MT-CYB | AC011043.1 | AC007325.4 | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| OL-A5S0-01Z-00-DX1_5120_640 | OL-A5S0-01Z-00-DX1 | 0.0 | 7.0 | 0.000000 | 0.079070 | 0.130132 | 0.0 | 0.023046 | 0.401769 | 0.081746 | ... | 1.902388 | 2.186774 | 1.623865 | 0.564500 | 2.086916 | 0.939488 | 0.041352 | 1.800760 | 0.027332 | 0.150518 |
| OL-A5S0-01Z-00-DX1_5760_640 | OL-A5S0-01Z-00-DX1 | 0.0 | 8.0 | 0.000578 | 0.076432 | 0.112029 | 0.0 | 0.014338 | 0.397474 | 0.078107 | ... | 1.893562 | 2.184277 | 1.594706 | 0.558414 | 2.065148 | 0.933467 | 0.034625 | 1.781440 | 0.029887 | 0.143750 |
| OL-A5S0-01Z-00-DX1_6400_640 | OL-A5S0-01Z-00-DX1 | 0.0 | 9.0 | 0.000514 | 0.070372 | 0.105360 | 0.0 | 0.008933 | 0.391541 | 0.082247 | ... | 1.888205 | 2.191742 | 1.582788 | 0.556548 | 2.052988 | 0.930027 | 0.031429 | 1.775921 | 0.029741 | 0.142698 |
| OL-A5S0-01Z-00-DX1_7040_640 | OL-A5S0-01Z-00-DX1 | 0.0 | 10.0 | 0.000514 | 0.062812 | 0.101876 | 0.0 | 0.011261 | 0.381107 | 0.080334 | ... | 1.872242 | 2.171229 | 1.563104 | 0.543288 | 2.026742 | 0.918676 | 0.024383 | 1.758730 | 0.029152 | 0.123052 |
| OL-A5S0-01Z-00-DX1_7680_640 | OL-A5S0-01Z-00-DX1 | 0.0 | 11.0 | 0.000578 | 0.057530 | 0.102105 | 0.0 | 0.009892 | 0.373124 | 0.075897 | ... | 1.855960 | 2.150274 | 1.543203 | 0.540031 | 2.011223 | 0.906584 | 0.019498 | 1.741664 | 0.033048 | 0.124812 |
5 rows × 14071 columns
Using the pre-trained model, we can now predict the cell type fractions by specifying the output path and the number of folds.
tcga_cell_type_pred = predict_cell_type_frac(path2output, tcga_st_pred,
num_folds=1, cell_types=None)
View the predicted cell type fractions.
tcga_cell_type_pred.head()
| TILs | Stromal | Epithelial | |
|---|---|---|---|
| OL-A5S0-01Z-00-DX1_5120_640 | 0.022747 | 0.180029 | 0.774780 |
| OL-A5S0-01Z-00-DX1_5760_640 | 0.058109 | 0.193381 | 0.718094 |
| OL-A5S0-01Z-00-DX1_6400_640 | 0.085723 | 0.209021 | 0.673983 |
| OL-A5S0-01Z-00-DX1_7040_640 | 0.085092 | 0.234254 | 0.649195 |
| OL-A5S0-01Z-00-DX1_7680_640 | 0.091915 | 0.218790 | 0.649225 |
# Print Python version
print(f"Python version: {sys.version}")
Python version: 3.10.8 | packaged by conda-forge | (main, Nov 22 2022, 08:23:14) [GCC 10.4.0]
# Print installed packages and their versions
installed_packages = {pkg.key: pkg.version for pkg in pkg_resources.working_set}
for package, version in installed_packages.items():
print(f"{package}=={version}")
simpleitk==2.3.1 spagcn==1.2.7 absl-py==2.1.0 access==1.1.9 ace-tools==0.0 affine==2.4.0 autograd==1.6.2 autograd-gamma==0.5.0 brokenaxes==0.6.2 click-plugins==1.1.1 cligj==0.7.2 cytospace==1.1.0 datatable==1.1.0 deprecation==2.1.0 einops==0.7.0 esda==2.6.0 fiona==1.10.0 formulaic==1.0.1 geopandas==1.0.1 giddy==2.3.5 gseapy==1.1.3 huggingface-hub==0.20.3 igraph==0.11.6 immutabledict==4.2.0 inequality==1.0.1 interface-meta==1.3.0 lapjv==1.3.14 legacy-api-wrap==1.4 leidenalg==0.10.2 libpysal==4.12.0 lifelines==0.28.0 louvain==0.8.2 mapclassify==2.8.0 matplotlib-venn==0.11.10 mgwr==2.2.1 momepy==0.8.0 openslide-python==1.3.1 ortools==9.3.10497 pip==24.1.2 pointpats==2.5.0 protobuf==3.20.1 pykwalify==1.8.0 pyogrio==0.9.0 pypdf2==3.0.1 pyradiomics==3.0.1 pysal==24.7 python-igraph==0.11.6 quantecon==0.7.2 radiomics==0.1 rasterio==1.3.11 rasterstats==0.19.0 ripleyk==0.0.3 safetensors==0.4.2 scanpy==1.10.1 seaborn==0.13.2 segregation==2.5 session-info==1.0.0 snuggs==1.4.7 spaghetti==1.7.6 spams==2.6.5.4 spglm==1.1.0 spint==1.0.7 splot==1.1.6 spopt==0.6.1 spreg==1.6.1 spvcm==0.3.0 texttable==1.7.0 tobler==0.11.3 tokenizers==0.15.2 transformers==4.38.0 automat==22.10.0 babel==2.12.1 bottleneck==1.3.7 configargparse==1.5.5 cython==0.29.36 dendropy==4.6.1 deprecated==1.2.14 edflib-python==1.0.7 flask==2.3.2 flask-cors==4.0.0 gitpython==3.1.31 htseq==2.0.3 heapdict==1.0.1 jinja2==3.1.2 keras-preprocessing==1.1.2 levenshtein==0.21.1 mako==1.2.4 markdown==3.4.3 markupsafe==2.1.3 pillow==9.2.0 pulp==2.7.0 pyjwt==2.7.0 pynacl==1.5.0 pyopengl==3.1.6 pyqt5==5.15.7 pyqt5-sip==12.11.0 pyqtwebengine==5.15.4 pysocks==1.7.1 pyvcf3==1.0.3 pywavelets==1.4.1 pyyaml==6.0 pygments==2.15.1 qdarkstyle==3.2.3 qtawesome==1.2.3 qtpy==2.4.1 rtree==1.0.1 sqlalchemy==2.0.18 secretstorage==3.3.3 send2trash==1.8.2 theano==1.0.5 unidecode==1.3.6 werkzeug==2.3.6 xlsxwriter==3.1.2 aioeasywebdav==2.4.0 aiohttp==3.8.4 aioredis==2.0.1 aiosignal==1.3.1 alabaster==0.7.13 amply==0.1.6 anndata==0.9.1 anyio==3.7.1 appdirs==1.4.4 argcomplete==3.1.1 argh==0.27.2 argon2-cffi==21.3.0 argon2-cffi-bindings==21.2.0 arrow==1.2.3 arviz==0.15.1 asn1crypto==1.5.1 astor==0.8.1 astroid==2.15.5 astropy==5.3.1 asttokens==2.2.1 astunparse==1.6.3 async-generator==1.10 async-timeout==4.0.2 atomicwrites==1.4.1 attmap==0.13.2 attrs==23.1.0 autopep8==2.0.4 backcall==0.2.0 backports.functools-lru-cache==1.6.5 basemap==1.3.7 basemap-data==1.3.2 bcrypt==3.2.2 beautifulsoup4==4.12.2 bidict==0.22.1 binaryornot==0.4.4 biom-format==2.1.15 biopython==1.81 bitarray==2.7.6 black==23.3.0 bleach==6.0.0 blinker==1.6.2 bokeh==3.2.0 boltons==23.0.0 boto==2.49.0 boto3==1.28.1 botocore==1.31.1 brotlipy==0.7.0 bz2file==0.98 cached-property==1.5.2 cachetools==5.3.1 certifi==2024.6.2 cffi==1.15.1 cftime==1.6.2 chardet==5.1.0 charset-normalizer==3.2.0 click==8.1.4 clikit==0.6.2 cloudpickle==2.2.1 clyent==1.2.2 colorama==0.4.6 colorcet==3.0.1 coloredlogs==15.0.1 colorful==0.5.4 colormath==3.0.0 colorspacious==1.1.2 comm==0.1.3 commonmark==0.9.1 conda==23.3.1 conda-package-handling==2.0.2 conda-package-streaming==0.8.0 configparser==5.3.0 connection-pool==0.0.3 constantly==15.1.0 contextlib2==21.6.0 contourpy==1.1.0 cookiecutter==2.2.0 crashtest==0.4.1 crc32c==2.3.post0 crcmod==1.7 cryptography==39.0.0 cupy==12.1.0 cvxopt==0.0.0 cvxpy==1.3.2 cxxfilt==0.3.0 cycler==0.11.0 cytoolz==0.12.0 darkdetect==0.8.0 dask==2023.7.0 dask-jobqueue==0.8.2 dataclasses==0.8 datashape==0.5.4 datrie==0.8.2 debugpy==1.6.7 decorator==5.1.1 deepdiff==6.3.1 defusedxml==0.7.1 descartes==1.1.0 diff-match-patch==20230430 dill==0.3.6 dipy==1.7.0 distlib==0.3.6 distributed==2023.7.0 dm-tree==0.1.7 dnspython==2.3.0 docopt==0.6.2 docstring-to-markdown==0.12 docutils==0.20.1 dpath==2.1.6 dropbox==11.36.2 ecos==2.0.11 eeglabio==0.0.2.post4 entrypoints==0.4 et-xmlfile==1.1.0 exceptiongroup==1.1.2 executing==1.2.0 fabric==3.1.0 fastcache==1.1.0 fastjsonschema==2.17.1 fastrlock==0.8 feather-format==0.4.1 filechunkio==1.8 filelock==3.12.2 flake8==6.1.0 flatbuffers==23.5.26 flit-core==3.9.0 fonttools==4.40.0 freetype-py==2.3.0 frozenlist==1.3.3 fsspec==2023.6.0 ftputil==5.0.4 func-timeout==4.3.5 future==0.18.3 gast==0.4.0 gemmi==0.6.4 geneimpacts==0.3.7 gevent==22.10.2 gffutils==0.11.1 gitdb==4.0.10 gitdb2==4.0.2 glob2==0.7 globus-sdk==3.23.0 gmpy2==2.1.2 google-api-core==2.11.1 google-api-python-client==2.92.0 google-auth==2.21.0 google-auth-httplib2==0.1.0 google-auth-oauthlib==0.4.6 google-cloud-core==2.3.3 google-cloud-storage==2.10.0 google-crc32c==1.1.2 google-pasta==0.2.0 google-resumable-media==2.5.0 googleapis-common-protos==1.59.1 greenlet==2.0.2 grpcio==1.51.1 gym==0.26.1 gym-notices==0.0.8 h5io==0.1.8 h5netcdf==1.2.0 h5py==3.8.0 hdf5storage==0.1.19 helpdev==0.7.1 hiredis==2.2.3 holoviews==1.16.2 html5lib==1.1 httplib2==0.22.0 httpstan==4.6.1 humanfriendly==10.0 hyperlink==21.0.0 hypothesis==6.80.1 idna==3.4 ihm==0.43 imagecodecs==2022.8.8 imageio==2.31.1 imageio-ffmpeg==0.4.8 imagesize==1.4.1 importlib-metadata==6.8.0 importlib-resources==6.0.0 incremental==22.10.0 inflection==0.5.1 iniconfig==2.0.0 intervaltree==3.1.0 invoke==2.1.3 ipycanvas==0.13.1 ipyevents==2.0.1 ipykernel==6.29.5 ipympl==0.9.3 ipyparallel==8.6.1 ipython==8.14.0 ipython-genutils==0.2.0 ipyvtklink==0.2.3 ipywidgets==7.7.5 isal==1.1.0 isort==5.12.0 itsdangerous==2.1.2 jaraco.classes==3.2.3 jax==0.3.25 jaxlib==0.3.25 jdcal==1.4.1 jedi==0.18.2 jeepney==0.8.0 jellyfish==1.0.0 jinja2-time==0.2.0 jmespath==1.0.1 joblib==1.3.0 json5==0.9.14 jsonpatch==1.32 jsonpickle==2.2.0 jsonpointer==2.0 jsonschema==4.18.0 jsonschema-specifications==2023.6.1 jupyter==1.0.0 jupyter-client==8.3.0 jupyter-console==6.6.3 jupyter-core==5.3.1 jupyter-events==0.6.3 jupyter-server==2.7.0 jupyter-server-terminals==0.4.4 jupyterlab-pygments==0.2.2 jupyterlab-widgets==1.1.4 keras==2.11.0 keyring==24.2.0 kiwisolver==1.4.4 lazy-loader==0.2 lazy-object-proxy==1.9.0 libmambapy==1.2.0 line-profiler==4.0.3 linkify-it-py==2.0.0 llvmlite==0.40.1 lmdb==1.4.1 locket==1.0.0 logmuse==0.2.6 loguru==0.7.0 lxml==4.9.2 lz4==4.3.2 mamba==1.2.0 markdown-it-py==3.0.0 marshmallow==3.19.0 matplotlib==3.7.2 matplotlib-inline==0.1.6 mccabe==0.7.0 mdit-py-plugins==0.4.0 mdurl==0.1.0 meshio==5.3.4 mffpy==0.8.0 mistune==3.0.0 mizani==0.9.2 mne==1.4.2 mne-qt-browser==0.5.1 mock==5.0.2 modelcif==0.9 more-itertools==9.1.0 mpmath==1.3.0 msgpack==1.0.5 multidict==6.0.4 multipledispatch==0.6.0 munkres==1.1.4 mypy-extensions==1.0.0 mysql-connector-python==8.0.31 natsort==8.4.0 nbclassic==1.0.0 nbclient==0.8.0 nbconvert==7.6.0 nbformat==5.9.0 nest-asyncio==1.5.6 netcdf4==1.6.2 networkx==3.1 nibabel==5.1.0 nilearn==0.10.1 nltk==3.8.1 nose==1.3.7 notebook==6.5.4 notebook-shim==0.2.3 npx==0.1.1 numba==0.57.1 numexpr==2.7.3 numpy==1.24.4 numpydoc==1.5.0 oauth2client==4.1.3 oauthlib==3.2.2 odo==0.5.1 olefile==0.46 opencensus==0.11.2 opencensus-context==0.1.3 opencv-python==4.6.0 openpyxl==3.1.2 opt-einsum==3.3.0 ordered-set==4.1.0 orjson==3.9.2 osqp==0.6.3 overrides==7.3.1 packaging==23.1 palettable==3.3.3 pandas==2.0.3 pandocfilters==1.5.0 panel==1.2.0 param==1.13.0 paramiko==3.2.0 parasail==1.3.4 parso==0.8.3 partd==1.4.0 pastel==0.2.1 path==16.7.1 pathlib2==2.3.7.post1 pathspec==0.11.1 pathtools==0.1.2 patsy==0.5.3 pbr==5.11.1 pep8==1.7.1 peppy==0.35.6 pexpect==4.8.0 pickleshare==0.7.5 pkgutil-resolve-name==1.3.10 plac==1.3.5 platformdirs==3.8.1 plotly==5.15.0 plotnine==0.12.1 pluggy==1.2.0 plumbum==1.8.2 ply==3.11 pooch==1.7.0 poyo==0.5.0 prettytable==3.7.0 prometheus-client==0.17.0 prompt-toolkit==3.0.39 psutil==5.9.5 ptyprocess==0.7.0 pure-eval==0.2.2 pyopenssl==23.2.0 pyarrow==10.0.1 pyasn1==0.4.8 pyasn1-modules==0.2.7 pycairo==1.24.0 pycodestyle==2.11.1 pycosat==0.6.4 pycparser==2.21 pycrypto==2.6.1 pyct==0.4.6 pycurl==7.45.1 pydocstyle==6.3.0 pydot==1.4.2 pyerfa==2.0.0.3 pyfaidx==0.7.2.1 pyfasta==0.5.2 pyflakes==3.1.0 pyglet==1.5.27 pygpu==0.7.6 pygraphviz==1.10 pyhamcrest==2.0.4 pylev==1.4.0 pylint==2.17.4 pylint-venv==3.0.2 pyls-spyder==0.4.0 pymatreader==0.0.32 pymongo==4.4.0 pynndescent==0.5.10 pyodbc==4.0.39 pyopencl==2023.1.1 pyparsing==3.0.9 pyproj==3.4.1 pyqtgraph==0.13.3 pyrsistent==0.19.3 pysam==0.21.0 pysftp==0.2.9 pyshp==2.3.1 pysimdjson==5.0.2 pysmi==0.3.4 pytest==7.4.0 pytest-arraydiff==0.5.0 pytest-doctestplus==0.13.0 pytest-openfiles==0.5.0 pytest-remotedata==0.4.0 pytest-runner==6.0.0 python-levenshtein==0.21.1 python-dateutil==2.8.2 python-hostlist==1.21 python-irodsclient==1.1.8 python-json-logger==2.0.7 python-lsp-black==1.3.0 python-lsp-jsonrpc==1.1.2 python-lsp-server==1.9.0 python-picard==0.7 python-slugify==8.0.1 pytoolconfig==1.2.5 pytools==2023.1 pytz==2023.3 pytz-deprecation-shim==0.1.0.post0 pyu2f==0.1.5 pyvista==0.40.0 pyvistaqt==0.0.0 pyviz-comms==2.3.2 pyxdg==0.28 pyzmq==25.1.0 qdldl==0.1.5.post2 qstylizer==0.2.2 qtconsole==5.5.2 rapidfuzz==2.15.1 ray==2.2.0 redis==4.5.5 referencing==0.29.1 regex==2023.6.3 reportlab==4.0.4 requests==2.31.0 requests-oauthlib==1.3.1 reretry==0.11.8 retrying==1.3.3 rfc3339-validator==0.1.4 rfc3986-validator==0.1.1 rich==13.4.2 rlpycairo==0.2.0 rope==1.9.0 rpds-py==0.8.8 rpy2==3.5.13 rsa==4.9 ruamel.yaml==0.17.32 ruamel.yaml.clib==0.2.7 s3transfer==0.6.1 scikit-image==0.21.0 scikit-learn==1.3.0 scipy==1.11.1 scooby==0.7.2 scs==3.2.3 service-identity==18.1.0 setuptools==68.0.0 setuptools-scm==7.1.0 sh==2.0.4 shapely==2.0.1 simplegeneric==0.8.1 simplejson==3.19.1 sinfo==0.3.1 singledispatch==0.0.0 sip==6.7.9 six==1.16.0 slacker==0.14.0 smart-open==6.3.0 smmap==3.0.5 snakemake==7.30.1 sniffio==1.3.0 snowballstemmer==2.2.0 sortedcollections==2.1.0 sortedcontainers==2.4.0 soupsieve==2.3.2.post1 sphinx==7.0.1 sphinxcontrib-applehelp==1.0.4 sphinxcontrib-devhelp==1.0.2 sphinxcontrib-htmlhelp==2.0.1 sphinxcontrib-jsmath==1.0.1 sphinxcontrib-qthelp==1.0.3 sphinxcontrib-serializinghtml==1.1.5 spyder==5.5.0 spyder-kernels==2.5.2 stack-data==0.6.2 statsmodels==0.14.0 stdlib-list==0.8.0 stone==3.3.1 stopit==1.1.2 svgutils==0.3.4 sympy==1.12 tables==3.7.0 tabulate==0.9.0 tblib==1.7.0 tenacity==8.2.2 tensorboard==2.11.2 tensorboardx==2.5 tensorboard-data-server==0.6.1 tensorboard-plugin-wit==1.8.1 tensorflow==2.11.0 tensorflow-estimator==2.11.0 tensorflow-probability==0.19.0 termcolor==2.3.0 terminado==0.17.1 terminaltables==3.1.10 testpath==0.6.0 text-unidecode==1.3 textdistance==4.5.0 threadpoolctl==3.1.0 three-merge==0.1.1 throttler==1.2.1 tifffile==2022.10.10 tinycss2==1.2.1 toml==0.10.2 tomli==2.0.1 tomlkit==0.11.8 toolz==0.12.0 toposort==1.10 torch==1.12.1.post201 torchvision==0.13.0a0+8069656 tornado==6.3.2 tqdm==4.65.0 traitlets==5.9.0 twobitreader==3.1.7 typing-extensions==4.7.1 typing-utils==0.1.0 tzdata==2023.3 tzlocal==5.0.1 ubiquerg==0.6.2 uc-micro-py==1.0.1 ujson==5.7.0 umap-learn==0.5.3 unicodecsv==0.14.1 unicodedata2==15.0.0 uritemplate==4.1.1 urllib3==1.26.15 veracitools==0.1.3 virtualenv==20.23.1 vtk==9.2.5 watchdog==3.0.0 wcwidth==0.2.6 webargs==8.2.0 webencodings==0.5.1 websocket-client==1.6.1 whatthepatch==1.0.5 wheel==0.40.0 whichcraft==0.6.1 widgetsnbextension==3.6.4 wrapt==1.15.0 wslink==1.11.1 wurlitzer==3.0.3 xarray==2023.6.0 xarray-einstats==0.5.1 xgboost==1.7.4 xlrd==2.0.1 xlwt==1.3.0 xmlrunner==1.7.7 xmltodict==0.13.0 xopen==1.7.0 xyzservices==2023.5.0 yapf==0.33.0 yarl==1.9.2 yte==1.5.1 zict==3.0.0 zipp==3.15.0 zope.event==5.0 zope.interface==6.0 zstandard==0.19.0