charite.christo.metannogen
Class Dataset
java.lang.Object
charite.christo.metannogen.Dataset
- All Implemented Interfaces:
- DialogStringMatch.Interface, ChRunnable, Colored, HasID, HasRendererText, HasInfoText, TabItemTipIcon.Interface
public class Dataset
- extends Object
- implements HasRendererText, TabItemTipIcon.Interface, HasInfoText, Colored, HasID, DialogStringMatch.Interface, ChRunnable
HELP
The data for each reaction which is collected by the curator is organized in datasets.
A dataset contains a biochemical reaction written with metabolite identifiers.
ID:Each dataset should have a unique identifier.
Creating datasets:
An empty dataset can be created from the dataset-menu (Menu-bar>Datasets>BUTTON:MetannogenStatics#CMD_NEW_EMPTY_DATASET).
A GUI window with the dataset form is opened (see figure dataset-view).
It is also possible to use a reaction of one of the loaded networks as a template such that the
ID field and the equation field will be filled.
The respective menu item is found in the WIKI:Context_menu (Right click) for reactions.
GUI:
The datasets are edited using a comfortable graphical form.
A dataset is opened when the respective tree node is activated in the tree view or with the respective context menu.
The different fields of the dataset are manipulated by appropriate GUI elements such as single and multi-line text fields,
choice menus and toggle buttons.
Usually, a dataset describes a biochemical reaction in one or several compartments.
For unspecific reactions and unspecific transporters: See DIALOG:BraceExpansion.
PUBMED links:
Like all x-refs also Pubmed identifiers in the text area
such as "PMID16020471" act as hyper-links.
Unfortunately, there is a considerable delay of up to seconds
after a Pubmed abstract is shown in the browser.
Therefore an immediate display of Pubmed abstracts (and Uniprot
entries) is implemented using a cache:
When the mouse pointer hovers over a Pubmed ID, the abstract is
downloaded and then displayed.
The same applies to Uniprot IDs. PDFs can be associated to Pubmed
IDs in a semi-automated manner. This functionality is accessible by
right-clicking Pubmed IDs.
As text highlighting capabilities of document viewers like Evince
or Acrobate are still limited, advanced highlighting
features have been implemented for abstracts as well as for publication full texts
within the Metannogen environment:
The user can define a set of text patterns to be highlighted in the
publication text
(Menu-bar>Options>LABEL:MetannogenStatics#BUT_LAB_highlightInPubmed).
These patterns apply to all datasets. Dataset specific catch words to
be highlighted can be defined by declaring a variable $HL=" pattern1
#00FF00 pattern2 ... " in the comment text field. Each token my be
preceded by a color written in hexadecimal HTML-syntax. For example
#00FF00 denotes the color green.
Internal links:
In the comment text of a dataset, references to other datasets can
be included such that the referenced dataset is opened when the
link is clicked. The links are typed in the form DATASET#datasetIdentifier.
In addition, paragraphs in the comment text field can be referenced.
The paragraph must have at least a BEGIN#myLabelText anchor of the form BEGIN#myLabelText
and may optionally be terminated with
an end anchor like END#myLabelText.
A tagged paragraph can be referenced. The corresponding references to this paragraph have the form #myLabelText
or INCLUDE#myLabelText.
In a similar way links of the form NETWORK#R00149 act as an hyper-link to all reactions (KEGG, Palsson, EHMN) with the given ID.
Any ID or any metabolite name has a context menu.
Additional GUI elements:
It is possible to add additional GUI elements which correspond to specific
columns in the Tab-separated Metannogen file format.
To alter the state of these fields, GUI elements can be created:
Menu-bar>Options>LABEL:AbstractDatasetView#BUT_LAB_changeSource.
Additional additional dataset fields:
The above approach requires programming skills.
A much simplier way to structure the data is to use variable declarations in the
comment text field. Example:
$myVariable="my text"
It is possible to define an input form with variable declarations.
A form may contains contains free text with embedded empty variable declarations.
The curator can fill in the form by adding text to the empty declarations.
The form is prepared with a text editor and the file path or URL of
the form file is provided as a command line option.
Method Summary |
void |
checkModifiedOnServer()
|
void |
dispose_()
|
Color |
getColor()
|
String[] |
getCompartmentMapped()
|
String[] |
getCompartments()
|
String[] |
getConfidences()
|
MReaction |
getCorrespondingReaction()
|
DatasetView |
getDatasetView()
|
String[] |
getEC_IDs()
|
String |
getField(int colId)
|
String |
getField(String colId)
|
byte[] |
getFieldAsBytes(int col)
|
String[] |
getFields()
|
Object |
getHaystacksForStringSearch(int mode)
|
String |
getID()
|
String[] |
getIDs()
Several IDs if the id field contains several IDs speparated by vertical BAR |
String |
getInfoText()
|
String[][] |
getLabels()
|
int |
getModificationCount()
|
static int |
getModificationCountAllFields()
|
static int[] |
getModificationCounts()
|
String[] |
getOriginalFields()
|
MReaction[] |
getReactions()
|
MReaction[] |
getReactions(Map<String,String> mapMetabolites,
Map<String,String> mapCompartments,
long mode)
|
MReaction[] |
getReactionsSameStoichiometry()
|
String |
getRendererText(int options)
|
String |
getSortText()
|
String[] |
getSubstratesAndProducts(int type)
|
TabItemTipIcon |
getTabItemTipIcon(MouseEvent ev)
|
MReaction[] |
getUnlocalizedReactions()
These Reactions are not necessarily localized because the compartment field is not yet applied. |
boolean |
isAccepted()
|
static boolean |
isAnyDatasetModified()
|
boolean |
isBiomass()
|
boolean |
isEditable()
|
boolean |
isExcluded()
|
boolean |
isTransport()
|
Map<String,String> |
mapAttributes()
|
boolean |
needsSaving()
|
boolean |
needsUploading()
|
void |
parse(String line,
int serverTimeSec)
|
Object |
run(String id,
Object arg)
|
static void |
saveDatasets()
|
void |
setColor(Color c)
|
void |
setEditable(boolean b)
|
void |
setField(int i,
String value)
|
void |
setField(String colId,
String value)
|
void |
setFields(String[] ss,
int serverTimeSec)
|
void |
setModified()
|
boolean |
setNeedsSaving(boolean b)
|
boolean |
setNeedsUploading(boolean b)
|
void |
setServerTimeSec(int time)
|
void |
setView(DatasetView view)
|
void |
setVisited()
|
String |
toString()
|
long |
whenModified()
|
void |
write(StringBuffer sb)
|
static String |
writeAllDatasets()
|
NONE
public static final Dataset[] NONE
WHEN_CREATED
public final long WHEN_CREATED
LABEL_DEF
public static final int LABEL_DEF
- See Also:
- Constant Field Values
LABEL_REF
public static final int LABEL_REF
- See Also:
- Constant Field Values
LABEL_PARAGRAPH_DEF
public static final int LABEL_PARAGRAPH_DEF
- See Also:
- Constant Field Values
LABEL_PARAGRAPH_REF
public static final int LABEL_PARAGRAPH_REF
- See Also:
- Constant Field Values
COUNT_LABELS
public static final int COUNT_LABELS
- See Also:
- Constant Field Values
Dataset
public Dataset(MReaction r)
whenModified
public final long whenModified()
dispose_
public void dispose_()
getModificationCounts
public static int[] getModificationCounts()
getModificationCount
public int getModificationCount()
getModificationCountAllFields
public static int getModificationCountAllFields()
isAnyDatasetModified
public static boolean isAnyDatasetModified()
write
public void write(StringBuffer sb)
saveDatasets
public static void saveDatasets()
writeAllDatasets
public static String writeAllDatasets()
parse
public void parse(String line,
int serverTimeSec)
needsSaving
public boolean needsSaving()
needsUploading
public boolean needsUploading()
setNeedsSaving
public boolean setNeedsSaving(boolean b)
setNeedsUploading
public boolean setNeedsUploading(boolean b)
setModified
public void setModified()
setVisited
public void setVisited()
getDatasetView
public DatasetView getDatasetView()
setView
public void setView(DatasetView view)
setEditable
public void setEditable(boolean b)
isEditable
public boolean isEditable()
isAccepted
public boolean isAccepted()
isExcluded
public boolean isExcluded()
setField
public void setField(String colId,
String value)
setField
public void setField(int i,
String value)
getField
public String getField(int colId)
getField
public String getField(String colId)
getFields
public String[] getFields()
setFields
public void setFields(String[] ss,
int serverTimeSec)
getOriginalFields
public String[] getOriginalFields()
getFieldAsBytes
public byte[] getFieldAsBytes(int col)
getCompartments
public String[] getCompartments()
getConfidences
public String[] getConfidences()
getCompartmentMapped
public String[] getCompartmentMapped()
setColor
public void setColor(Color c)
- Specified by:
setColor
in interface Colored
getColor
public Color getColor()
- Specified by:
getColor
in interface Colored
getRendererText
public String getRendererText(int options)
- Specified by:
getRendererText
in interface HasRendererText
getTabItemTipIcon
public TabItemTipIcon getTabItemTipIcon(MouseEvent ev)
- Specified by:
getTabItemTipIcon
in interface TabItemTipIcon.Interface
getInfoText
public String getInfoText()
- Specified by:
getInfoText
in interface HasInfoText
getSortText
public String getSortText()
getSubstratesAndProducts
public String[] getSubstratesAndProducts(int type)
getHaystacksForStringSearch
public Object getHaystacksForStringSearch(int mode)
- Specified by:
getHaystacksForStringSearch
in interface DialogStringMatch.Interface
toString
public String toString()
- Overrides:
toString
in class Object
mapAttributes
public Map<String,String> mapAttributes()
getLabels
public String[][] getLabels()
getUnlocalizedReactions
public MReaction[] getUnlocalizedReactions()
- These Reactions are not necessarily localized because the compartment field is not yet applied.
Only the compartments given as metabolite suffices are given.
Usually one reaction is returned but if there are curly braces then brace expansion may result in more than one.
getReactions
public MReaction[] getReactions(Map<String,String> mapMetabolites,
Map<String,String> mapCompartments,
long mode)
getReactions
public MReaction[] getReactions()
getCorrespondingReaction
public MReaction getCorrespondingReaction()
isTransport
public boolean isTransport()
isBiomass
public boolean isBiomass()
getID
public String getID()
- Specified by:
getID
in interface HasID
getIDs
public String[] getIDs()
- Several IDs if the id field contains several IDs speparated by vertical BAR
getEC_IDs
public String[] getEC_IDs()
checkModifiedOnServer
public void checkModifiedOnServer()
setServerTimeSec
public void setServerTimeSec(int time)
run
public Object run(String id,
Object arg)
- Specified by:
run
in interface ChRunnable
getReactionsSameStoichiometry
public MReaction[] getReactionsSameStoichiometry()
'The most important classes are StrapAlign, StrapProtein and StrapEvent.'