Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

write_gct does not handle metadata names correctly #82

Closed
shntnu opened this issue May 30, 2020 · 2 comments
Closed

write_gct does not handle metadata names correctly #82

shntnu opened this issue May 30, 2020 · 2 comments

Comments

@shntnu
Copy link
Member

shntnu commented May 30, 2020

This is the input CSV. Note the name of the column Metadata_dose_recode

cat /tmp/a.csv
Metadata_Plate_Map_Name,Metadata_broad_sample,Metadata_pert_well,Metadata_mmoles_per_liter,Metadata_dose_recode,Cells_AreaShape_Area
C-7161-01-LM6-001,BRD-A25234499-001-18-3,B13,   10,6,0.590843
C-7161-01-LM6-001,BRD-A25234499-001-18-3,B14,3.3333,5,0.953997
C-7161-01-LM6-001,BRD-A25234499-001-18-3,B15,1.1111,4,1.10022
C-7161-01-LM6-001,BRD-A25234499-001-18-3,B16,0.37037,3,0.616491

Convert

import pandas
import pycytominer
pandas.read_csv("/tmp/a.csv")
pycytominer.write_gct(a, "/tmp/a.gct")

This is the output GCT. Note the name of the column Metadata_ose_recode

$ cat /tmp/a.gct
#1.3
1   4   1   5
id  cp_feature_name SAMPLE_0    SAMPLE_1    SAMPLE_2    SAMPLE_3
Plate_Map_Name  nan C-7161-01-LM6-001   C-7161-01-LM6-001   C-7161-01-LM6-001   C-7161-01-LM6-001
broad_sample    nan BRD-A25234499-001-18-3  BRD-A25234499-001-18-3  BRD-A25234499-001-18-3  BRD-A25234499-001-18-3
pert_well   nan B13 B14 B15 B16
mmoles_per_liter    nan 10.0    3.3333  1.1111  0.37037
ose_recode  nan 6   5   4   3
Cells_AreaShape_Area    Cells_AreaShape_Area    0.590843    0.953997    1.10022 0.616491
@shntnu shntnu changed the title write_gct does not handle metadata names correctly write_gct does not handle metadata names correctly May 30, 2020
@gwaybio
Copy link
Member

gwaybio commented May 30, 2020

see #70 - it seems now is the time to make this fix!

@gwaybio
Copy link
Member

gwaybio commented Jul 26, 2020

fixed in #87

@gwaybio gwaybio closed this as completed Jul 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants