Web Service

A RESTful web service interface is provided so that you can use the mouse map converter programmatically. In order to do this you need to send an HTTP POST to http://churchill-lab.jax.org/mousemapconverter/api/convert. In the header of the post you should have "Content-Type" and "Accept" both set to "application/json".
Input
The JSON object should be formatted as follows:
includeErrors (optional, defaults to True)
If True than errors that occur for any individual entry will be included in the results section of the JSON response.
includeExtra (optional, defaults to True)
If True than errors messages will be included in the extra section in the JSON response.
includeInput (optional, defaults to True)
If True than the input is included in the output in the results section of the JSON response.
fromUnit (required)
The unit to convert the data from.

This should be one of:
  • averageShifmanMap (Sex-Averaged cM - Cox)
  • femaleShifmanMap (Female cM - Cox)
  • maleShifmanMap (Male cM - Cox)
  • averageG2F1Map (Sex-Averaged cM - G2F1)
  • femaleG2F1Map (Female cM - G2F1)
  • maleG2F1Map (Male cM - G2F1)
  • mm9 (NCBI Build 37 Base Pairs (bp))
  • mm10 (GRCm38 Base Pairs (bp))
  • snps (SNP)
  • genes (Ensembl Gene ID)
toUnit (required)
The unit to convert data to.

This should be one of:
  • averageShifmanMap (Sex-Averaged cM - Cox)
  • femaleShifmanMap (Female cM - Cox)
  • maleShifmanMap (Male cM - Cox)
  • averageG2F1Map (Sex-Averaged cM - G2F1)
  • femaleG2F1Map (Female cM - G2F1)
  • maleG2F1Map (Male cM - G2F1)
  • mm9 (NCBI Build 37 Base Pairs (bp))
  • mm10 (GRCm38 Base Pairs (bp))
  • snps (SNP)
  • genes (Ensembl Gene ID)
dataToConvert (required)
An array of coordinates or IDs to convert from fromUnit to toUnit. If fromUnit is genes or snps than all that is needed for input is an ID, otherwise a chromosome and position are expected. Optionally, a second position can be included.

For example, if fromUnit is genes or snps:

                                dataToConvert: ['rs123456', 'rs2323212', 'rs2133232']
                            
If fromUnit is NOT genes or snps:

                                dataToConvert: [
                                    ['1', 10000234],
                                    ['2', 10320871 1032198],
                                    ['X', 9176013],
                                    ['10', 1223422]
                                ]
                            
Output
The JSON response will consist of data corresponding to the includeErrors, includeExtras, includeInput, and fromUnit.

The base response will include a results section. This section will be an array of the converted inputs. If includeInput is True the first members of the result array will be the input followed by the conversion results. If includeError is True than the value will include values even if the data could not be converted.

If includeExtras is True, a section called extras will be in the JSON response which will include an array of arrays, with each array member being an array with the input elements followed by an error message of why this entry could not be converted.

Examples

Python Example 1
Here is an example script written in Python that shows how you can use this service to convert Ensembl Gene IDs:
Python Example 2
Here is an example script written in Python that shows how you can use this service to convert SNP IDs:
Python Example 3
Here is an example script written in Python that shows how you can use this service to convert mm10 based coordinates:
curl Example
Here is an example curl command that shows how you can use this service:
curl -X POST -H "Content-Type: application/json" -d '{"fromUnit":"mm10", "toUnit":"maleG2F1Map", "dataToConvert":[['1', 12000000, 12500000]]}' http://churchill-lab.jax.org/mousemapconverter/api/convert
Please send questions or comments to mousemapconverter@jax.org