A yes, grep -B1 ! :-) , you know there is a secret option in grep to remove the double hyphen: --no-group-separator
extract sequences from fasta starting with a specific nucleotide
Hi, have a fasta file of 500 sequences, I want to extract the sequences starting with a specific nucleotide in the example A. Can anyone help?
E.g.
>seq_1
ACACACCGCTTCTAGCTG
>seq_2
ACAGGCAGAATTCTACAAGGA
>seq_3
CAAATATAATGACTATGGAATACC
>seq_4
CAATCGCCCGCTCACCTAGGTCT
>seq_5-493
TAACAGGCAGAATTCTACAAGGAC
Desired output:
>seq_1
ACACACCGCTTCTAGCTG
>seq_2
ACAGGCAGAATTCTACAAGGA
thank you in advance for your help
• 4,124 views
•
link
2 answers
• 1 views
•
link
Log in to answer this question.
Thank you all for your answers. Both methods are working!