Skip to content

Commit

Permalink
Update docstring documentation in functions and module
Browse files Browse the repository at this point in the history
  • Loading branch information
adelq committed Jan 2, 2018
1 parent 3ba0d65 commit 7a832f6
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions dnds.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit 7a832f6

Please sign in to comment.