TinkeCell API  1.0.0
C/Python/Octave/Ruby API
Functions
Get items

get selected items or items of a family More...

Functions

BEGIN_C_DECLS TCAPIEXPORT double ApplySpringForce (tc_matrix nodes, tc_matrix connections, double spring, double charge, double damping)
 An algorithm that does automatically calculates the next set of positions for performing force-based auto-layout. Use this if you want to make updates during each iteration.
BEGIN_C_DECLS TCAPIEXPORT tc_items tc_partsIn (long o)
 Get all DNA parts inside the given container or module.
TCAPIEXPORT tc_items tc_partsUpstream (long o)
 Get all DNA parts upstream of the given part.
TCAPIEXPORT tc_items tc_partsDownstream (long o)
 Get all DNA parts downstream of the given part.
TCAPIEXPORT void tc_alignParts (tc_items a)
 Align the given DNA parts in the order given.
TCAPIEXPORT void tc_alignPartsOnPlasmid (long, tc_items)
 Align the given DNA parts in the order given on the given plasmid.
BEGIN_C_DECLS TCAPIEXPORT tc_items tc_allItems ()
 get all visible items
TCAPIEXPORT tc_items tc_selectedItems ()
 get all selected items
TCAPIEXPORT tc_items tc_itemsOfFamily (const char *family)
 get all items of the given family items
TCAPIEXPORT tc_items tc_itemsOfFamilyFrom (const char *family, tc_items itemsToSelectFrom)
 get subset of items that belong to the given family
TCAPIEXPORT long tc_find (const char *name)
 get the first item with the given name (full name)
TCAPIEXPORT tc_items tc_findItems (tc_strings names)
 get all items with the given names (full names)
TCAPIEXPORT tc_items tc_findItemsUsingRegexp (const char *names)
 get all items with the pattern in their names
TCAPIEXPORT void tc_select (long item)
 select an item
TCAPIEXPORT void tc_deselect ()
 deselect all items
TCAPIEXPORT const char * tc_getName (long item)
 get the name of an item
TCAPIEXPORT const char * tc_getUniqueName (long item)
 get the full name of an item
TCAPIEXPORT void tc_rename (long item, const char *name)
 set the name of an item (not full name)
TCAPIEXPORT tc_strings tc_getNames (tc_items items)
 get the names of several items
TCAPIEXPORT tc_strings tc_getUniqueNames (tc_items items)
 get the full names of several items
TCAPIEXPORT double tc_getY (long item)
 get the x location of an item
TCAPIEXPORT double tc_getX (long item)
 get the y location of an item
TCAPIEXPORT tc_matrix tc_getPos (tc_items items)
 get the y location of a list item. Output is a N x 2 matrix
TCAPIEXPORT void tc_setPos (long item, double x, double y)
 set the x and y location of an item
TCAPIEXPORT void tc_setPosMulti (tc_items items, tc_matrix positions)
 set the x and y location of a list of N items. Input a matrix of positions, with N rows and 2 columns (x,y)
TCAPIEXPORT void tc_moveSelected (double dx, double dy)
 move all the selected items by a given amount
TCAPIEXPORT tc_items tc_getChildren (long o)
 get child items of the given item
TCAPIEXPORT long tc_getParent (long o)
 get parent item of the given item
TCAPIEXPORT double tc_getControlPointX (long connection, long part, int whichPoint)
 get x position of a control point
TCAPIEXPORT double tc_getControlPointY (long connection, long part, int whichPoint)
 get y position of a control point
TCAPIEXPORT void tc_setControlPoint (long connection, long part, int whichPoint, double x, double y)
 set x and y position of a control point
TCAPIEXPORT void tc_setCenterPoint (long connection, double y, double x)
 set x and y position of the central control point
TCAPIEXPORT double tc_getCenterPointX (long connection)
 get x position of the central control point
TCAPIEXPORT double tc_getCenterPointY (long connection)
 get y position of the central control point
TCAPIEXPORT void tc_setLineWidth (long item, double width, int permanent)
 set the line width. Indicate whether the change should be temporary or permanent.

Detailed Description

get selected items or items of a family


Function Documentation

BEGIN_C_DECLS TCAPIEXPORT double ApplySpringForce ( tc_matrix  nodes,
tc_matrix  connections,
double  spring,
double  charge,
double  damping 
)

An algorithm that does automatically calculates the next set of positions for performing force-based auto-layout. Use this if you want to make updates during each iteration.

Parameters:
tc_matrixmatrix with 5 columns - x, y, mass, dx, dy
tc_matrixa square matrix with 1 or 0 indicating a connection form i to j
doublespring constant
doublecharge constant
doubledamping constant
Returns:
double total velocity in the system (use this in the stopping criterion)
TCAPIEXPORT void tc_alignParts ( tc_items  a)

Align the given DNA parts in the order given.

Parameters:
tc_itemsa list of items
TCAPIEXPORT void tc_alignPartsOnPlasmid ( long  ,
tc_items   
)

Align the given DNA parts in the order given on the given plasmid.

Parameters:
longplasmid
tc_itemsa list of items
BEGIN_C_DECLS TCAPIEXPORT tc_items tc_allItems ( )

get all visible items

Returns:
tc_items list of all items in the network
TCAPIEXPORT long tc_find ( const char *  name)

get the first item with the given name (full name)

Parameters:
stringname of an item. use full name whenever possible
Returns:
int address of item with the name
TCAPIEXPORT tc_items tc_findItems ( tc_strings  names)

get all items with the given names (full names)

Parameters:
tc_stringnames of one or more items
Returns:
tc_items addresses of all the items. For nonexistent names, a 0 will be placed in the list
TCAPIEXPORT tc_items tc_findItemsUsingRegexp ( const char *  names)

get all items with the pattern in their names

Parameters:
stringPerl regular expression
Returns:
tc_items addresses of all the items.
TCAPIEXPORT double tc_getCenterPointX ( long  connection)

get x position of the central control point

Parameters:
intaddress of a connection, e.g. obtained using tc_find
Returns:
double x position
TCAPIEXPORT double tc_getCenterPointY ( long  connection)

get y position of the central control point

Parameters:
intaddress of a connection, e.g. obtained using tc_find
Returns:
double y position
TCAPIEXPORT tc_items tc_getChildren ( long  o)

get child items of the given item

Parameters:
intaddress of item
Returns:
tc_items list of child items
TCAPIEXPORT double tc_getControlPointX ( long  connection,
long  part,
int  whichPoint 
)

get x position of a control point

Parameters:
intaddress of a connection, e.g. obtained using tc_find
intaddress of a node, e.g. obtained using tc_find
intindex of the control point related to the given connection and the given node
Returns:
double x position
TCAPIEXPORT double tc_getControlPointY ( long  connection,
long  part,
int  whichPoint 
)

get y position of a control point

Parameters:
intaddress of a connection, e.g. obtained using tc_find
intaddress of a node, e.g. obtained using tc_find
intindex of the control point related to the given connection and the given node
Returns:
double y position
TCAPIEXPORT const char* tc_getName ( long  item)

get the name of an item

Parameters:
intaddress of the item
Returns:
string name (not full name)
TCAPIEXPORT tc_strings tc_getNames ( tc_items  items)

get the names of several items

Parameters:
tc_itemsaddresses of the items
Returns:
tc_string list of names (not full names)
TCAPIEXPORT long tc_getParent ( long  o)

get parent item of the given item

Parameters:
intaddress of item
Returns:
int address of parent item (0 if no parent)
TCAPIEXPORT tc_matrix tc_getPos ( tc_items  items)

get the y location of a list item. Output is a N x 2 matrix

Parameters:
tc_itemsaddresses of items
Returns:
tc_matrix x,y positions of items
TCAPIEXPORT const char* tc_getUniqueName ( long  item)

get the full name of an item

Parameters:
intaddress of the item
Returns:
string full name of the item (always unique)
TCAPIEXPORT tc_strings tc_getUniqueNames ( tc_items  items)

get the full names of several items

Parameters:
tc_itemsaddresses of the items
Returns:
tc_string list of names (unique names)
TCAPIEXPORT double tc_getX ( long  item)

get the y location of an item

Parameters:
intaddress of item
Returns:
double y position
TCAPIEXPORT double tc_getY ( long  item)

get the x location of an item

Parameters:
intaddress of item
Returns:
double x position
TCAPIEXPORT tc_items tc_itemsOfFamily ( const char *  family)

get all items of the given family items

Parameters:
stringname of a type
Returns:
tc_items list of all items in network belonging under the given type
TCAPIEXPORT tc_items tc_itemsOfFamilyFrom ( const char *  family,
tc_items  itemsToSelectFrom 
)

get subset of items that belong to the given family

Parameters:
stringname of a type
tc_itemslist of items to select from
Returns:
tc_items list of all items in the list belonging under the given type
TCAPIEXPORT void tc_moveSelected ( double  dx,
double  dy 
)

move all the selected items by a given amount

Parameters:
doublechange in x
doublechange in y
TCAPIEXPORT tc_items tc_partsDownstream ( long  o)

Get all DNA parts downstream of the given part.

Parameters:
intaddress of an item in the network
BEGIN_C_DECLS TCAPIEXPORT tc_items tc_partsIn ( long  o)

Get all DNA parts inside the given container or module.

Parameters:
intaddress of an item in the network
TCAPIEXPORT tc_items tc_partsUpstream ( long  o)

Get all DNA parts upstream of the given part.

Parameters:
intaddress of an item in the network
TCAPIEXPORT void tc_rename ( long  item,
const char *  name 
)

set the name of an item (not full name)

Parameters:
intaddress of item
Returns:
string new name (not full name)
TCAPIEXPORT void tc_select ( long  item)

select an item

Parameters:
intaddress of the item
TCAPIEXPORT tc_items tc_selectedItems ( )

get all selected items

Returns:
tc_items list of all items currently selected by user
TCAPIEXPORT void tc_setCenterPoint ( long  connection,
double  y,
double  x 
)

set x and y position of the central control point

Parameters:
intaddress of a connection, e.g. obtained using tc_find
doublex position
doubley position
TCAPIEXPORT void tc_setControlPoint ( long  connection,
long  part,
int  whichPoint,
double  x,
double  y 
)

set x and y position of a control point

Parameters:
longthe connection
longthe node that is associated with the particular curve of interest
intthe index of the point on that curve of interest
doublex value
doubley value
TCAPIEXPORT void tc_setLineWidth ( long  item,
double  width,
int  permanent 
)

set the line width. Indicate whether the change should be temporary or permanent.

Parameters:
intaddress of a connection, e.g. obtained using tc_find
doubleline width
int0 (temporary change) or 1 (permanent change)
TCAPIEXPORT void tc_setPos ( long  item,
double  x,
double  y 
)

set the x and y location of an item

Parameters:
intaddress of item
doublex position
doubley position
TCAPIEXPORT void tc_setPosMulti ( tc_items  items,
tc_matrix  positions 
)

set the x and y location of a list of N items. Input a matrix of positions, with N rows and 2 columns (x,y)

Parameters:
tc_itemsaddresses of items
tc_matrixx,y positions
 All Data Structures