How do I remove Features from a Sequence?

When processing a Sequence object you may wish to delete some Features. The following example, kindly donated by Keith James, shows how to remove all of the Features that meet some specific requirement. In this example all the Features on the positive strand of the Sequence are erased.

```java import*; import java.util.*;

import*; import*; import*;

public class RemoveFeatures {

   public static void main(String [] argv) throws Exception
       //read in an EMBL file
       BufferedReader br = new BufferedReader(new FileReader(argv[0]));
       SequenceIterator seqI = SeqIOTools.readEmbl(br);

       while (seqI.hasNext())
           Sequence seq = seqI.nextSequence();

           //get all the features on the positive strand
           FeatureHolder fh =
               seq.filter(new FeatureFilter.StrandFilter(StrandedFeature.POSITIVE));

           //iterate through the features
           for (Iterator i = fh.features(); i.hasNext();)
               //and remove each one

           //finally write the edited sequence out
           SeqIOTools.writeEmbl(System.out, seq);

} ```