You are here: Home V2 Software Software More ... Developer Notes CcpNmr FormatConverter Wim on FormatConverter

Wim on FormatConverter

Info on FC. Wim Vranken on leaving UK.

Code for determining file types.

There is a relatively sophisticated wrapper around the lower level FC code available - this was originally written for the web FC version and then extended. It's a class called FormatConversion which lives in python/ccpnmr/format/general/Conversion.py.

A quick example of how you could use this:

from ccpnmr.format.general.Conversion import FormatConversion

# This will create a new CCPN project, there are other input options, see class.
formatConversion = FormatConversion(ccpnProjectName='test')

# You can loop over the dataTypes as well and pool the data
dataType = 'coordinates'
filePath = 'myFile.pdb'

formatNameSuggestions = formatConversion.determineFormatNamesForFile(dataType,filePath)

# Clearly have to let user decide here, but just as example...
if formatNameSuggestions:
formatConversion.importFile(dataType,formatNameSuggestions[0],filePath)

The main code that uses this approach is the chemical shift/coordinate importer code in python/pdbe/deposition/dataFileImport/, notably formatConverterWrapper.py.

It is also possible to preparse files with the formatConversion object, and map the dimensions from an imported peak list to the dimensions for the NMR reference experiment (based on chemical shift values).

 

Code for web version of FormatConverter.


This is all in the ccpnmrweb repository, Wayne/Alan are the best people to talk to about the overall organisation. The web FC uses the FormatConversion (see above), the Django code was written under Chris Spronk's supervision.

Everything is installed on mammoth, info below

Test version:

    http://test.ccpn.ac.uk/fcweb/

    Code (user webapps) in /prg/webapps/test/
    ** Need to set CCPNMR_TOP_DIR, PYTHONPATH!**

Live version:

    http://webapps.ccpn.ac.uk/fcweb/
   
    Code (user ccpn) in /home/ccpn/

Apache log files:

/var/log/apache2/