UNIX line endings for plain text files

Sometimes you may need to export data out of MacVector for further analysis with a command line tool or sending a file to a colleague who does not have MacVector). For example exporting the VCF report out of a reference assembly or exporting a sequence into Genbank format.

If these files are plain text, then you need to be careful about the format of the text. Mainly the control characters used to indicate the end of a line (EOL) have varied between different operating systems.

Historically Macs (pre OS X) used CR, DOS/Windows/PC used CR and LF and UNIX computers used LF.

Nowadays OS X uses UNIX line endings, it is UNIX underneath after all!

These different characters show their printer heritage when you look at what they actually mean:

CR = Carriage Return
LF = Line Feed.

MacVector has a setting to control what format is used. By default this will be LF (i.e. UNIX) and that version is most suitable for command line analysis on other OS X or UNIX machines.


However, many versions ago the default was CR (i.e. OS 9). This means that if you have been using MacVector for many years then it’s possible that this setting has stuck (MacVector does try to preserve your user settings between versions).

You can easily change it using the dialogue above. Alternatively you can reset (and refresh) your settings with this tool.

…and tell your colleagues without MacVector, that MacVector Free allows you to open, view and print sequences from MacVector files. It has a surprising amount of functionality!

This entry was posted in Support, Tips and tagged . Bookmark the permalink. Both comments and trackbacks are currently closed.