Package: pydca
Aboutpydcapydcais Python implementation of direct coupling analysis (DCA) of residue coevolution for protein and RNA sequence families using themean-fieldandpseudolikelihood maximizationalgorithms. Given multiple sequence alignment (MSA) files in FASTA format,pydcacomputes the coevolutionary scores of pairs of sites in the alignment. In addition, when an optional file containing a reference sequence is supplied, scores corresponding to pairs of sites of this reference sequence are computed by mapping the reference sequence to the MSA. The software provides command line utilities or it can be used as a library.Prerequisitespydcais implemented mainly in Python with the pseudolikelihood maximization parameter inference part implemented using C++ backend for optimization. To install pydca and successfully carry out DCA computations, the following are required.Python 3, version 3.5 or later.C++ compiler that supports C++11 (e.g. the GNU compiler collection).Optionally, OpenMP for multithreading support.InstallingTo install the current version ofpydcafrom PyPI, run on the command line$pipinstallpydcaor you can use theinstall.shbash script as$sourceinstall.shUsingpydcaas a Python LibraryAfter installation, pydca can be imported into other Python source codes and used.Here is IPython Notebook example.
If you encounter a problem opening the Ipython Notebook example, copy and past the URLhere.RunningpydcaFrom Command LineWhenpydcais installed, it provides three main command. Namelypydca,plmdca, andmfdca.
The commandpydcais used for tasks such as trimming alignment data before DCA computation, and
visualization of contact maps or true positive rates. The other two command are associated with
DCA computation with the pseudolikelihood maximization algorithm (plmDCA) or the mean-field algorithm (mfDCA).
Below we show some usage examples of all the three commands.Trimming MSA dataTrim gaps by reference sequence:$pydcatrim_by_refseq<biomolecule><alignment.fa><refseq_file.fa>--remove_all_gaps--verboseTrim by percentage of gaps in MSA columns:$pydcatrim_by_gap_size<alignmnet.fa>--max_gap0.9--verboseDCA ComputationUsingpydca's Pseudolikelihood Maximization Algorithm$plmdcacompute_fn<biomolecule><alignment.fa>--max_iterations500--num_threads6--apc--verboseWe can also the values of regularization parameters$plmdcacompute_fn<biomolecule><alignment.fa>--apc--lambda_h1.0--lambda_J50.0--verboseThe commandcompute_fncomputes DCA scores obtained from the Frobenius norm of the couplings.--apcperforms
average product correction (APC). To obtain DCA scores from direct-information (DI) we replace the subcommandcompute_fnbycompute_di.Usingpydca's Mean-Field Algorithm$mfdcacompute_fn<biomolecule><alignment.fa>--apc--pseudocount0.5--verboseContact Map VisualizationWhen protein/RNA sequence family has a resolved PDB structure, we can evaluate the
performance ofpydcaby contact map visualization. Example:$pydcaplot_contact_map<biomolecule><PDB_chain_name><PDB_id/PDB_file.PDB><refseq.fa><DCA_file.txt>--verbosePlotting True Positive RateIn addition to contact map we can evaluate the performance ofpydcaby plotting
the true positive rate.$pydcaplot_contact_map<biomolecule><PDB_chain_name><PDB_id/PDB_file.PDB><refseq.fa><DCA_file.txt>--verboseTo get help message about a (sub)command  we use, for example,$pydca--help$plmdcacompute_fn--helpReferencesIf you use pydca for your work please cite the following referencesZerihun, MB., Pucci, F, Peter, EK, and Schug, A.pydca: v1.0: a comprehensive software for direct coupling analysis of RNA and protein sequencesBioinformatics, btz892, doi.org/10.1093/bioinformatics/btz892Morcos, F., Pagnani, A., Lunt, B., Bertolino, A., Marks, DS., Sander, C., Zecchina, R., Onuchic, JN., Hwa, T., and Weigt, M.Direct-coupling analysis of residue coevolution captures native contacts across many protein familiesPNAS December 6, 2011 108 (49) E1293-E1301, doi:10.1073/pnas.1111471108Ekeberg, M., Lövkvist, C., Lan, Y., Weigt, M., & Aurell, E. (2013).Improved contact prediction in proteins: Using pseudolikelihoods to infer Potts models.Physical Review E, 87(1), 012707, doi:10.1103/PhysRevE.87.012707