Hi,

I would like to filter out some sequences from a fasta file by using a specific pattern.

For example I have this file:

```
>input1
UGAGGUAGUAGG
>input2
CUAUGCUUACC
>out1
UCCCUGAGACCGUGA
>out2
CUCCGGGUACC
>desc1
ACUUCCUUACAUGCCC
```

I know already how I can extract all the fasta sequences with a specific pattern into a new file by using awk.

But what I would like to do is to remove all entries of a specific pattern from the original fasta file and save the newly made file into a new one. In my file above, I would like for example to remove all sequences with the header pattern out. and save only the other to a new file.

Is there a tool somewhere for doing that, or is it possible in awk/sed or even grep

Thanks

Assa
> I would like for example to remove all sequences with the header pattern out. and save only the other to a new file

    awk '/^>/ {P=index($0,"out")==0} {if(P) print} ' in.fasta > out.fasta