<!DOCTYPE html>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Analysis of antibody structures — VDJ_structure_analysis • Platypus</title><!-- favicons --><link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png"><link rel="icon" type="image/png" sizes="32x32" href="../favicon-32x32.png"><link rel="apple-touch-icon" type="image/png" sizes="180x180" href="../apple-touch-icon.png"><link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png"><link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png"><link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png"><!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script><!-- Bootstrap --><link href="https://cdnjs.cloudflare.com/ajax/libs/bootswatch/3.4.0/yeti/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous"><script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script><!-- bootstrap-toc --><link rel="stylesheet" href="../bootstrap-toc.css"><script src="../bootstrap-toc.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- pkgdown --><link href="../pkgdown.css" rel="stylesheet"><script src="../pkgdown.js"></script><meta property="og:title" content="Analysis of antibody structures — VDJ_structure_analysis"><meta property="og:description" content="VDJ_structure_analysis is a Platypus function for the analysis of 3d structures of antibodies.
The function is designed in a way to be a follow up of the alphafold_prediction function of the Platypus package.
The input of this function is a list that has the VDJ MIXCR output in its first element and a list of structures in its second element.
This is the output format of the alphafold_prediction function. The function can also be used to visualize structures from PDB files directly.
The function can visualize the structures of proteins and is especially designed for visualization of antibodies, where the
framework and CDR regions are automatically annotated. If the antibody was predicted together with a antigen, the function can visualize
binding interaction and detect the binding site residues. Furthermore, it can determine binding site metrics as average distance and model accuracy.
The function has a variety of arguments to create the desired visualization."><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]--></head><body data-spy="scroll" data-target="#toc">
    

    <div class="container template-reference-topic">
      <header><div class="navbar navbar-default navbar-fixed-top" role="navigation">
  <div class="container">
    <div class="navbar-header">
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <span class="navbar-brand">
        <a class="navbar-link" href="../index.html">Platypus</a>
        <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">3.4.1</span>
      </span>
    </div>

    <div id="navbar" class="navbar-collapse collapse">
      <ul class="nav navbar-nav"><li>
  <a href="../index.html">
    <span class="fa fa-home fa-lg"></span>
     
  </a>
</li>
<li>
  <a href="../articles/quickstart.html">Get started</a>
</li>
<li>
  <a href="../vignette_index.html">Vignettes</a>
</li>
<li>
  <a href="../PlatypusDB_index.html">PlatypusDB</a>
</li>
<li>
  <a href="../reference/index.html">Functions</a>
</li>
<li>
  <a href="../news/index.html">News</a>
</li>
<li class="dropdown">
  <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
    Other Packages
     
    <span class="caret"></span>
  </a>
  <ul class="dropdown-menu" role="menu"><li>
      <a href="https://immunesim.readthedocs.io/en/latest/" class="external-link">ImmuneSIM</a>
    </li>
  </ul></li>
<li>
  <a href="../cute_monotremes.html">Cute Monotremes</a>
</li>
      </ul><ul class="nav navbar-nav navbar-right"><li>
  <a href="https://twitter.com/alexyermanos" class="external-link">
    <span class="fa fa-twitter"></span>
     
  </a>
</li>
<li>
  <a href="https://twitter.com/KreineVic" class="external-link">
    <span class="fa fa-twitter"></span>
     
  </a>
</li>
<li>
  <a href="https://github.com/alexyermanos/Platypus" class="external-link">
    <span class="fa fa-github"></span>
     
  </a>
</li>
      </ul></div><!--/.nav-collapse -->
  </div><!--/.container -->
</div><!--/.navbar -->

      

      </header><div class="row">
  <div class="col-md-9 contents">
    <div class="page-header">
    <h1>Analysis of antibody structures</h1>
    <small class="dont-index">Source: <a href="https://github.com/alexyermanos/Platypus/tree/masterR/VDJ_structure_analysis.R" class="external-link"><code>R/VDJ_structure_analysis.R</code></a></small>
    <div class="hidden name"><code>VDJ_structure_analysis.Rd</code></div>
    </div>

    <div class="ref-description">
    <p>VDJ_structure_analysis is a Platypus function for the analysis of 3d structures of antibodies.
The function is designed in a way to be a follow up of the alphafold_prediction function of the Platypus package.
The input of this function is a list that has the VDJ MIXCR output in its first element and a list of structures in its second element.
This is the output format of the alphafold_prediction function. The function can also be used to visualize structures from PDB files directly.</p>
<p>The function can visualize the structures of proteins and is especially designed for visualization of antibodies, where the
framework and CDR regions are automatically annotated. If the antibody was predicted together with a antigen, the function can visualize
binding interaction and detect the binding site residues. Furthermore, it can determine binding site metrics as average distance and model accuracy.
The function has a variety of arguments to create the desired visualization.</p>
    </div>

    <div id="ref-usage">
    <div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">VDJ_structure_analysis</span><span class="op">(</span></span>
<span>  <span class="va">VDJ.structure</span>,</span>
<span>  <span class="va">cells.to.vis</span>,</span>
<span>  <span class="va">rank</span>,</span>
<span>  <span class="va">rank.list</span>,</span>
<span>  <span class="va">overlay</span>,</span>
<span>  <span class="va">PDB.file</span>,</span>
<span>  <span class="va">spin.speed</span>,</span>
<span>  <span class="va">color.frameworks</span>,</span>
<span>  <span class="va">color.cdr3</span>,</span>
<span>  <span class="va">color.cdr2</span>,</span>
<span>  <span class="va">color.cdr1</span>,</span>
<span>  <span class="va">VDJ.anno</span>,</span>
<span>  <span class="va">label</span>,</span>
<span>  <span class="va">label.size</span>,</span>
<span>  <span class="va">bk.opac</span>,</span>
<span>  <span class="va">font.opac</span>,</span>
<span>  <span class="va">font.col</span>,</span>
<span>  <span class="va">anno.seq</span>,</span>
<span>  <span class="va">color.molecule</span>,</span>
<span>  <span class="va">color.sheets</span>,</span>
<span>  <span class="va">color.helix</span>,</span>
<span>  <span class="va">angle.x</span>,</span>
<span>  <span class="va">angle.y</span>,</span>
<span>  <span class="va">angle.z</span>,</span>
<span>  <span class="va">r3dmol.code</span>,</span>
<span>  <span class="va">plddt.plot</span>,</span>
<span>  <span class="va">structure.plot</span>,</span>
<span>  <span class="va">antigen.interaction</span>,</span>
<span>  <span class="va">binding.site.cutoff</span>,</span>
<span>  <span class="va">dist.mat</span>,</span>
<span>  <span class="va">SASA</span>,</span>
<span>  <span class="va">hydrophobicity</span>,</span>
<span>  <span class="va">charge</span>,</span>
<span>  <span class="va">metrics.plot</span>,</span>
<span>  <span class="va">BindingResidues.plot</span>,</span>
<span>  <span class="va">binding.residue.barplot</span>,</span>
<span>  <span class="va">binding.residue.barplot.style</span></span>
<span><span class="op">)</span></span></code></pre></div>
    </div>

    <div id="arguments">
    <h2>Arguments</h2>
    <dl><dt>VDJ.structure</dt>
<dd><p>The VDJ.structure is a list object with the VDJ MIXCR out data frame as its first element containing the germline reference sequences. The second list element contains a list for every predicted structures with the top ranked predictions in pdb format read in by the bio3d:read_pdb() function.</p></dd>


<dt>cells.to.vis</dt>
<dd><p>In the cells.to.vis argument, the barcodes of the cells that should be analyzed can be specified. It can be a single barcode or a list of barcodes. If all the elements of the VDJ.structure object shall be included, the cells.to.vis argument can be set to "ALL" (cells.to.vis = "ALL).</p></dd>


<dt>rank</dt>
<dd><p>AlphaFold predicts multiple models for a given structure which are then ranked according to model's confidence with ranked_0.pdb as the best fit. By default the function uses the ranked_0 model but if a different rank is desired this can be specified in teh rank argument (rank = "ranked_5.pdb").</p></dd>


<dt>rank.list</dt>
<dd><p>The function can also be used to analyze multiple ranked models per structure. This can be done by specifying the rank.list argument. rank.list = list("ranked_0.pdb", "ranked_1.pdb", "ranked_2.pdb") would use the top three most confident models per structure that are specified in the cells.to.vis argument.</p></dd>


<dt>overlay</dt>
<dd><p>Multiple antibody structures are by default visualized separately. In case an overlay is desired this can be done by setting overlay to TRUE (overlay = T).</p></dd>


<dt>PDB.file</dt>
<dd><p>Instead of visualizing the structure form the VDJ.structure object, the function can accept a path to a pdb.file as well.</p></dd>


<dt>spin.speed</dt>
<dd><p>Protein animations can spin around an internal axis. By default the spin speed is set to 0. To start rotation the spin.speed argument can be set to the desired rotation speed.</p></dd>


<dt>color.frameworks</dt>
<dd><p>The color of the frameworks can be changed by specifying the color.frameworks argument with a the desired color in HEX format (color.frameworks = "#eb4034")</p></dd>


<dt>color.cdr3</dt>
<dd><p>The color of the cdr3 can be changed by specifying the color.cdr3 argument with a the desired color in HEX format (color.cdr3 = "#eb4034")</p></dd>


<dt>color.cdr2</dt>
<dd><p>The color of the cdr2 can be changed by specifying the color.cdr2 argument with a the desired color in HEX format (color.cdr2 = "#eb4034")</p></dd>


<dt>color.cdr1</dt>
<dd><p>The color of the cdr1 can be changed by specifying the color.cdr1 argument with a the desired color in HEX format (color.cdr1 = "#eb4034")</p></dd>


<dt>VDJ.anno</dt>
<dd><p>When using a VDJ structure object as an input, the regions of the antibody are by default annotated based on the MIXCR columns. If annotation is not desired the VDJ.anno argument can be set to FALSE.</p></dd>


<dt>label</dt>
<dd><p>By default the annotated regions are labeled. The label can be disabled by setting the label argument to FASLE.</p></dd>


<dt>label.size</dt>
<dd><p>The label size can be adjusted by specifying the label.size argument. By default the label size is set to 12.</p></dd>


<dt>bk.opac</dt>
<dd><p>The label background opacity can be defined with the bk.opac argument. The default opacity is 0.8.</p></dd>


<dt>font.opac</dt>
<dd><p>The opacity of the label's font can be set by specifying the font.opac argument. The default opacity is 1.</p></dd>


<dt>font.col</dt>
<dd><p>The color of the font can be set by the font.col argument. It has to be in a HEX format.</p></dd>


<dt>anno.seq</dt>
<dd><p>By the anno.seq argument any residues of the structure can be annotated. Every domain of the structure is handled as a separate chain, named alphabetically from A-Z, according to the order in the FASTA file.  So for an anybody the HC is Chain A, the LC Chain B and the Antigen Chain C. The format of the anno.seq argument is a vector with the index of the starting residue as its first element, the index of the end residue as second element, the chain in the third element and the color in HEX format as the fourth element. Optionally a label can be added by specifying the text in the fifth element anno.seq = c(4,12,"C","#9900ff","label"). For annotating multiple sequences at once, a list of vectors can be used anno.seq = list(c(4,12,"C","#9900ff","label1"),c(4,12,"B","#9350ff","label2"),...)</p></dd>


<dt>color.molecule</dt>
<dd><p>The color of the non annotated residues can be set by the color.molecule argument in HEX format.</p></dd>


<dt>color.sheets</dt>
<dd><p>The color of beta sheets can be set by specifying the color.sheets argument with the desired color in HEX format.</p></dd>


<dt>color.helix</dt>
<dd><p>The color of alpha helices can be set by specifying the color.helix argument with the desired color in HEX format.</p></dd>


<dt>angle.x</dt>
<dd><p>The molecule can be rotated around the x-axis by setting the angle.x argument in degree.</p></dd>


<dt>angle.y</dt>
<dd><p>The molecule can be rotated around the y-axis by setting the angle.y argument in degree.</p></dd>


<dt>angle.z</dt>
<dd><p>The molecule can be rotated around the z-axis by setting the angle.z argument in degree.</p></dd>


<dt>r3dmol.code</dt>
<dd><p>Additional r3dmol code to modify appearance of the final structure. Defaults to "". Character input is run via eval(parse(x))</p></dd>


<dt>plddt.plot</dt>
<dd><p>AlphaFold has a pLDDT confidence score for every residue of the structure. An additional plot of the structure colored according to the pLDDT score will be returned by setting the plddt.plot to TRUE.</p></dd>


<dt>structure.plot</dt>
<dd><p>By default the structure is visualized. However, if the function is only used to get binding site metrics, the structure.plot argument can be set to FALSE. Like this nos structures are plotted.</p></dd>


<dt>antigen.interaction</dt>
<dd><p>If the antibody is predicted together with the antigen the antigen.interaction argument can be set to TRUE in order to get some binding site metrics. The function will determine the binding site residues based on the bio3d::binding.site() function as well as the average minimal distance of every binding site residue from the antibody to the antigen. Furthermore, the mean confidence (pLDDT) of the binding site residues is calculated. All the results are summarized in a data frame.</p></dd>


<dt>binding.site.cutoff</dt>
<dd><p>Cutoff for the bio3d::binding.site() function. Default is 5.</p></dd>


<dt>dist.mat</dt>
<dd><p>If set to TRUE, the binding residues distance matrix for every structure will be returned as a list. Default = FALSE, so only the minimal distances in the summary data frame is returned.</p></dd>


<dt>SASA</dt>
<dd><p>if set to TRUE the Solvent Accessible Surface Area will be calculated for every Structure</p></dd>


<dt>hydrophobicity</dt>
<dd><p>If set to TRUE, the per residue hydrophobicity will be calculated.</p></dd>


<dt>charge</dt>
<dd><p>If set to TRUE, the per residue charge will be calculated.</p></dd>


<dt>metrics.plot</dt>
<dd><p>If set to TRUE, a structure plot colored according to the metrics will be shown.</p></dd>


<dt>BindingResidues.plot</dt>
<dd><p>If the antigen.interaction is enabled, the binding site residues can be visualized on the structure by setting the BindingResidues.plot argument to TRUE.</p></dd>


<dt>binding.residue.barplot</dt>
<dd><p>The binding.residue.bar plot can be set to TRUE to get a bar plot visualizing to which regions of the antibody the binding site residues belong too. A bar plot is produced for every structure separately as well as one summary bar plot over all analyzed structures.</p></dd>


<dt>binding.residue.barplot.style</dt>
<dd><p>There are two styles available for the binding site residue bar plot. By default all regions are listed separately. By setting the binding.residue.barplot.style to "FR_CDR", only framework and CDR is distinguished.</p></dd>

</dl></div>
    <div id="value">
    <h2>Value</h2>
    

<p>ADD DESCRIPTION OF RETURN VALUE HERE</p>
    </div>

    <div id="ref-examples">
    <h2>Examples</h2>
    
    </div>
  </div>
  <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
    <nav id="toc" data-toggle="toc" class="sticky-top"><h2 data-toc-skip>Contents</h2>
    </nav></div>
</div>


      <footer><div class="copyright">
  <p></p><p>Developed by Alexander Yermanos.</p>
</div>

<div class="pkgdown">
  <p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.6.</p>
</div>

      </footer></div>

  


  

  </body></html>

