Warning for mac users editing circos data in Excel

79 views
Skip to first unread message

Adam Taranto

unread,
Mar 4, 2013, 8:56:48 AM3/4/13
to circos-data-...@googlegroups.com
Hi All,

Thought I'd share a trick that would've saved me an immense amount of frustration a week ago.

Circos does not recognise mac end of line (EOL) characters in track data files. I had been generating tab delimited data in a unix program and reformatting in microsoft excel for mac, saving as csv, then using the find-replace function of notepad to substitute spaces for commas. The final product should have worked perfectly in circos. Instead I found that only the first line of data would be read into my graph or an error generated.

I found that manually deleting and re-adding each line break made my data visible again to circos.

A far more efficient solution for anyone running into this issue is to use the conversion tool dos2unix to replace the mac EOLs with unix ones.

You can install dos2unix using the homebrew package installer - http://mxcl.github.com/homebrew/

--> brew install dos2unix

--> dos2unix -c mac -o <mydatafile.txt>

Hopefully this will help somebody out!

Adam

Paulo Nuin

unread,
Mar 4, 2013, 12:35:57 PM3/4/13
to circos-data-...@googlegroups.com
Another way would be to use TextWrangler (free) to do this kind of change. Opening the file with Windows style linefeeds, you can just select the Unix type (LF) on the bar at the bottom, just next to the enconding of the file. Saving it, will save the new line feed format.

Cheers
Paulo

--
You received this message because you are subscribed to the Google Groups "Circos" group.
To unsubscribe from this group and stop receiving emails from it, send an email to circos-data-visual...@googlegroups.com.
To post to this group, send email to circos-data-...@googlegroups.com.
Visit this group at http://groups.google.com/group/circos-data-visualization?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Yuan Chuan

unread,
Mar 4, 2013, 7:51:00 PM3/4/13
to circos-data-...@googlegroups.com
In case u are wondering why it is so, Excel for Mac uses "\r" as newline instead of "\n" which circos interprets as newline. 
Reply all
Reply to author
Forward
0 new messages