|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.biojava3.core.sequence.io.FileProxyDNASequenceCreator
public class FileProxyDNASequenceCreator
This class is a good example of using the SequenceCreatorInterface where during parsing of the stream the sequence and the offset index are passed to create a Protein sequence that will be loaded in lazily. This way you can load very large fasta files and store accession id and delay loading the sequence to save memory. The index is the file stream offset so when a DNASequence has a call to getSequence() the SequenceFileProxyLoader will open the file and offset to the index and retrieve the sequence. Same approach can be used for genome sequence data stored in a local fasta file, in a database or via http interface to a remote server
Constructor Summary | |
---|---|
FileProxyDNASequenceCreator(File fastaFile,
CompoundSet<NucleotideCompound> compoundSet)
Need File so that we can store full path name in SequenceFileProxyLoader for Random File access as a quick read |
Method Summary | |
---|---|
AbstractSequence<NucleotideCompound> |
getSequence(List<NucleotideCompound> list)
Not sure of use case and currently not supported |
AbstractSequence<NucleotideCompound> |
getSequence(ProxySequenceReader<NucleotideCompound> proxyLoader,
long index)
Should be able to extend the same concept to a remote URL call or database connection. |
AbstractSequence<NucleotideCompound> |
getSequence(String sequence,
long index)
Even though we are passing in the sequence we really only care about the length of the sequence and the offset index in the fasta file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FileProxyDNASequenceCreator(File fastaFile, CompoundSet<NucleotideCompound> compoundSet)
fastaFile
- compoundSet
- Method Detail |
---|
public AbstractSequence<NucleotideCompound> getSequence(String sequence, long index)
getSequence
in interface SequenceCreatorInterface<NucleotideCompound>
sequence
- index
-
public AbstractSequence<NucleotideCompound> getSequence(ProxySequenceReader<NucleotideCompound> proxyLoader, long index)
getSequence
in interface SequenceCreatorInterface<NucleotideCompound>
proxyLoader
- index
-
public AbstractSequence<NucleotideCompound> getSequence(List<NucleotideCompound> list)
getSequence
in interface SequenceCreatorInterface<NucleotideCompound>
list
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |