@@ -494,7 +494,7 @@ def format(
494494 values = 'transcriptomics' ,
495495 index = 'entrez_id' ,
496496 columns = 'improve_sample_id'
497- )
497+ ). transpose ()
498498
499499 elif data_type == "mutations" :
500500 if data .mutations is None :
@@ -516,7 +516,7 @@ def format(
516516 columns = 'improve_sample_id' ,
517517 values = 'exists' ,
518518 fill_value = 0 ,
519- )
519+ ). transpose ()
520520
521521 elif data_type == "copy_number" :
522522 if data .copy_number is None :
@@ -531,7 +531,7 @@ def format(
531531 columns = 'improve_sample_id' ,
532532 values = 'copy_number' ,
533533 aggfunc = 'mean' ,
534- )
534+ ). transpose ()
535535 if copy_call :
536536 ret = ret .apply (
537537 pd .cut ,
@@ -552,7 +552,7 @@ def format(
552552 values = 'proteomics' ,
553553 index = 'entrez_id' ,
554554 columns = 'improve_sample_id'
555- )
555+ ). transpose ()
556556
557557 elif data_type == "experiments" :
558558 if data .experiments is None :
@@ -936,13 +936,16 @@ def train_test_validate(
936936 sss_1 .split (X = df_full , y = df_full ['split_class' ])
937937 )
938938 df_train = df_full .iloc [idx_train ]
939+ df_train = df_train .drop (labels = ['split_class' ], axis = 1 )
939940 df_other = df_full .iloc [idx_other ]
940941 # Splitting 'other' further into test and validate
941942 idx_test , idx_val = next (
942943 sss_2 .split (X = df_other , y = df_other ['split_class' ])
943944 )
944945 df_test = df_other .iloc [idx_test ]
946+ df_test = df_test .drop (labels = ['split_class' ], axis = 1 )
945947 df_val = df_other .iloc [idx_val ]
948+ df_val = df_val .drop (labels = ['split_class' ], axis = 1 )
946949
947950 # using StratifiedGroupKSplit for the stratified drug-/sample-
948951 # blind splits.
0 commit comments