import org.biojava.bio.*; import org.biojava.bio.symbol.*; import org.biojava.bio.seq.*; import org.biojava.bio.seq.io.*; import org.biojava.utils.*; import org.biojava.bio.seq.impl.RevCompSequence; /** * This class holds a method to manipulate sequences. * The class uses bioJava packages * @author Gard Thomassen * @see ProgramManager */ class SeqTools{ /** this method gets a sequence and return * the reverse compliment * @param s the sequence to reverse comliment * @return the reverse complimented sequence */ public Sequence reverseCompliment (Sequence s){ RevCompSequence reversedSeq = null; try{ reversedSeq = new RevCompSequence(s); } catch (Exception e){ System.err.println("Error whiule reverse comlimenting sequence"); } reversedSeq.setName(reversedSeq.getName().concat(".reversed")); return (Sequence) reversedSeq; } }