edu.mssm.crover.domain2d.rbdg
Class rbdg

java.lang.Object
  |
  +--edu.mssm.crover.domain2d.rbdg.rbdg

public class rbdg
extends java.lang.Object

Residue-based Diagram Generator (RbDg). This program can generate residue-based diagrams in batch mode.


Constructor Summary
rbdg()
           
 
Method Summary
 void displayDiagram()
           
 void excludeElipsesFromResidue(int position, boolean exclusion)
           
 void excludeElipsesFromResidueRange(java.lang.String range, boolean exclusion)
          Marks residues to be excluced from elipses.
 void generateImage(FormatType image_format, java.io.OutputStream dest)
           
 void generateImage(FormatType image_format, java.lang.String filename)
           
 java.awt.Color getColorByName(java.lang.String color_name)
           
 Diagram getDiagram()
           
 java.lang.String getURLAnnotationsMapContainer()
          Returns a String to be used for setting the clickable HTML map (usemap).
 void linkResidue(AnnotatedBioSequence seq, int start_residue, int end_residue, java.net.URL url)
          Links residues of a sequence to a document.
static void main(java.lang.String[] args)
          Runs the diagram generator.
 boolean needsUpdate()
          Determines if the diagrams generated by an input file need to be upgraded.
 void paintResidue(int position, java.lang.String color)
          Paint a residue on the current sequence.
 void process(java.lang.String[] args)
          Parse and process arguments of this program.
 void processColors()
           
 void processDisulfideBridges(AnnotatedBioSequence seq)
           
 void processElipses()
           
 void processFileAndLayout(java.lang.String input_fn, java.lang.String layout)
          (Don't really need this) Parses the file, and inserts the layout XML just after the tag and before the tag.
 void processLayout()
           
 void processLinks()
           
 void processOneFile(java.lang.String input_fn)
          Parse arguments of this program.
 void processOptions()
           
 void processOutput()
           
 void processProtein()
           
 void processResidueShape(ResidueShape shape)
           
 void processXMLLayout(java.lang.String xml)
          Converts a layout XML String to a Reader and passes it to the Process(Reader) method
static void setColor(BiologicalAnnotation[] anns, int start_residue, int end_residue, java.lang.String user_color)
           
 void setUrl(java.lang.String subunit_id, java.lang.String url)
           
 void validateColors()
          Check that values in color are correct: colorscheme name must be one of : GPCRDB or homogeneous.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

rbdg

public rbdg()
Method Detail

process

public void process(java.lang.String[] args)
Parse and process arguments of this program. (general case: handles -list/-l multiple files option.)


processXMLLayout

public void processXMLLayout(java.lang.String xml)
Converts a layout XML String to a Reader and passes it to the Process(Reader) method


processFileAndLayout

public void processFileAndLayout(java.lang.String input_fn,
                                 java.lang.String layout)
(Don't really need this) Parses the file, and inserts the layout XML just after the tag and before the tag.


processOneFile

public void processOneFile(java.lang.String input_fn)
Parse arguments of this program. (only -i case, -list is not supported)


needsUpdate

public boolean needsUpdate()
Determines if the diagrams generated by an input file need to be upgraded.


validateColors

public void validateColors()
Check that values in color are correct: colorscheme name must be one of : GPCRDB or homogeneous.


processProtein

public void processProtein()

processLayout

public void processLayout()

processElipses

public void processElipses()

processDisulfideBridges

public void processDisulfideBridges(AnnotatedBioSequence seq)

processColors

public void processColors()

processLinks

public void processLinks()

setUrl

public void setUrl(java.lang.String subunit_id,
                   java.lang.String url)

processOutput

public void processOutput()

getDiagram

public Diagram getDiagram()

generateImage

public void generateImage(FormatType image_format,
                          java.io.OutputStream dest)

generateImage

public void generateImage(FormatType image_format,
                          java.lang.String filename)

linkResidue

public void linkResidue(AnnotatedBioSequence seq,
                        int start_residue,
                        int end_residue,
                        java.net.URL url)
Links residues of a sequence to a document.

Parameters:
seq - Sequence for which the residues are to be linked.
start_residue - Position of the first residue. (Starts at 0.)
end_residue - Position of the last residue to be linked. (Starts at 0.)
url - of the document to which the residues are linked.

paintResidue

public void paintResidue(int position,
                         java.lang.String color)
Paint a residue on the current sequence.

Parameters:
position - index of the residue to paint. (Starts at 0.)
color - to paint the residue with.

excludeElipsesFromResidueRange

public void excludeElipsesFromResidueRange(java.lang.String range,
                                           boolean exclusion)
Marks residues to be excluced from elipses.

Parameters:
range - range of residue in the form 1-3,40-89,5
exclusion - if true, the residues in the range are excluded from elipses, otherwise they are not.

excludeElipsesFromResidue

public void excludeElipsesFromResidue(int position,
                                      boolean exclusion)

main

public static void main(java.lang.String[] args)
Runs the diagram generator.


displayDiagram

public void displayDiagram()

setColor

public static void setColor(BiologicalAnnotation[] anns,
                            int start_residue,
                            int end_residue,
                            java.lang.String user_color)

getColorByName

public java.awt.Color getColorByName(java.lang.String color_name)

getURLAnnotationsMapContainer

public java.lang.String getURLAnnotationsMapContainer()
Returns a String to be used for setting the clickable HTML map (usemap). The String contains the settings of all the glyphs and their URL annotations in the current Image.


processOptions

public void processOptions()

processResidueShape

public void processResidueShape(ResidueShape shape)


Copyright @ 2003 Mount Sinai School of Medicine. All Rights Reserved.