My output: Extract all the data after seq_3:
>seq_8
RTTGLSERPRLPTTASRSISSRWTR
>seq_10
NELPLEKGSLDSISIE
>seq_9
PNQGDAREPQAHLPRRQGPRDRPLQAYA+
QVQHRRHDHSRTQHLCRRRQREDCDRLHR
>seq_4
DRGKGQAGCRRPQEGEALVRRCS>seq_6
FA*GLAAQDGEASGRG
Does anybody got the idea to get my desired output?
It seems like awk and sed able to do it.
But I not very sure how to solve it out.
Thanks a lot for all of your advice
Hi,
I just found out that the code that you suggested also will print out the content of seq_81,seq_800,etc
Do you have any idea just only specific and only print out the content that matched with seq_8?
Thanks a lot ^^
easily you can put ur string inside this "\<\>" and you will get the exact pattern you want.
sed -n '/\<seq_8\>/,$ {
p
} ' file.txt > out_file
above you will get seq_8 only if you want seq_80 do this:
sed -n '/\<seq_80\>/,$ {
p
} ' file.txt > out_file
and so on.
hi,
I just try both of the code that you suggested, it print out all the content of the file
I not sure what is the wrong that I had did
Do you know what is the reason?
Thanks again, ahmad
Thanks a lot, ahmad and sorry for disturbing you
You're right. All of your command or code work perfectly for my test sequence.
I just found out that I did a careless mistakes when run the code that you suggested
Really thanks a lot for your help.
My problem is solved finally ^^
---------- Post updated at 08:23 PM ---------- Previous update was at 08:21 PM ----------
Hi Scrutinizer,
Thanks a lot for your suggestion code ^^
Both of your code and ahmad suggested's code work perfectly for my test sequence.
Sorry that my careless mistakes create trouble for you all
---------- Post updated at 09:53 PM ---------- Previous update was at 08:23 PM ----------
Hi, I just found out that both of your suggested code, will print out all those sequence after seq_8 as well
Do you got better idea, just let it extract only seq_8 ?
Really thanks for your help ^^
---------- Post updated at 09:58 PM ---------- Previous update was at 09:53 PM ----------
Hi Ahmad,
the same problem as Scrutinizer's code, happen to your suggested code as well
It will extract all those sequence content after seq_8 as well
Oic.
Sorry for let you misunderstanding my question.
I apologize and sorry for it
My thread one's problem already solved by ahmad ^^
Regarding to thread number 5,
Actually I just asking about how to extract only those content that matched with seq_8.
At this time, input :
>seq_1
DSASSTRRARRRRTPRTPSLRSRRSDVTCS
>seq_3
RMRLRRWRKSCSERSRRSN
>seq_8
RTTGLSERPRLPTTASRSISSRWTR
>seq_10
NELPLEKGSLDSISIE
>seq_9
PNQGDAREPQAHLPRRQGPRDRPLQAYA+
QVQHRRHDHSRTQHLCRRRQREDCDRLHR
>seq_4
DRGKGQAGCRRPQEGEALVRRCS>seq_6
FA*GLAAQDGEA*SGRG
My output: Extract only the data of seq_8:
>seq_8
RTTGLSERPRLPTTASRSISSRWTR
Sorry again, Scrutinizer.
I will notice my mistakes in future.
Hope for your understanding.
sorry