public static class SequenceExtractionUtilities.ExtractionOptions extends Object
SequenceExtractionUtilities.extractIntervals(com.biomatters.geneious.publicapi.documents.sequence.SequenceDocument, com.biomatters.geneious.publicapi.implementations.SequenceExtractionUtilities.ExtractionOptions).| Constructor and Description |
|---|
SequenceExtractionUtilities.ExtractionOptions(Interval... intervals)
Construct the extraction options from a list of intervals.
|
SequenceExtractionUtilities.ExtractionOptions(int extractFrom,
int extractTo)
Construct the extraction options with a single interval from extractFrom to extractTo inclusive.
|
SequenceExtractionUtilities.ExtractionOptions(List<SequenceAnnotationInterval> intervals)
Construct the extraction options from a list of intervals.
|
SequenceExtractionUtilities.ExtractionOptions(SequenceAnnotationInterval... intervals)
Construct the extraction options from a list of intervals.
|
SequenceExtractionUtilities.ExtractionOptions(SequenceExtractionUtilities.ExtractionOptions extractionOptionsToCopy)
Constructs some new extraction options identical to the given ones.
|
| Modifier and Type | Method and Description |
|---|---|
SequenceExtractionUtilities.ExtractionOptions |
setAllowReverseComplement(boolean allowReverseComplement)
Set whether or not intervals in the reverse direction should be reverse complemented.
|
SequenceExtractionUtilities.ExtractionOptions |
setIncludeIntersectingAnnotations(boolean includeIntersectingAnnotations)
Sets whether or not the result returned from the extraction should include annotations which intersect the extracted region
rather than being contained within it entirely.
|
void |
setIntervals(List<SequenceAnnotationInterval> intervals)
Set the intervals to extract.
|
SequenceExtractionUtilities.ExtractionOptions |
setMustGenerateDefaultSequenceDocument(boolean mustGenerateDefaultSequenceDocument)
Sets whether or not the result returned from the extraction must be a
DefaultSequenceDocument. |
SequenceExtractionUtilities.ExtractionOptions |
setMustGenerateLinearSequence(boolean mustGenerateLinearSequence)
Sets whether or not the result returned from the extraction must be a linear sequence, even if extracting the entire length of a circular sequence.
|
SequenceExtractionUtilities.ExtractionOptions |
setOverrideName(String overrideName)
Sets the name of the extracted sequence.
|
void |
setPotentialAnnotationsToExtract(Set<SequenceAnnotation> potentialAnnotationsToExtract)
Tells the extract code which annotations are allowed to end up on the extracted sequence.
|
SequenceExtractionUtilities.ExtractionOptions |
setProgressListener(ProgressListener progressListener)
Sets a progress listener to report progress to during extraction and to allow a slow extraction call to be canceled.
|
SequenceExtractionUtilities.ExtractionOptions |
setRemoveGaps(boolean removeGaps)
Set whether or not gaps should be removed during extraction.
|
SequenceExtractionUtilities.ExtractionOptions |
setResiduesOnly(boolean residuesOnly)
Set whether or not to ignore any annotations on the source sequence, and extract the residues only.
|
SequenceExtractionUtilities.ExtractionOptions |
setTranslation(GeneticCode geneticCode,
int translationFrame)
|
SequenceExtractionUtilities.ExtractionOptions |
setTranslation(GeneticCode geneticCode,
int translationFrame,
boolean translateFirstCodonUsingFirstCodonTable,
boolean removeFinalStopCodon)
Sets the extraction to translate while extracting.
|
SequenceExtractionUtilities.ExtractionOptions |
setTruncateAnnotationsIfNecessary(boolean truncateAnnotationsIfNecessary)
Sets whether or not to truncate annotations extending outside the extracted region so that they lie entirely within the extracted region.
|
public SequenceExtractionUtilities.ExtractionOptions(SequenceExtractionUtilities.ExtractionOptions extractionOptionsToCopy)
extractionOptionsToCopy - the extraction options to copypublic SequenceExtractionUtilities.ExtractionOptions(int extractFrom,
int extractTo)
extractTo<extractFrom then the interval is extracted in the reverse direction.extractFrom - the starting residue to extract in the range 1 to the sequence length.extractTo - the last residue (inclusive) to extract in the range 1 to the sequence length.public SequenceExtractionUtilities.ExtractionOptions(List<SequenceAnnotationInterval> intervals)
intervals - the intervals to extract. If multiple intervals are specified then the extracted intervals are concatenated together to form the returned sequence.public SequenceExtractionUtilities.ExtractionOptions(SequenceAnnotationInterval... intervals)
intervals - the intervals to extract. If multiple intervals are specified then the extracted intervals are concatenated together to form the returned sequence.public SequenceExtractionUtilities.ExtractionOptions(Interval... intervals)
intervals - the intervals to extract. If multiple intervals are specified then the extracted intervals are concatenated together to form the returned sequence.public SequenceExtractionUtilities.ExtractionOptions setOverrideName(String overrideName)
extract, this method
can be called before each call to extract.overrideName - the name to use for the extracted sequence or null to generated a name based on the options and the sequence being extracted from.this for convenience. e.g. SequenceExtractionUtilities.extract(new ExtractionOptions(...).setOverrideName(...))public void setIntervals(List<SequenceAnnotationInterval> intervals)
extract, this method
should be called before each call to extract.intervals - the intervals to extract. If multiple intervals are specified then the extracted intervals are concatenated together to form the returned sequence.public SequenceExtractionUtilities.ExtractionOptions setRemoveGaps(boolean removeGaps)
removeGaps - true to remove any gaps, false to maintain any gaps in the extracted sequencethis for convenience. e.g. SequenceExtractionUtilities.extract(new ExtractionOptions(...).setRemoveGaps(...))public void setPotentialAnnotationsToExtract(Set<SequenceAnnotation> potentialAnnotationsToExtract)
potentialAnnotationsToExtract - Potential annotations to extract, or null to allow all annotations to be extracted if they match. The annotations
must be a subset of those on the source sequence.public SequenceExtractionUtilities.ExtractionOptions setProgressListener(ProgressListener progressListener)
progressListener - the progress listenerthis for convenience. e.g. SequenceExtractionUtilities.extract(new ExtractionOptions(...).setProgressListener(...))public SequenceExtractionUtilities.ExtractionOptions setAllowReverseComplement(boolean allowReverseComplement)
allowReverseComplement - true to allow intervals in the reverse direction to be reverse complemented.this for convenience. e.g. SequenceExtractionUtilities.extract(new ExtractionOptions(...).setAllowReverseComplement(...))public SequenceExtractionUtilities.ExtractionOptions setResiduesOnly(boolean residuesOnly)
residuesOnly - true to ignore any annotations on the source sequence.this for convenience. e.g. SequenceExtractionUtilities.extract(new ExtractionOptions(...).setResiduesOnly(...))@Deprecated public SequenceExtractionUtilities.ExtractionOptions setTranslation(GeneticCode geneticCode, int translationFrame)
setTranslation(GeneticCode geneticCode, int translationFrame, boolean removeFinalStopCodon, boolean translateFirstCodonUsingFirstCodonTable) instead.geneticCode - the genetic code to use during translation or null to not translate.translationFrame - the translation frame to use if translating relative to the interval being extracted. Either 0, 1, or 2. Should be 0 if geneticCode==null. To translate in reverse, specify an interval in the reverse direction in the extraction options constructor.this for convenience. e.g. SequenceExtractionUtilities.extract(new ExtractionOptions(...).setTranslation(...))public SequenceExtractionUtilities.ExtractionOptions setTranslation(GeneticCode geneticCode, int translationFrame, boolean translateFirstCodonUsingFirstCodonTable, boolean removeFinalStopCodon)
geneticCode - the genetic code to use during translation or null to not translate.translationFrame - the translation frame to use if translating relative to the interval being extracted. Either 0, 1, or 2. Should be 0 if geneticCode==null. To translate in reverse, specify an interval in the reverse direction in the extraction options constructor.translateFirstCodonUsingFirstCodonTable - each genetic code specifies a set of codons which get translated as M if they are the first codon even though they normally wouldn't translate as an M when occurring elsewhere a coding region. If this parameter is true the first codon will be translated using this alternative translation table for the genetic code.removeFinalStopCodon - whether to remove the stop codon at the end of the sequence, if anythis for convenience. e.g. SequenceExtractionUtilities.extract(new ExtractionOptions(...).setTranslation(...))public SequenceExtractionUtilities.ExtractionOptions setTruncateAnnotationsIfNecessary(boolean truncateAnnotationsIfNecessary)
SequenceAnnotationInterval.isTruncatedAtMaximumIndex() and
SequenceAnnotationInterval.isTruncatedAtMinimumIndex().truncateAnnotationsIfNecessary - true to truncate annotations extending outside the extracted region.this for convenience. e.g. SequenceExtractionUtilities.extract(new ExtractionOptions(...).setTruncateAnnotationsIfNecessary(...))public SequenceExtractionUtilities.ExtractionOptions setMustGenerateDefaultSequenceDocument(boolean mustGenerateDefaultSequenceDocument)
DefaultSequenceDocument.
Even if this is false, the returned document may be any SequenceDocument implementation decided on by the extraction implementation.mustGenerateDefaultSequenceDocument - true to force the result returned from the extraction to be a DefaultSequenceDocumentthis for conveniencepublic SequenceExtractionUtilities.ExtractionOptions setMustGenerateLinearSequence(boolean mustGenerateLinearSequence)
mustGenerateLinearSequence - true to force the result returned from the extraction to be a linear sequence.this for conveniencepublic SequenceExtractionUtilities.ExtractionOptions setIncludeIntersectingAnnotations(boolean includeIntersectingAnnotations)
includeIntersectingAnnotations - whether or not the result returned from the extraction should include annotations which intersect the extracted region.this for convenience