From 7a832f6e152a8f0c55b83eb11e1b6296d14349f6 Mon Sep 17 00:00:00 2001 From: Adel Qalieh Date: Tue, 2 Jan 2018 14:22:25 -0500 Subject: [PATCH] Update docstring documentation in functions and module --- dnds.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/dnds.py b/dnds.py index f86f9cb..e7477b1 100644 --- a/dnds.py +++ b/dnds.py @@ -1,3 +1,8 @@ +"""dnds + +This module is a reference implementation of estimating nucleotide substitution +neutrality by estimating the percent of synonymous and nonsynonymous mutations. +""" from __future__ import print_function, division from math import log from fractions import Fraction @@ -113,7 +118,7 @@ def clean_sequence(seq): def pnps(seq1, seq2): - """Main function to calculate pN/pS between two DNA sequences""" + """Main function to calculate pN/pS between two DNA sequences.""" # Strip any whitespace from both strings seq1 = clean_sequence(seq1) seq2 = clean_sequence(seq2) @@ -134,7 +139,10 @@ def pnps(seq1, seq2): def dnds(seq1, seq2): - """Main function to calculate dN/dS between two DNA sequences""" + """Main function to calculate dN/dS between two DNA sequences per Nei & + Gojobori 1986. This includes the per site conversion adapted from Jukes & + Cantor 1967. + """ # Strip any whitespace from both strings seq1 = clean_sequence(seq1) seq2 = clean_sequence(seq2)