Mercurial > repos > bimib > cobraxy
comparison COBRAxy/marea_cluster.py @ 444:06564187fba3 draft
Uploaded
author | francesco_lapi |
---|---|
date | Thu, 11 Sep 2025 09:03:10 +0000 |
parents | 8cd0c70b0084 |
children |
comparison
equal
deleted
inserted
replaced
443:3d4e10546917 | 444:06564187fba3 |
---|---|
505 global args | 505 global args |
506 args = process_args(args_in) | 506 args = process_args(args_in) |
507 | 507 |
508 if not os.path.exists(args.output_path): | 508 if not os.path.exists(args.output_path): |
509 os.makedirs(args.output_path) | 509 os.makedirs(args.output_path) |
510 | 510 |
511 #Data read | 511 #Data read |
512 | 512 |
513 X = read_dataset(args.input) | 513 X = read_dataset(args.input) |
514 X = X.iloc[:, 1:] | 514 X = X.iloc[:, 1:] |
515 X = pd.DataFrame.to_dict(X, orient='list') | 515 X = pd.DataFrame.to_dict(X, orient='list') |
518 | 518 |
519 for i in X.columns: | 519 for i in X.columns: |
520 if any(val is None or np.isnan(val) for val in X[i]): | 520 if any(val is None or np.isnan(val) for val in X[i]): |
521 X = X.drop(columns=[i]) | 521 X = X.drop(columns=[i]) |
522 | 522 |
523 if args.scaling == True: | 523 if args.scaling == "true": |
524 list_to_remove = [] | 524 list_to_remove = [] |
525 toll_std=1e-8 | 525 toll_std=1e-8 |
526 for i in X.columns: | 526 for i in X.columns: |
527 mean_i = X[i].mean() | 527 mean_i = X[i].mean() |
528 std_i = X[i].std() | 528 std_i = X[i].std() |