public class PartSequence extends HasEntry
accountDAO, entryDAO
Constructor and Description |
---|
PartSequence(String userId,
EntryType type)
Constructor for creating a new part to associate a sequence with
|
PartSequence(String userId,
String entryId) |
Modifier and Type | Method and Description |
---|---|
protected SequenceFormat |
detectFormat(String sequenceString)
Attempts to detect the sequence format from the first line of a stream using the following heuristics
If line starts with
LOCUS then assumed to be a genbank file
If line starts with > then assumed to be a fasta file
If line starts with < then assumed to be an sbol file
Anything else is assumed to be plain nucleotides
|
FeaturedDNASequence |
get() |
protected FeaturedDNASequence |
getFeaturedSequence(Entry entry,
boolean canEdit) |
SequenceInfo |
parseSequenceFile(InputStream inputStream,
String fileName,
boolean extractHierarchy)
Parses a sequence in a file and associates it with the current entry
|
protected SequenceInfo |
save(DNASequence dnaSequence,
String sequenceString,
String fileName) |
protected FeaturedDNASequence |
sequenceToDNASequence(Sequence sequence) |
public PartSequence(String userId, EntryType type)
userId
- unique identifier for user creating new parttype
- type of part to create.public FeaturedDNASequence get()
public SequenceInfo parseSequenceFile(InputStream inputStream, String fileName, boolean extractHierarchy) throws IOException
inputStream
- input stream of bytes representing the filefileName
- name of file being parsedIOException
- on Exception parsing the contents of the fileprotected SequenceInfo save(DNASequence dnaSequence, String sequenceString, String fileName)
protected SequenceFormat detectFormat(String sequenceString) throws IOException
LOCUS
then assumed to be a genbank file>
then assumed to be a fasta file<
then assumed to be an sbol filesequenceString
- input sequenceIOException
protected FeaturedDNASequence getFeaturedSequence(Entry entry, boolean canEdit)
protected FeaturedDNASequence sequenceToDNASequence(Sequence sequence)
Copyright © 2017. All rights reserved.