|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.biojava.bio.structure.io.FastaStructureParser
public class FastaStructureParser
Reads a protein sequence from a fasta file and attempts to match it to a 3D structure. Any gaps ('-') in the fasta file are preserved as null atoms in the output, allowing structural alignments to be read from fasta files.
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 Summary | |
---|---|
FastaStructureParser(FastaReader<ProteinSequence,AminoAcidCompound> reader,
AtomCache cache)
|
|
FastaStructureParser(File file,
FastaHeaderParserInterface<ProteinSequence,AminoAcidCompound> headerParser,
SequenceCreatorInterface<AminoAcidCompound> sequenceCreator,
AtomCache cache)
|
|
FastaStructureParser(InputStream is,
FastaHeaderParserInterface<ProteinSequence,AminoAcidCompound> headerParser,
SequenceCreatorInterface<AminoAcidCompound> sequenceCreator,
AtomCache cache)
|
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FastaStructureParser(InputStream is, FastaHeaderParserInterface<ProteinSequence,AminoAcidCompound> headerParser, SequenceCreatorInterface<AminoAcidCompound> sequenceCreator, AtomCache cache)
public FastaStructureParser(File file, FastaHeaderParserInterface<ProteinSequence,AminoAcidCompound> headerParser, SequenceCreatorInterface<AminoAcidCompound> sequenceCreator, AtomCache cache) throws FileNotFoundException
FileNotFoundException
public FastaStructureParser(FastaReader<ProteinSequence,AminoAcidCompound> reader, AtomCache cache)
Method Detail |
---|
public void process() throws IOException, StructureException
getSequences()
,
getStructures()
,
getResidues()
, and
getAccessions()
.
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 String[] getAccessions()
process()
has not been called.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |