Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bis-aria
ariaec
Commits
6c1b229f
Commit
6c1b229f
authored
Apr 17, 2018
by
Fabrice Allain
Browse files
Updated API doc
parent
774713af
Changes
131
Hide whitespace changes
Inline
Side-by-side
aria/conbox/analysis.py
View file @
6c1b229f
# coding=utf-8
"""
Created on 4/7/17
@author: fallain
"""
"""Analysis tools for protein ensembles"""
import
logging
import
matplotlib.pyplot
as
plt
import
numpy
as
np
import
os
import
re
import
sys
import
seaborn
as
sns
from
Bio.PDB.Residue
import
Residue
from
Bio.PDB
import
PDBParser
,
PDBIO
...
...
@@ -37,29 +32,27 @@ def colscatter(X, axe, colors, ndim=2, axtitle="", xlabel="x",
Parameters
----------
X :
axe :
colors :
ndim :
(Default value = 2)
X :
array-like, shape (n_samples, n_components)
matrix used for plotting
axe :
matplotlib.Axes
Axes object containing the plot
colors :
list of int
color indexes
ndim :
int
Number of components extracted for the plot
(Default value = 2)
axtitle :
(Default value = "")
xlabel :
(Default value = "x")
ylabel :
(Default value = "y")
zlabel :
(Default value = "z")
legend_prefix :
(Default value = "")
others :
(Default value = False)
Returns
-------
Plot title (Default value = "")
xlabel : str
X axis label (Default value = "x")
ylabel : str
Y axis label (Default value = "y")
zlabel : str
Z axis label (Default value = "z")
legend_prefix : str
Add a prefix to the legend (Default value = "")
others : bool
If the last legend label should contain or not `prefix` (Default
value = False)
"""
palette
=
sns
.
color_palette
(
"hls"
,
len
(
set
(
colors
)))
...
...
@@ -107,8 +100,9 @@ class EnsembleAnalysis(object):
Returns
-------
list_of_pdb : list of str
List of pdb file path
"""
# Get the list of all the generated structures in iteration path if no
# clustering. Otherwise, get the list of all generated structures
...
...
@@ -140,7 +134,7 @@ class EnsembleAnalysis(object):
Parameters
----------
clusteridx
project :
aria
.Project.Project object
project :
:class:`aria.core
.Project.Project
`
object
iteration_id :
restraints :
...
...
@@ -411,8 +405,6 @@ class EnsembleAnalysis(object):
LOG
.
info
(
"Reading native structure"
)
logging
.
captureWarnings
(
True
)
parser
=
PDBParser
()
from
aria.core.Chain
import
Chain
from
aria.core.Molecule
import
Molecule
# Since segids can be unfilled in the native pdb file, we check here
# the values according to segid in molecule object
...
...
aria/conbox/common.py
View file @
6c1b229f
...
...
@@ -62,6 +62,7 @@ class TqdmToLogger(io.StringIO):
"""
self
.
logger
.
log
(
self
.
level
,
self
.
buf
)
# Code below adapated from an answer of klaus se on stackoverflow
# (http://stackoverflow.com/a/16071616)
def
worker
(
f
,
task_queue
,
done_queue
):
...
...
aria/conbox/converter.py
View file @
6c1b229f
...
...
@@ -51,7 +51,7 @@ class AriaEcBbConverter(object):
self
.
outprefix
=
''
def
run
(
self
):
"""BBConverter command"""
"""BBConverter
main
command"""
# Check input
"""
main method
...
...
@@ -101,28 +101,30 @@ class AriaEcBbConverter(object):
@
staticmethod
def
compute_diversityvalue
(
msa
,
seqlen
):
"""
Compute
bbcontacts diversity value
Compute
diversity score related to multiple sequence alignment
Parameters
----------
msa :
`
str
`
msa : str
multiple sequence alignment file path
seqlen :
`
int
`
seqlen : int
protein sequence length
Returns
-------
diversity_score :
`
float
`
diversity_score : float
Diversity score
Notes
-----
Diversity score correspond to the square root of the multiple
sequence alignment length (:math:`m`) over the length of the protein
sequence (:math:`l`)
.. math:: Divscore =
\f
rac{\sqrt{m}}{l}
Diversity score correspond to the square root of the multiple
sequence alignment length (:math:`m`) over the length of the protein
sequence (:math:`l`)
.. math:: Divscore =
\\
frac{
\\
sqrt{m}}{l}
"""
msa_reg
=
re
.
compile
(
r
"^>[A-Za-z0-9]+_[A-Za-z0-9]+"
)
msalen
=
0
...
...
@@ -1819,6 +1821,10 @@ class AriaEcXMLConverter(AriaXMLConverter):
class
AriaEcConfigConverter
(
object
):
"""
Configuration file converter
"""
OUTFILE
=
"configs.csv"
def
__init__
(
self
,
settings
):
...
...
@@ -1855,6 +1861,7 @@ class AriaEcConfigConverter(object):
----------
path: str
Path to the config file
data :
Returns
-------
...
...
aria/core/__init__.py
View file @
6c1b229f
# coding=utf-8
"""
ARIA -- Ambiguous Restraints for Iterative Assignment
A software for automated NOE assignment
Version 2.3
Copyright (C) Benjamin Bardiaux, Michael Habeck, Therese Malliavin,
Wolfgang Rieping, and Michael Nilges
All rights reserved.
NO WARRANTY. This software package is provided 'as is' without warranty of
any kind, expressed or implied, including, but not limited to the implied
warranties of merchantability and fitness for a particular purpose or
a warranty of non-infringement.
Distribution of substantively modified versions of this module is
prohibited without the explicit permission of the copyright holders.
$Author: bardiaux $
$Revision: 1.1.1.1 $
$Date: 2010/03/23 15:27:24 $
ARIA - Ambiguous Restraints for Iterative Assignment
A software for automated NOE assignment
"""
__all__
=
[
"Analyser"
,
"ariabase"
,
"AriaPeak"
,
"AriaXML"
,
"Assignment"
,
...
...
docs/_static/mycss.css
0 → 100644
View file @
6c1b229f
/* MAKE figures float left to emulate multi-figure environments */
div
.figure
{
float
:
left
;
margin
:
10px
;
border
:
1px
dashed
;
padding
:
10px
;
}
div
.figure
p
.caption
{
text-align
:
center
;
}
/* necessary to have line-break between last figure and text. */
div
.section
p
{
clear
:
left
;
}
\ No newline at end of file
docs/api/aria.aria2.rst
0 → 100644
View file @
6c1b229f
:autogenerated:
aria.aria2 module
=================
.. currentmodule:: aria.aria2
.. automodule:: aria.aria2
:members: check_numeric_slice, check_python, convert, convert_data, default_printer, get_path, get_project_name, invalid_args, load_project, main, parse_args, print_sequence, print_spectrum, print_template_structure, project_info, run_aria, run_gui, setup_aria, show_help, welcome, write_project_template
:undoc-members:
:show-inheritance:
:member-order: bysource
Summary
-------
Functions:
.. autosummary::
:nosignatures:
check_numeric_slice
check_python
convert
convert_data
default_printer
get_path
get_project_name
invalid_args
load_project
main
parse_args
print_sequence
print_spectrum
print_template_structure
project_info
run_aria
run_gui
setup_aria
show_help
welcome
write_project_template
Reference
---------
\ No newline at end of file
docs/api/aria.check.rst
0 → 100644
View file @
6c1b229f
:autogenerated:
aria.check module
=================
.. currentmodule:: aria.check
.. automodule:: aria.check
:members: check_ccpn, check_numeric, check_numeric_slice, check_pylab, check_python, check_scientific, check_tix
:undoc-members:
:show-inheritance:
:member-order: bysource
Summary
-------
Functions:
.. autosummary::
:nosignatures:
check_ccpn
check_numeric
check_numeric_slice
check_pylab
check_python
check_scientific
check_tix
Reference
---------
\ No newline at end of file
docs/api/aria.conbox.analysis.rst
0 → 100644
View file @
6c1b229f
:autogenerated:
aria.conbox.analysis module
===========================
.. currentmodule:: aria.conbox.analysis
.. automodule:: aria.conbox.analysis
:members: EnsembleAnalysis, colscatter
:undoc-members:
:show-inheritance:
:member-order: bysource
Summary
-------
Classes:
.. autosummary::
:nosignatures:
EnsembleAnalysis
Functions:
.. autosummary::
:nosignatures:
colscatter
Reference
---------
\ No newline at end of file
docs/api/aria.conbox.commands.rst
0 → 100644
View file @
6c1b229f
:autogenerated:
aria.conbox.commands module
===========================
.. currentmodule:: aria.conbox.commands
.. automodule:: aria.conbox.commands
:members: AriaEcCommands, ReadableFile, check_file, main, seqrange_type
:undoc-members:
:show-inheritance:
:member-order: bysource
Summary
-------
Classes:
.. autosummary::
:nosignatures:
AriaEcCommands
ReadableFile
Functions:
.. autosummary::
:nosignatures:
check_file
main
seqrange_type
Reference
---------
\ No newline at end of file
docs/api/aria.conbox.common.rst
0 → 100644
View file @
6c1b229f
:autogenerated:
aria.conbox.common module
=========================
.. currentmodule:: aria.conbox.common
.. automodule:: aria.conbox.common
:members: Capturing, CommandProtocol, CustomLogging, NotDisordered, RedirectStdStreams, TqdmToLogger, addtup, cart_dist, format_dict, format_str, get_filename, parmap, ppdict, reg_load, sort_2dict, tickmin, tickrot, titleprint, worker
:undoc-members:
:show-inheritance:
:member-order: bysource
Summary
-------
Classes:
.. autosummary::
:nosignatures:
Capturing
CommandProtocol
CustomLogging
NotDisordered
RedirectStdStreams
TqdmToLogger
Functions:
.. autosummary::
:nosignatures:
addtup
cart_dist
format_dict
format_str
get_filename
parmap
ppdict
reg_load
sort_2dict
tickmin
tickrot
titleprint
worker
Reference
---------
\ No newline at end of file
docs/api/aria.conbox.converter.rst
0 → 100644
View file @
6c1b229f
:autogenerated:
aria.conbox.converter module
============================
.. currentmodule:: aria.conbox.converter
.. automodule:: aria.conbox.converter
:members: AriaEcBbConverter, AriaEcConfigConverter, AriaEcXMLConverter, AriaXMLConverter
:undoc-members:
:show-inheritance:
:member-order: bysource
Summary
-------
Classes:
.. autosummary::
:nosignatures:
AriaEcBbConverter
AriaEcConfigConverter
AriaEcXMLConverter
AriaXMLConverter
Reference
---------
\ No newline at end of file
docs/api/aria.conbox.maplot.rst
0 → 100644
View file @
6c1b229f
:autogenerated:
aria.conbox.maplot module
=========================
.. currentmodule:: aria.conbox.maplot
.. automodule:: aria.conbox.maplot
:members: AriaEcContactMap
:undoc-members:
:show-inheritance:
:member-order: bysource
Summary
-------
Classes:
.. autosummary::
:nosignatures:
AriaEcContactMap
Reference
---------
\ No newline at end of file
docs/api/aria.conbox.ndconv.rst
0 → 100644
View file @
6c1b229f
:autogenerated:
aria.conbox.ndconv module
=========================
.. currentmodule:: aria.conbox.ndconv
.. automodule:: aria.conbox.ndconv
:members: net_deconv
:undoc-members:
:show-inheritance:
:member-order: bysource
Summary
-------
Functions:
.. autosummary::
:nosignatures:
net_deconv
Reference
---------
\ No newline at end of file
docs/api/aria.conbox.pdbdist.rst
0 → 100644
View file @
6c1b229f
:autogenerated:
aria.conbox.pdbdist module
==========================
.. currentmodule:: aria.conbox.pdbdist
.. automodule:: aria.conbox.pdbdist
:members: PDBDist
:undoc-members:
:show-inheritance:
:member-order: bysource
Summary
-------
Classes:
.. autosummary::
:nosignatures:
PDBDist
Reference
---------
\ No newline at end of file
docs/api/aria.conbox.pdbqual.rst
0 → 100644
View file @
6c1b229f
:autogenerated:
aria.conbox.pdbqual module
==========================
.. currentmodule:: aria.conbox.pdbqual
.. automodule:: aria.conbox.pdbqual
:members: AriaEcPdbqual
:undoc-members:
:show-inheritance:
:member-order: bysource
Summary
-------
Classes:
.. autosummary::
:nosignatures:
AriaEcPdbqual
Reference
---------
\ No newline at end of file
docs/api/aria.conbox.pdbstat.rst
0 → 100644
View file @
6c1b229f
:autogenerated:
aria.conbox.pdbstat module
==========================
.. currentmodule:: aria.conbox.pdbstat
.. automodule:: aria.conbox.pdbstat
:members: PDBStat
:undoc-members:
:show-inheritance:
:member-order: bysource
Summary
-------
Classes:
.. autosummary::
:nosignatures:
PDBStat
Reference
---------
\ No newline at end of file
docs/api/aria.conbox.protein.rst
0 → 100644
View file @
6c1b229f
:autogenerated:
aria.conbox.protein module
==========================