CINXE.COM

wwPDB: OneDep Validation API

<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="description" content="wwPDB: Worldwide Protein Data Bank"> <meta name="author" content="wwPDB.org"> <link rel="shortcut icon" href="/favicon.ico"> <link href="/css/bootstrap-v3.1.1.min.css" rel="stylesheet"> <link href="/tools/font-awesome-4.4.0/css/font-awesome.min.css" rel="stylesheet"> <link href="/css/wwPDB.css?v=4" rel="stylesheet"> <link href='https://fonts.googleapis.com/css?family=Exo+2:600' rel='stylesheet' type='text/css'> <link href='https://fonts.googleapis.com/css?family=Roboto:300, 400,500,700' rel='stylesheet' type='text/css'> <link href='https://fonts.googleapis.com/css?family=Petit+Formal+Script' rel='stylesheet' type='text/css'> <!-- Global site tag (gtag.js) - Google Analytics --> <script async src="https://www.googletagmanager.com/gtag/js?id=G-5ED0CQCXV6"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-5ED0CQCXV6'); </script> <title>wwPDB: OneDep Validation API</title> </head> <body> <nav id='wwpdb-nav' class='navbar navbar-fixed-top hidden-print'> <div class='container'> <div class='navbar-header'> <div class='pull-left wwpdb-logo'> <a class='brand hidden-desktop' href='/'> <img src='https://cdn.rcsb.org/wwpdb/img/core/wwpdb-logo.png'></a> </div> <button type='button' data-toggle='collapse' data-target='#navbar' aria-expanded='false' aria-controls='navbar' class='navbar-toggle collapsed'> <span class='sr-only'>Toggle navigation</span> <span class='icon-bar'></span> <span class='icon-bar'></span> <span class='icon-bar'></span> </button> </div> <div id='navbar' class='collapse navbar-collapse'> <ul class='nav navbar-nav pull-right'> <li class='dropdown'> <a href='#' class='dropdown-toggle' data-toggle='dropdown'>Validation <b class='caret'></b></a> <ul class='dropdown-menu'> <li><a href='/validation/validation-reports' >Validation Reports</a></li> <li><a href='/validation/validation-servers' >Validation Servers</a></li> <li><a href='/validation/onedep-validation-web-service-interface' >OneDep Validation API</a></li> </ul> </li> <li class='dropdown'> <a href='#' class='dropdown-toggle' data-toggle='dropdown'>Deposition <b class='caret'></b></a> <ul class='dropdown-menu'> <li><a href='http://deposit.wwpdb.org/deposition/' target='_blank'>Deposit Structure</a></li> <li><a href='/deposition/system-information' >System Information</a></li> <li><a href='/deposition/tutorial' >Tutorial</a></li> <li><a href='/deposition/faq' >FAQ</a></li> <li><a href='/deposition/deposition-resources' >All Deposition Resources</a></li> </ul> </li> <li class='dropdown'> <a href='#' class='dropdown-toggle' data-toggle='dropdown'>Dictionaries <b class='caret'></b></a> <ul class='dropdown-menu'> <li><a href='http://mmcif.wwpdb.org' target='_blank'>PDBx/mmCIF</a></li> <li><a href='/data/ccd' >Chemical Component Dictionary</a></li> <li><a href='/data/bird' >Biologically Interesting Molecule Reference Dictionary (BIRD)</a></li> </ul> </li> <li class='dropdown'> <a href='#' class='dropdown-toggle' data-toggle='dropdown'>Documentation <b class='caret'></b></a> <ul class='dropdown-menu'> <li><a href='/documentation/new-format-for-pdb-ids' >Extended PDB ID With 12 Characters</a></li> <li><a href='/documentation/file-format' >File Format</a></li> <li><a href='/documentation/biocuration' >Deposition & Biocuration Policies</a></li> <li><a href='/documentation/remediation' >Remediation</a></li> <li><a href='/documentation/journals' >Instructions to Journals</a></li> </ul> </li> <li class='dropdown'> <a href='#' class='dropdown-toggle' data-toggle='dropdown'>Task Forces <b class='caret'></b></a> <ul class='dropdown-menu'> <li><a href='/task/validation-task-forces' >Validation Task Forces</a></li> <li><a href='/task/xray' >X-Ray Validation</a></li> <li><a href='/task/nmr' >NMR Validation</a></li> <li><a href='/task/em' >EM Validation</a></li> <li><a href='/task/sas' >Small Angle Scattering (SAS)</a></li> <li><a href='/task/mmcif' >PDBx/mmCIF Working Group</a></li> <li><a href='/task/hybrid' >Hybrid/Integrative Methods</a></li> <li><a href='/task/ligand-validation-workshop' >Ligand Validation Workshop</a></li> <li><a href='/task/modelcif' >ModelCIF Working Group</a></li> </ul> </li> <li class='dropdown'> <a href='#' class='dropdown-toggle' data-toggle='dropdown'>Downloads <b class='caret'></b></a> <ul class='dropdown-menu'> <li><a href='/ftp/pdb-ftp-sites' >PDB Archive</a></li> <li><a href='/ftp/pdb-versioned-ftp-site' >PDB Versioned Archive</a></li> <li><a href='/ftp/pdb-nextgen-archive-site' >PDB NextGen Archive </a></li> </ul> </li> <li class='dropdown'> <a href='#' class='dropdown-toggle' data-toggle='dropdown'>Statistics <b class='caret'></b></a> <ul class='dropdown-menu'> <li><a href='/stats/deposition' >Deposition Statistics</a></li> <li><a href='/stats/download' >Download Statistics</a></li> </ul> </li> <li class='dropdown'> <a href='#' class='dropdown-toggle' data-toggle='dropdown'>About <b class='caret'></b></a> <ul class='dropdown-menu'> <li><a href='/about/contact' >Contact Us</a></li> <li><a href='/about/cite-us' >Cite Us</a></li> <li><a href='/about/publications' >Publications</a></li> <li><a href='/about/advisory' >Advisory Committee</a></li> <li><a href='/about/agreement' >Agreement</a></li> <li><a href='/about/outreach' >Outreach</a></li> <li><a href='/about/faq' >FAQ</a></li> <li><a href='/about/privacy' >Privacy</a></li> <li><a href='/about/usage-policies' >Usage Policies</a></li> <li><a href='/pdb50' >PDB50</a></li> </ul> </li> <li class='wwpdb-foundation-logo'><a href='http://foundation.wwpdb.org/' target='_blank'> <img src='https://cdn.rcsb.org/wwpdb/img/core/wwpdb-foundation-logo-sm.png'></a> </li> </ul> </div> </nav> <div class="container belowFold"> <div class="col-md-3 hidden-print"> <ul class='nav nav-list wwpdb-sidenav'> <li class='menu-title'>Validation</li> <li ><a href='/validation/validation-reports' ><i class='glyphicon glyphicon-chevron-right' style='color:#888'></i> Validation Reports</a></li> <li ><a href='/validation/validation-servers' ><i class='glyphicon glyphicon-chevron-right' style='color:#888'></i> Validation Servers</a></li> <li class='active'><a href='/validation/onedep-validation-web-service-interface' ><i class='glyphicon glyphicon-chevron-right' style='color:#888'></i> OneDep Validation API</a></li> </ul> </div> <div class="col-md-9"> <div class="wwpdb-content"> <!-- BEGIN CONTENT--> <style> code { color: #333; font-family: "Courier New"; font-weight: bold; background-color: #fff; } table { margin: 20px 0; border-collapse: true; } th, td { padding: 4px 10px; border: 1px solid #fff; } th { background-color: #eee; } </style> <h1>OneDep Validation Web Service Interface</h1> <div id="TOC"> <ul> <li><a href="#introduction">Introduction</a></li> <li><a href="#installation">Installation</a></li> <li> <a href="#command-line-usage">Command Line Usage</a> <ul> <li> <a href="#start-a-new-session">Start a new session</a> <ul> <li><a href="#upload-data">Upload data</a></li> </ul> </li> <li><a href="#run-validation">Run validation</a></li> <li><a href="#retrieving-results">Retrieving results</a></li> </ul> </li> <li> <a href="#python-api">Python API</a> <ul> <li><a href="#registration">Registration</a></li> <li><a href="#validation">Validation</a></li> </ul> </li> </ul> </div> <!-- cut and paste md content here --> <a class="anchor" name="introduction"></a> <h3 class="underline"> Introduction </h3> <p> The OneDep validation web service was developed as a wwPDB effort to augment the stand alone <a href="https://validate.wwpdb.org"> validation server </a> by providing a programmatic remote access to such services. </p> <p> This service is provided as a Python package. Once installed, access is provided using a command line client or pragmatically using a Python API. </p> <a class="anchor" name="installation"></a> <h3 class="underline"> Installation </h3> <p> Installation is via the program <a href="https://pypi.python.org/pypi/pip"> pip </a> . </p> <div class="codehilite"> <pre><span></span>pip install onedep_api </pre> </div> <a class="anchor" name="command-line-usage"></a> <h3 class="underline"> Command Line Usage </h3> <p> A binary script is installed called <code> onedep_validate_cli </code> which is a front end that invokes the packages APIs. </p> <p> Example scripts that utilize the client and API can be found <a href="https://cdn.rcsb.org/wwpdb/docs/examples-installed.tar.gz"> here </a> . </p> <a class="anchor" name="start-a-new-session"></a> <h4> Start a new session </h4> <p> You must start a new session. The system keeps track of the current working session in the file <code> ~/.onedep_current_session </code> This can be changed with the <em> --session_file </em> argument. </p> <div class="codehilite"> <pre><span></span>onedep_validate_cli --new_session </pre> </div> <a class="anchor" name="upload-data"></a> <h5> Upload data </h5> <p> The validation API supports a limited number of file types and formats. To upload a file, you need to specify the file type with the <em> filetype </em> from the following table. </p> <table> <thead> <tr> <th> Data file </th> <th> Format </th> <th> filetype </th> </tr> </thead> <tbody> <tr> <td> model </td> <td> PDBx/mmCIF </td> <td> model </td> </tr> <tr> <td> structure factor </td> <td> mmCIF </td> <td> structure-factors </td> </tr> <tr> <td> NMR chemical shifts </td> <td> mmCIF </td> <td> nmr-chemical-shifts </td> </tr> <tr> <td> NMR restraints </td> <td> any </td> <td> nmr-restraints </td> </tr> <tr> <td> EM map </td> <td> CCP4 map </td> <td> em-volume </td> </tr> <tr> <td> NMRstar combined data </td> <td> NMRstar </td> <td> nmr-data-str </td> </tr> <tr> <td> NEF combined data </td> <td> NMRstar </td> <td> nmr-data-nef </td> </tr> </tbody> </table> <p> PDBx/mmCIF formatted files are available from REFMAC and Phenix, or can be created by using <a href="http://pdb-extract.wwpdb.org"> pdb_extract </a> . MTZ to mmCIF conversion can be performed with <a href="http://sf-tool.wwpdb.org/"> sf-tool </a> or in CCP4 with <code> mtz2various </code> . </p> <div class="codehilite"> <pre><span></span>onedep_validate_cli --input_file &lt;filename&gt; --input_type &lt;filetype&gt; </pre> </div> <p> Repeat until all files are uploaded. </p> <a class="anchor" name="run-validation"></a> <h4> Run validation </h4> <p> Initiate the validation with the command: </p> <div class="codehilite"> <pre><span></span>onedep_validate_cli --validate </pre> </div> <p> You can periodically check if the validation is running or complete with the command: </p> <div class="codehilite"> <pre><span></span>onedep_validate_cli --status </pre> </div> <p> or if you would like a value of 0 or 1: </p> <div class="codehilite"> <pre><span></span>onedep_validate_cli --test_complete </pre> </div> <a class="anchor" name="retrieving-results"></a> <h4> Retrieving results </h4> <p> When complete, you can retrieve the results of the validation </p> <div class="codehilite"> <pre><span></span>onedep_validate_cli --output_file &lt;pdf file&gt; --output_type validation-report-full onedep_validate_cli --output_file &lt;xml file&gt; --output_type validation-data </pre> </div> <a class="anchor" name="python-api"></a> <h3 class="underline"> Python API </h3> <p> The Python API was developed to provide simple access to the web validation services in a programmatic manner. </p> <a class="anchor" name="validation"></a> <h4> Validation </h4> <p> The Validate class provides access to all services, from session creation, file upload and download, calculation initiation and status retrieval. </p> <div class="codehilite"> <pre>from onedep import __apiUrl__ from onedep.api.Validate import Validate import time def displayStatus(sD, exitOnError=True): if 'onedep_error_flag' in sD and sD['onedep_error_flag']: print("OneDep error: %s\n" % sD['onedep_status_text']) if exitOnError: raise SystemExit() else: if 'status' in sD: print("OneDep status: %s\n" % sD['status']) # Given: # modelFilePath contains the path to the model file # sfFilePath contains the path to the structure factor file val = Validate(apiUrl=__apiUrl__) rD = val.newSession() displayStatus(rD) rD = val.inputModelXyzFile(modelFilePath) rD = val.inputStructureFactorFile(sfFilePath) displayStatus(rD) rD = val.run() displayStatus(rD) # # Poll for service completion - # it = 0 sl = 2 while (True): # Pause - it += 1 pause = it * it * sl time.sleep(pause) rD = val.getStatus() if rD['status'] in ['completed', 'failed']: break print("[%4d] Pausing for %4d (seconds)\n" % (it, pause)) # # lt = time.strftime("%Y%m%d%H%M%S", time.localtime()) fnR = "xray-report-%s.pdf" % lt rD = val.getReport(fnR)</pre> </div> <!-- END cut and paste md content here --> <!-- END CONTENT--> </div> </div> </div> <br> <footer class="footer"> <div class="container-fluid hidden-print" style="position: relative;"> <div class="row topFooter tinyPad"> <div class="ScreenLimitFooter"> <div class="col-sm-4"> <div class="smallMarginTop"> <a href="https://www.facebook.com/pages/Worldwide-PDB/223648640998643" target="_blank"><img src="https://cdn.rcsb.org/wwpdb/img/core/facebook.png" width="24" height="24"></a> <a href="https://www.youtube.com/channel/UCgM7zpapumhWHDMV11FIz0Q" target="_blank"><img src="https://cdn.rcsb.org/wwpdb/img/core/youtube-logo.png" width="24" height="24"></a> <a href="#"><img alt="RSS Feed for the Latest News" src="https://cdn.rcsb.org/wwpdb/img/core/rss.png" width="24" height="24"></a> <a href="mailto: info@wwpdb.org"><img src="https://cdn.rcsb.org/wwpdb/img/core/mail.png" width="24" height="24"></a> </div> <div class="smallMarginTop"> <a href="/news/news.php"> <p><a href="/news/news.php">News & Announcements</a></p> </a> </div> <div> <p><a href="https://lists.wwpdb.org/list/pdb-l.lists.wwpdb.org">Community Bulletin Board</a></p> </div> <div><a class='brand hidden-desktop' href='http://foundation.wwpdb.org/' target='_blank'><img src="https://cdn.rcsb.org/wwpdb/img/core/wwpdb-foundation-logo.png" class="logoLimit smallMarginTop"></a></div> </div> <div class="col-sm-4"> <div class="tinyMarginTop"> <h4><a class="h4-link" href="/download/downloads.php">Download Archive</a></h4> </div> <div class="smallMarginTop"> <a href="https://files.wwpdb.org/pub/pdb/">RCSB PDB</a> | <a href="https://ftp.ebi.ac.uk/pub/databases/pdb/">PDBe</a> | <a href="https://ftp.pdbj.org/pub/pdb/">PDBj</a> <br> <a href="/download/downloads.php">Instructions</a> </div> <div class="row"> <div class="col-sm-4"> <div class="tinyMarginTop"> <h4>Archive Snapshots</h4> </div> <div class="smallMarginTop"> <a href="https://s3snapshots.rcsb.org">RCSB PDB (https)</a> | <a href="ftp://snapshots.pdbj.org/">PDBj</a> </div> </div> <!-- <div class="col-sm-8"> <div class="col-sm-4"> <a class='img-responsive' href='http://www.CoreTrustSeal.org' target='_blank'><img src="https://cdn.rcsb.org/wwpdb/img/homepage/CoreTrustSeal-logo-transparent-small.png" width="75"></a> </div> <div class="col-sm-4"> <a class='img-responsive' href='https://globalbiodata.org/' target='_blank'><img src="https://cdn.rcsb.org/wwpdb/img/homepage/GCBR-Logo-RGB.png" width="125" style="margin-top:9px;"></a> </div> </div> --> </div> </div> <div class="col-sm-3"> <h4> Cite wwPDB: </h4> <div class="smallMarginTop"> <em>Nature Structural Biology</em> <strong>10</strong>, 980 (2003)<br> <a href="http://dx.doi.org/10.1038/nsb1203-980" target="_blank">doi: 10.1038/nsb1203-980</a> <p class="tinyMarginTop"><a href="/about/publications.php">More publications</a></p> </div> </div> <div class="row" style="padding: 40px 0px 10px 10px"> <div class="col-sm-7"> <div class="tinyPad"> <h4>wwPDB Members:</h4> </div> <div class="col-sm-2 tinyPad"><a href="https://www.rcsb.org/" target="blank"><img src="https://cdn.rcsb.org/wwpdb/img/core/rcsb-pdb.png" class="logoLimit img-responsive"></a></div> <div class="col-sm-2 tinyPad"><a href="https://www.ebi.ac.uk/pdbe/" target="blank"><img src="https://cdn.rcsb.org/wwpdb/img/core/pdbe.png" class="logoLimit img-responsive"></a></div> <div class="col-sm-2 tinyPad"><a href="http://bmrb.io/" target="blank"><img src="https://cdn.rcsb.org/wwpdb/img/core/bmrb.png" class="logoLimit img-responsive"></a></div> <div class="col-sm-2 tinyPad"><a href="https://www.pdbj.org/" target="blank"><img src="https://cdn.rcsb.org/wwpdb/img/core/pdbj.png" class="logoLimit img-responsive"></a></div> <div class="col-sm-2 tinyPad"><a href="https://www.ebi.ac.uk/pdbe/emdb/" target="blank"><img src="https://cdn.rcsb.org/wwpdb/img/core/emdb.png" class="logoLimit img-responsive"></a></div> </div> <div class="col-sm-1"><br></br></div> <div class="col-sm-4"> <div class="row"> <div class="col-xs-6"> <a href='http://www.CoreTrustSeal.org' target='_blank'><img src="https://cdn.rcsb.org/wwpdb/img/homepage/CoreTrustSeal-logo-transparent-small.png" class='img-responsive seal' style="border-right: 1px solid #666; padding-right: 50px"/></a> </div> <div class="col-xs-6"> <a href='https://globalbiodata.org/' target='_blank'><img src="https://cdn.rcsb.org/wwpdb/img/homepage/GCBR-Logo-RGB.png" class='img-responsive seal'/></a> </div> </div> </div> </div> </div> <div class="row bottomFooter"> &copy; wwPDB </div> </div> </footer> <!-- Placed at the end of the document so the pages load faster --> <script type="text/javascript" src="/js/jquery-2.1.0.min.js"></script> <script type="text/javascript" src="/js/bootstrap-3.1.1.min.js"></script> <script type="text/javascript" src="/js/NavbarControl.js?v2"></script> <script> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-62256915-1', 'auto'); ga('send', 'pageview'); </script> </body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10