Hi all,
I have a fasta file that looks like this
Code:
>consensus_5353
ACTCGGAGGTCCGATCCAAAGTTTTTCTTTTCAGTGCCGAGTAGAGTTAC
>consensus_5354
GCCGGTGGTGGCGGAAGCTGGTGGTTGGCCGGCCGGGTCGAGTGGAGGTC
>consensus_5355
AGCAGGAGTCCCGCCGCCCTCGACCTCTCTTCTTCCGCCGCCGCCCGGTG
>consensus_5356
AATTAGTGGATTATTTGGTGAGGTGGATGTAGAGTGTAGACCGTATAATT
>consensus_5357
GCAATACTCAAATTGGAATAGGATGAGCAAGGAAGAGGAAAATGGTGGGG
>consensus_5358
TAAGATGTTCTGTTAGGGACTCAGAAGAACATCAGAATCACTACTTACGT
>consensus_5359
TGCTGGACTTGCTCTTAGCCTCCGATCGTCCCTATAGACTTTTGGCCTTT
>consensus_5360
ACGTGCCGCACGTGGGGTACAAAACCACCGCGGCGTAGGAGACGTCAAAA
>consensus_5361
TCGGCGGGGAGCAGCTAGTAACGCGCATTAACACGAGCAAATCCTAGAGA
I have another file with the list of patterns. My pattern list file looks like this
Code:
>consensus_5353
>consensus_5357
>consensus_5359
>consensus_5361
What I want to do is to look for the patterns in my fasta file and delete those patterns and the next line of sequence corresponding to that pattern. Any thoughts how do I go about it with sed or awk or grep or perl?
I knew how to use sed to delete a single pattern but how to delete multiple patterns from a file instead of writing something like this
sed -e '/pattern/d' -e '/pattern/d' file
Thanks in advance.