@@ -494,7 +494,7 @@ def format(
494
494
values = 'transcriptomics' ,
495
495
index = 'entrez_id' ,
496
496
columns = 'improve_sample_id'
497
- )
497
+ ). transpose ()
498
498
499
499
elif data_type == "mutations" :
500
500
if data .mutations is None :
@@ -516,7 +516,7 @@ def format(
516
516
columns = 'improve_sample_id' ,
517
517
values = 'exists' ,
518
518
fill_value = 0 ,
519
- )
519
+ ). transpose ()
520
520
521
521
elif data_type == "copy_number" :
522
522
if data .copy_number is None :
@@ -531,7 +531,7 @@ def format(
531
531
columns = 'improve_sample_id' ,
532
532
values = 'copy_number' ,
533
533
aggfunc = 'mean' ,
534
- )
534
+ ). transpose ()
535
535
if copy_call :
536
536
ret = ret .apply (
537
537
pd .cut ,
@@ -552,7 +552,7 @@ def format(
552
552
values = 'proteomics' ,
553
553
index = 'entrez_id' ,
554
554
columns = 'improve_sample_id'
555
- )
555
+ ). transpose ()
556
556
557
557
elif data_type == "experiments" :
558
558
if data .experiments is None :
@@ -936,13 +936,16 @@ def train_test_validate(
936
936
sss_1 .split (X = df_full , y = df_full ['split_class' ])
937
937
)
938
938
df_train = df_full .iloc [idx_train ]
939
+ df_train = df_train .drop (labels = ['split_class' ], axis = 1 )
939
940
df_other = df_full .iloc [idx_other ]
940
941
# Splitting 'other' further into test and validate
941
942
idx_test , idx_val = next (
942
943
sss_2 .split (X = df_other , y = df_other ['split_class' ])
943
944
)
944
945
df_test = df_other .iloc [idx_test ]
946
+ df_test = df_test .drop (labels = ['split_class' ], axis = 1 )
945
947
df_val = df_other .iloc [idx_val ]
948
+ df_val = df_val .drop (labels = ['split_class' ], axis = 1 )
946
949
947
950
# using StratifiedGroupKSplit for the stratified drug-/sample-
948
951
# blind splits.
0 commit comments