MorphoNet API

Download the MorphoNet python API from here

 Class for python interaction with MorphoNet 
 Connects to MorphoNet with user credentials 
 Lists all datasets owned by user, or all datasets the user has access rights to. 
 Creates a new dataset by specifying its name, its initial and final timepoints (0 if no time information is available) and its type.
Available NCBI Taxonomy id can be found directly on the website.
The id_type correspond to 0:Observed Data, 1:Simulated Data, 2:Drawing Data. 
 Example of the NCBI Taxonomy exploration avaible from the parameters for each dataset.
The NCBI Taxonomy id can be found at the right side of the tree
 Provided the user has access rights, selects a dataset either by specidic id or by dataset name. 
 Once a dataset is selected, and if user is the owner of the specific dataset, updates dataset structures after erasing previous ones.

 User can modify dataset name, initial and final time points and type. 

 Once a dataset is selected, and if user has the right to do so, he/she can

 upload a text description of the dataset to be shown in the MorphoNet application interface;

 delete the dataset;

 erase all meshes and related information associated to the dataset. 

 Once a dataset is selected, uploads surface mesh to the server and associates them to the selected dataset at time t,

 either uploading objects one by one or by sending all objects to the server at once.

 obj is the path to the .obj file containing the mesh of all objects at time t.

 User can upload several mesh qualities or visualisation channels to the same dataset by changing the "quality" or "channel" information. 

 Once a dataset is selected, the first function permits to extract the number of triangles composing the surface mesh of dataset at timepoint t, for a selected mesh quality and dataset channel;

 the second function permits to selectively erase the surface mesh associated to the selected timepoint, mesh quality and dataset channel 

  Once a dataset is selected and if the user has the right to do so, returns in .obj format the surface mesh corresponding to time t associated to the specified quality and channel.  
 
Infos are additional information associated to a dataset. They exist in several different categories (InfosTypes).

 showInfosType lists all possible infos categories used by MorphoNet, together with their specific format.

 Click here for help with specific information formats

  Once a dataset has been selected, users can:

  list all infos they have access rights to;

  upload a new info, by specifying its name and by employing the standard MorphoNet info format (Click here for help with specific information formats);

  delete previously uploaded infos, selected either by name or by ID;

  download and visualise an info, selected either by name or by ID

  Once a dataset has been selected, these two functions return, for an information selected either by ID or by name, a python dictionary with dataset objects as keys and the corresponding information value as values  
  Returns name, surname and username (getGuyByID) or user ID number (getGuyByName) of users specified either by ID number or by username  
   
 How to use the API for upload: example 
 Connect to MorphoNet with your credentials
 
New dataset creation:

 Creates a new dataset or, if a dataset with the same name already exists, selects it and clears it (if the user has the right to do so)  

 
Dataset upload:

 For a timestack, select the first (begin) and the last (end) time point to be uploaded.

 Give, for each time point, the path to the .obj file to be uploaded

 If no time information is given in the dataset, set begin=0 and end=0

 
Mesh format:

 Users must upload surface meshes as .obj files.

 Each .obj must contain vertices, faces, time and id of each object present at a given time point.

 Time index and object id are specified as, for instance, .

 Each elementary object is identified by the time index at which it exists and its specific id at each given time (for instance g 4 cell_7, meaning object 7 at time 4), followed by the list of coordinates of its vertices and the list of faces composed of three vertices (each vertex being numbered starting from 1).

 For multiple objects, please note that the numbering of vertices to be used in specifying each face is global and does not start from 1 for each new object.

 In the example provided in figure, the object with id 6 at time 4 is composed of 4 vertices and 2 faces, while object with id 7 at time 4 is composed of 5 vertices and 3 faces.

 
Information upload:

 Users must upload information on datasets under the general format specified in the general help.

 Users must specify the specific information type (time, space, float, string, group, selection, color, dict, sphere, vector)

 To each object id at any given time, users can associate a property and upload the list of such properties to be visualised on dataset.

 It is not necessary to give a property value to each object in the dataset. Objects not given to any property value will not be specifically marked in colour or text.

 
Information format:

 Example of information format. A quantitative property is associated to cells 1 and 2 at time 1 and in channel 0, to cell 3 at time 1 and channel 1, to cell 1 at time 2 and channel 1 and to cell 7 at time 2 and channel 0.