public class CasePreservingProteinSequenceCreator extends ProteinSequenceCreator
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 and Description |
---|
CasePreservingProteinSequenceCreator(CompoundSet<AminoAcidCompound> compoundSet) |
Modifier and Type | Method and Description |
---|---|
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 . |
public CasePreservingProteinSequenceCreator(CompoundSet<AminoAcidCompound> compoundSet)
public AbstractSequence<AminoAcidCompound> getSequence(ProxySequenceReader<AminoAcidCompound> proxyLoader, long index)
getSequence
in interface SequenceCreatorInterface<AminoAcidCompound>
getSequence
in class ProteinSequenceCreator
index
- not used in this implementationProteinSequenceCreator.getSequence(org.biojava.nbio.core.sequence.template.ProxySequenceReader, long)
public AbstractSequence<AminoAcidCompound> getSequence(String sequence, long index) throws CompoundNotFoundException
getSequence
in interface SequenceCreatorInterface<AminoAcidCompound>
getSequence
in class ProteinSequenceCreator
index
- not used in this implementationCompoundNotFoundException
public AbstractSequence<AminoAcidCompound> getSequence(List<AminoAcidCompound> list)
getSequence
in interface SequenceCreatorInterface<AminoAcidCompound>
getSequence
in class ProteinSequenceCreator
ProteinSequenceCreator.getSequence(java.util.List)
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
- Copyright © 2000–2018 BioJava. All rights reserved.