Hi, I would like to place "\n" after every sequence in a FASTA file. My FASTA file looks like this:
>pdb|5U15|L Chain L, Crystal Structure Of Dh270.uca3 (unliganded) From The Dh270 Broadly Neutralizing N332-glycan Dependent Lineage
QSALTQPASVSGSPGQSITISCTGTSSDVGSYNLVSWYQQHPGKAPKLMIYEVSKRPSGVSNRFSGSKSG
NTASLTISGLQAEDEADYYCCSYAGSSTVIFGGGTKLTVLGQPKGAPSVTLFPPSSEELQANKATLVCLI
SDFYPGAVTVAWKADSSPVKAGVETTTPSKQSNNKYAASSYLSLTPEQWKSHRSYSCQVTHEGSTVEKTV
APTECS
>pdb|5U15|H Chain H, Crystal Structure Of Dh270.uca3 (unliganded) From The Dh270 Broadly Neutralizing N332-glycan Dependent Lineage
QVQLVQSGAEVKKPGASVKVSCKASGYTFTGYYMHWVRQAPGQGLEWMGWINPNSGGTNYAQKFQGRVTM
TRDTSISTAYMELSRLRSDDTAVYYCARGGWISLYYDSSGYPNFDYWGQGTLVTVSGASTKGPSVFPLAP
SSKSTSGGTAALGCLVKDYFPEPVTVSWNSGALTSGVHTFPAVLQSSGLYSLSSVVTVPSSSLGTQTYIC
NVNHKPSNTKVDKRVEPKSCDKHHHHHH
I would like to modify the file as:
>pdb|5U15|L Chain L, Crystal Structure Of Dh270.uca3 (unliganded) From The Dh270 Broadly Neutralizing N332-glycan Dependent Lineage
QSALTQPASVSGSPGQSITISCTGTSSDVGSYNLVSWYQQHPGKAPKLMIYEVSKRPSGVSNRFSGSKSG
NTASLTISGLQAEDEADYYCCSYAGSSTVIFGGGTKLTVLGQPKGAPSVTLFPPSSEELQANKATLVCLI
SDFYPGAVTVAWKADSSPVKAGVETTTPSKQSNNKYAASSYLSLTPEQWKSHRSYSCQVTHEGSTVEKTV
APTECS
>pdb|5U15|H Chain H, Crystal Structure Of Dh270.uca3 (unliganded) From The Dh270 Broadly Neutralizing N332-glycan Dependent Lineage
QVQLVQSGAEVKKPGASVKVSCKASGYTFTGYYMHWVRQAPGQGLEWMGWINPNSGGTNYAQKFQGRVTM
TRDTSISTAYMELSRLRSDDTAVYYCARGGWISLYYDSSGYPNFDYWGQGTLVTVSGASTKGPSVFPLAP
SSKSTSGGTAALGCLVKDYFPEPVTVSWNSGALTSGVHTFPAVLQSSGLYSLSSVVTVPSSSLGTQTYIC
NVNHKPSNTKVDKRVEPKSCDKHHHHHH
I have encountered a post regarding linearizing the fasta file but couldnt figure it out.
Title of this post does not appear to match the request in the main body of the post. If you just want to add a gi_ before pdb you could use
sed 's/^>pdb/\>gi\_pdb/g' your_file > new_file
.I have just edited the post. "gi" was added mistakingly.