Skip to content

Commit a397281

Browse files
committed
added handling of copy_number
1 parent 101ad74 commit a397281

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

coderdata/dataset/dataset.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,20 @@ def format(
443443
)
444444

445445
elif data_type == "copy_number":
446-
pass
446+
if data.copy_number is None:
447+
raise ValueError(
448+
f"'{data_type}' attribute of Dataset cannot be 'None'"
449+
)
450+
451+
# TODO: add way to extract copy_call
452+
ret = pd.pivot_table(
453+
data=data.copy_number,
454+
index='entrez_id',
455+
columns='improve_sample_id',
456+
values='copy_number',
457+
aggfunc='mean',
458+
)
459+
447460
elif data_type == "proteomics":
448461
if data.proteomics is None:
449462
raise ValueError(

0 commit comments

Comments
 (0)