Text Editors Doesn´T Display Fasta Or Stockholm Format Correctly
0
2
Entering edit mode
10.2 years ago
loicatraile ▴ 50

Hi, I´m trying to display correctly a fasta file but my text editors give some special formatting to it and there are some strange line breaks in the text. I have tried Textedit, Brackets, Sublime Text 2 and TextMate.

Does anybody knows of a text editor that can display the formats correctly or how to change the settings of this editors to display correctly this formats?

Thanks for the Help!

text fasta • 2.7k views
ADD COMMENT
3
Entering edit mode

There is a lot of information on StckOverflow and wikipedia on this line-break problem - basically each OS has its own opinion. What is your platform?

from wikipedia:

$ awk '{sub("$","\r\n"); printf("%s",$0);}' inputfile > outputfile  # UNIX to DOS  (adding CRs on Linux and BSD based OS that haven't GNU extensions)
$ awk '{gsub("\r",""); print;}' inputfile > outputfile              # DOS to UNIX  (removing CRs on Linux and BSD based OS that haven't GNU extensions)
$ sed -e 's/$/\r/' inputfile > outputfile              # UNIX to DOS  (adding CRs on Linux based OS that use GNU extensions)
$ sed -e 's/\r$//' inputfile > outputfile              # DOS  to UNIX (removing CRs on Linux based OS that use GNU extensions)
$ cat inputfile | tr -d "\r" > outputfile              # DOS  to UNIX (removing CRs using tr(1). Not Unicode compliant.)
$ perl -pe 's/\r?\n|\r/\r\n/g' inputfile > outputfile  # Convert to DOS
$ perl -pe 's/\r?\n|\r/\n/g'   inputfile > outputfile  # Convert to UNIX
$ perl -pe 's/\r?\n|\r/\r/g'   inputfile > outputfile  # Convert to old Mac
ADD REPLY
1
Entering edit mode

You should be able to find an option to set file type somewhere in the preferences of most editors. notepad++ is a pretty good cross platform option. or like Pavel said convert the file to your native type

ADD REPLY

Login before adding your answer.

Traffic: 2372 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6