Skip to content

Commit 2107ff6

Browse files
committed
changed orientation of wide format tables returned for omic types 'transcriptomics', 'mutations' & 'copy_number' such that rows are improve_sample_id and columns are 'entrez_id'
1 parent c3c15c7 commit 2107ff6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

coderdata/dataset/dataset.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -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:

0 commit comments

Comments
 (0)