|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.biojava3.core.sequence.io.ProteinSequenceCreator
org.biojava3.core.sequence.io.CasePreservingProteinSequenceCreator
public class CasePreservingProteinSequenceCreator
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.
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]"
Constructor Summary | |
---|---|
CasePreservingProteinSequenceCreator(CompoundSet<AminoAcidCompound> compoundSet)
|
Method Summary | |
---|---|
AbstractSequence<AminoAcidCompound> |
getSequence(List<AminoAcidCompound> list)
Assumes all compounds were uppercase |
AbstractSequence<AminoAcidCompound> |
getSequence(ProxySequenceReader<AminoAcidCompound> proxyLoader,
long index)
|
AbstractSequence<AminoAcidCompound> |
getSequence(String sequence,
long index)
|
static void |
main(String[] args)
|
static void |
setLowercaseToNull(ProteinSequence seq,
Object[] out)
Takes a ProteinSequence which was created by a
CasePreservingProteinSequenceCreator . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CasePreservingProteinSequenceCreator(CompoundSet<AminoAcidCompound> compoundSet)
Method Detail |
---|
public AbstractSequence<AminoAcidCompound> getSequence(ProxySequenceReader<AminoAcidCompound> proxyLoader, long index)
getSequence
in interface SequenceCreatorInterface<AminoAcidCompound>
getSequence
in class ProteinSequenceCreator
index
- not used in this implementation
ProteinSequenceCreator.getSequence(org.biojava3.core.sequence.template.ProxySequenceReader, long)
public AbstractSequence<AminoAcidCompound> getSequence(String sequence, long index)
getSequence
in interface SequenceCreatorInterface<AminoAcidCompound>
getSequence
in class ProteinSequenceCreator
index
- not used in this implementation
public AbstractSequence<AminoAcidCompound> getSequence(List<AminoAcidCompound> list)
getSequence
in interface SequenceCreatorInterface<AminoAcidCompound>
getSequence
in class ProteinSequenceCreator
ProteinSequenceCreator.getSequence(java.util.List)
public static void main(String[] args)
public static void setLowercaseToNull(ProteinSequence seq, Object[] out)
ProteinSequence
which was created by a
CasePreservingProteinSequenceCreator
. Uses the case info
stored in the user collection to modify the output array.
Sets elements of the output array which correspond to lowercase letters to null.
seq
- Input sequence with case stored as the user collectionout
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |