Class CasePreservingProteinSequenceCreator

  • All Implemented Interfaces:
    SequenceCreatorInterface<AminoAcidCompound>

    public class CasePreservingProteinSequenceCreator
    extends ProteinSequenceCreator
    A sequence creator which preserves the case of its input string in the user collection of the returned ProteinSequence.

    The user collection will be the same length as the resulting ProteinSequence. Each object can be cast to a Boolean. If true, the corresponding position in the input file was uppercase.

    Example

    CasePreservingProteinSequenceCreator creator =
        new CasePreservingProteinSequenceCreator(AminoAcidCompoundSet.getAminoAcidCompoundSet());
    AbstractSequence seq = creator.getSequence("aaAA",0);
    System.out.println(seq.getSequenceAsString()); //"AAAA"
    System.out.println(seq.getUserCollection()); //"[false, false, true, true]"