Removing a DOT after each sequence
1
0
Entering edit mode
11 months ago
Ric ▴ 360

Hi, I have a FASTA file which contains a . after each sequence. How is it possilble to remove the dot?

>gene39576 gene=rps16
MVKLRLKRCGRKQRAVYRIVAIDVRSRREGKDLRKVGFYDPIKNQTYLNVPAILYFLEKG
AQPTGTVQDILKKAEVFKELRPNQS.
>gene39578 gene=psbK
MLNTFSLIGICLNSTLFSSSFFFGKLPEAYAFLNPIVDIMPVIPLFFFLLAFVWQAAVSF
R.
>gene39579 gene=psbI
MLTLKLFVYTVVIFFVSLFIFGFLSNDPGRNPGREE.
>gene39580 gene=NitoCp007
MIPDVILDVKNKIKRGFPCLIFKFSYDLVYSTHLTKNKNKGFRNLKKKNQVINGKRGIRT
LGTINSYNGLAIRRFSPLSHLSQLKKIITT.
>gene39584 gene=atpA
MVTIRADEISNIIRERIEQYNREVKVVNTGTVLQVGDGIARIHGLDEVMAGELVEFEEGT
IGIALNLESNNVGVVLMGDGLLIQEGSSVKATGRIAQIPVSEAYLGRVINALAKPIDGRG
EISASEFRLIESAAPGIISRRSVYEPLQTGLIAIDSMIPIGRGQRELIIGDRQTGKTAVA
TDTILNQQGQNVICVYVAIGQKASSVAQVVTTLQERGAMEYTIVVAETADSPATLQYLAP
YTGAALAEYFMYRERHTLIIYDDPSKQAQAYRQMSLLLRRPPGREAYPGDVFYLHSRLLE
RAAKLSSSLGEGSMTALPIVETQSGDVSAYIPTNVISITDGQIFLSADLFNSGIRPAINV
GISVSRVGSAAQIKAMKQVAGKLKLELAQFAELEAFAQFASDLDKATQNQLARGQRLREL
LKQSQSAPLTVEEQIMTIYTGTNGYLDSLEVGQVRKFLVELRTYLKTNKPQFQEIISSTK
TFTEEAEALLKEAIQEQTDRFILQEQA.

Thank you in advance,

sequence bioawk • 373 views
ADD COMMENT
1
Entering edit mode

try seqkit replace -sp "\." -r "" test.fa and grep -v "\." test.fa on OP fasta sequences.

ADD REPLY
2
Entering edit mode
11 months ago

sed :

 sed '/^[^>]/s/\.$//'
ADD COMMENT
0
Entering edit mode

It turns out a DOT is also available in the middle of each sequence. How it be possible to extend the sed command?

ADD REPLY
0
Entering edit mode

Did you try sed '/^[^>]/s/\.//' ? @ Ric

ADD REPLY

Login before adding your answer.

Traffic: 2749 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