Class DefaultSequenceGraphFactories
- java.lang.Object
-
- com.biomatters.geneious.publicapi.implementations.DefaultSequenceGraphFactories
-
public final class DefaultSequenceGraphFactories extends java.lang.Object
Provides convenience functionality to create a SequenceGraphFactory which draws a bar graph from some simpler interfaces. For example, used for creating the hydrophobicity, PI, and similarity graphs. These graphs automatically handle calculating scores in background threads where appropriate (on very large sequences and alignments) and averaging scores over multiple residues. It also efficiently handles sequences with long endgaps (e.g. for contig assemblies). More complex graphs (such as the sequence logo graph) should be created directly via theSequenceGraphFactory
andSequenceGraph
classes.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DefaultSequenceGraphFactories.SequenceAlignmentScorer
Provides methods to supply a score for a given set of sequence residues and provide a color for a given score.static class
DefaultSequenceGraphFactories.SingleSequenceScorer
Provides methods to supply a score for a given sequence residue and provide a color for a given score.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static SequenceGraphFactory
createSequenceAlignmentGraphFactory(java.lang.String name, java.lang.String description, boolean defaultVisibility, int defaultHeight, SequenceDocument.Alphabet alphabet, DefaultSequenceGraphFactories.SequenceAlignmentScorer multipleSequenceScorer, boolean lineGraph)
Create a SequenceGraphFactory for sequence alignments.static SequenceGraphFactory
createSequenceAlignmentGraphFactory(java.lang.String name, java.lang.String description, boolean defaultVisibility, int defaultHeight, SequenceDocument.Alphabet alphabet, DefaultSequenceGraphFactories.SingleSequenceScorer singleSequenceScorer, boolean lineGraph)
Create a SequenceGraphFactory that is averaged over multiple sequences from a single sequence scorer.static SequenceGraphFactory
createSingleSequenceGraphFactory(java.lang.String name, java.lang.String description, boolean defaultVisibility, int defaultHeight, SequenceDocument.Alphabet alphabet, DefaultSequenceGraphFactories.SingleSequenceScorer singleSequenceScorer, boolean lineGraph)
Create a SequenceGraphFactory for a single sequence where graph points depend only on the residue at that point.
-
-
-
Method Detail
-
createSingleSequenceGraphFactory
public static SequenceGraphFactory createSingleSequenceGraphFactory(java.lang.String name, java.lang.String description, boolean defaultVisibility, int defaultHeight, SequenceDocument.Alphabet alphabet, DefaultSequenceGraphFactories.SingleSequenceScorer singleSequenceScorer, boolean lineGraph)
Create a SequenceGraphFactory for a single sequence where graph points depend only on the residue at that point. For example, this is used to create the hydrophobicity and PI graphs in protein sequences.- Parameters:
name
- name displayed next to graphs generated by this factorydescription
- a more verbose description displayed as a tool tip or null to provide no descriptiondefaultVisibility
- the default visibility for this graph.defaultHeight
- the default height for this graph, which the user can override.alphabet
- the alphabet of the graph (either protein or nucleotide)singleSequenceScorer
- a scorer to calculate the score and Color based on a residue.lineGraph
- true if this should be a line graph rather than a bar graph- Returns:
- a SequenceGraphFactory
-
createSequenceAlignmentGraphFactory
public static SequenceGraphFactory createSequenceAlignmentGraphFactory(java.lang.String name, java.lang.String description, boolean defaultVisibility, int defaultHeight, SequenceDocument.Alphabet alphabet, DefaultSequenceGraphFactories.SingleSequenceScorer singleSequenceScorer, boolean lineGraph)
Create a SequenceGraphFactory that is averaged over multiple sequences from a single sequence scorer. For example, this is used to create the average hydrophobicity and average PI graphs in protein sequence alignments.- Parameters:
name
- name displayed next to graphs generated by this factorydescription
- a more verbose description displayed as a tool tip or null to provide no descriptiondefaultVisibility
- the default visibility for this graph.defaultHeight
- the default height for this graph, which the user can override.alphabet
- the alphabet of the graph (either protein or nucleotide)singleSequenceScorer
- a scorer to calculate the score and Color based on a residue.lineGraph
- true if this should be a line graph rather than a bar graph- Returns:
- a SequenceGraphFactory
-
createSequenceAlignmentGraphFactory
public static SequenceGraphFactory createSequenceAlignmentGraphFactory(java.lang.String name, java.lang.String description, boolean defaultVisibility, int defaultHeight, SequenceDocument.Alphabet alphabet, DefaultSequenceGraphFactories.SequenceAlignmentScorer multipleSequenceScorer, boolean lineGraph)
Create a SequenceGraphFactory for sequence alignments. For example, this is used to create the similarity graph for sequence alignments.- Parameters:
name
- name displayed next to graphs generated by this factorydescription
- a more verbose description displayed as a tool tip or null to provide no descriptiondefaultVisibility
- the default visibility for this graph.defaultHeight
- the default height for this graph, which the user can override.alphabet
- the alphabet of the graph (either protein or nucleotide)multipleSequenceScorer
- a scorer to calculate the score and Color based on a set of residues.lineGraph
- true if this should be a line graph rather than a bar graph- Returns:
- a SequenceGraphFactory
-
-