How to replace underscore between digits and character or at second place (_) in protein seq header & discriptions
1
0
Entering edit mode
2.4 years ago
Neel ▴ 20
Hi, I want to remove(_) sign between the accession number and their description name  like this -> ALKAOGAL_00001  Chromosomal_replication_initiator_protein_DnaA in all protein seq.
Is there any script for this please share with me.

    >ALKAOGAL_00001_Chromosomal_replication_initiator_protein_DnaA
    MEEPSIDPLAAAMPAGAAPAVRTERNVQVEGALKHTSYLNRTFTFENFVEGKSNQLARAA
    AWQVADNLKHGYNPLFLYGGVGLGKTHLMHAVGNHLLKKNPNAKVVYLHSERFVADMVKA
    LQLNAINEFKRFYRSVDALLIDDIQFFARKERSQEEFFHTFNALLEGGQQVILTSDRYPK
    EIEGLEERLKSRFGWGLTVAVEPPELETRVAILMKKAEQAKIELPHDAAFFIAQRIRSNV
    RELEGALKRVIAHSHFMGRPITIELIRESLKDLLALQDKLVSIDNIQRTVAEYYKIKISD
    LLSKRRSRSVARPRQVAMALSKELTNHSLPEIGVAFGGRDHTTVLHACRKIAQLRESDAD
    IREDYKNLLRTLTT
    >ALKAOGAL_00002_Beta_sliding_clamp
    MHFTIQREALLKPLQLVAGVVERRQTLPVLSNVLLVVEGQQLSLTGTDLEVELVGRVVLE
    DAAEPGEITVPARKLMDICKSLPNDVLIDIRVEEQKLLVKAGRSRFTLSTLPANDFPTVE
    EGPGSLNFSIAQSKLRRLIDRTSFAMAQQDVRYYLNGMLLEVNGGTLRSVATDGHRLAMC
    SLDAQIPSQDRHQVIVPRKGILELARLLTEQDGEVGIVLGQHHIRATTGEFTFTSKLVDG
    KFPDYERVLPRGGDKLVVGDRQQLREAFSRTAILSNEKYRGIRLQLSNGLLKIQANNPEQ
    EEAEEEVQVEYNGGNLEIGFNVSYLLDVLGVIGTEQVRFILSDSNSSALVHEADNDDSAY
    VVMPMRL

Thank you!
Blast • 1.1k views
ADD COMMENT
0
Entering edit mode
$ sed '/^>/ s/_/ /2g' test.fa
ADD REPLY
0
Entering edit mode

Thank you so much

ADD REPLY
0
Entering edit mode
2.4 years ago
Jeremy ▴ 930

You should be able to use the following:

sed 's/_/ /2'

Note the space between the last two slashes.

ADD COMMENT
1
Entering edit mode

Thank you! Now it work.

ADD REPLY

Login before adding your answer.

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