|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
How to change sequence name in along fasta file?
Hi
I have an alignment file (.fasta) with ~80 sequences. They look like this- >JV101.contig00066(+):25302-42404|sequence_index=0|block_index=4|species=JV101|JV101_4_0 GAGGTTAATTATCGATAACGTTTAATTAAAGTGTTTAGGTGTCATAATTT TAAATGACGATTTCTCATTACCATACACCTAAATTATCATCAATCTGAAT TCAGATGTTTATTATAAAAATTAGATGAAAAATATGTTAATATACAAGTA >JV501.contig00066(+):24356-42404|sequence_index=0|block_index=4|species=JV501|JV501_4_0 AATGACGATTTAGATGAAAAATAT... The name of the sequences are too big and I want to just keep JV101, JV501 and delete rest of the words after the dot. I am new to unix, please suggest an easy unix command to do this. Thanks Baika |
| Sponsored Links | ||
|
|
#2
|
||||
|
||||
|
Try: Code:
perl -pe 's/^>[^.]+\K.*//' file |
| Sponsored Links | ||
|
|
#3
|
|||
|
|||
|
Thanks
Thank you very much for such a prompt reply. It is working
! |
| Sponsored Links | ||
|
![]() |
| Tags |
| fasta, unix commands |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Parsing a fasta sequence with start and end coordinates | empyrean | Shell Programming and Scripting | 8 | 04-15-2011 02:23 AM |
| How to change strt-up sequence of services on SLES10/11 | senrooy | Shell Programming and Scripting | 3 | 03-03-2010 03:02 AM |
| How to change strt-up sequence of services on SLES10/11 | senrooy | Shell Programming and Scripting | 4 | 03-02-2010 03:38 AM |
| change the shutdown sequence in red hat linux | chuikingman | Red Hat | 5 | 01-30-2010 03:13 PM |
| how to change the boot sequence? | wrapster | Solaris | 5 | 02-17-2008 03:10 AM |
|
|