Skip to content

Bug .GCT written by cmapPy on Windows have inconsistent line endings #77

@KarlClauser

Description

@KarlClauser

Hi Lev,

#Bug .GCT files written with cmapPy on Windows, show alternating blank lines after the top 3 lines when opened in Excel, though fine in code editor Spyder v5.12.3

Fix: The line below writes the 1st 2 lines of a .GCT file and would otherwise default to OS line_terminator of \r\n which conflicts with all other lines terminated by \n

Inconsistent line endings probably tricks Excels auto line ending recognition

C:\ProgramData\Anaconda3\Lib\site-packages\cmapPy\pandasGEXpress\write_gct.py #line 102

Write top_half_df to file

#top_half_df.to_csv(f, header=False, index=False, sep="\t")
top_half_df.to_csv(f, header=False, index=False, sep="\t", line_terminator='\n')

Please incorporate into next version. Screenshots attached.

Thanks,

--Karl
cmapPybug_inconsistentLineEndings.docx

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions