public class FastaStructureParser
extends java.lang.Object
Structures are loaded from an AtomCache. For this to work, the accession
for each protein should be parsed from the fasta header line into a form
understood by AtomCache.getStructure(String)
.
Lowercase letters are sometimes used to specify unaligned residues.
This information can be preserved by using a CasePreservingSequenceCreator,
which allows the case of residues to be accessed through the
AbstractSequence.getUserCollection()
method.
Constructor | Description |
---|---|
FastaStructureParser(java.io.File file,
SequenceHeaderParserInterface<ProteinSequence,AminoAcidCompound> headerParser,
SequenceCreatorInterface<AminoAcidCompound> sequenceCreator,
AtomCache cache) |
|
FastaStructureParser(java.io.InputStream is,
SequenceHeaderParserInterface<ProteinSequence,AminoAcidCompound> headerParser,
SequenceCreatorInterface<AminoAcidCompound> sequenceCreator,
AtomCache cache) |
|
FastaStructureParser(FastaReader<ProteinSequence,AminoAcidCompound> reader,
AtomCache cache) |
Modifier and Type | Method | Description |
---|---|---|
java.lang.String[] |
getAccessions() |
Gets the protein accessions mapped from the Fasta file.
|
ResidueNumber[][] |
getResidues() |
For each residue in the fasta file, return the ResidueNumber in the
corresponding structure.
|
ProteinSequence[] |
getSequences() |
Gets the protein sequences read from the Fasta file.
|
Structure[] |
getStructures() |
Gets the protein structures mapped from the Fasta file.
|
void |
process() |
Parses the fasta file and loads it into memory.
|
public FastaStructureParser(java.io.InputStream is, SequenceHeaderParserInterface<ProteinSequence,AminoAcidCompound> headerParser, SequenceCreatorInterface<AminoAcidCompound> sequenceCreator, AtomCache cache)
public FastaStructureParser(java.io.File file, SequenceHeaderParserInterface<ProteinSequence,AminoAcidCompound> headerParser, SequenceCreatorInterface<AminoAcidCompound> sequenceCreator, AtomCache cache) throws java.io.FileNotFoundException
java.io.FileNotFoundException
public FastaStructureParser(FastaReader<ProteinSequence,AminoAcidCompound> reader, AtomCache cache)
public void process() throws java.io.IOException, StructureException
getSequences()
,
getStructures()
,
getResidues()
, and
getAccessions()
.java.io.IOException
StructureException
public ProteinSequence[] getSequences()
process()
has not been called.public Structure[] getStructures()
process()
has not been called.public ResidueNumber[][] getResidues()
StructureSequenceMatcher.matchSequenceToStructure(ProteinSequence, Structure)
public java.lang.String[] getAccessions()
process()
has not been called.