From 2d4a9a6578b578ef492265cfaf3168fb6cdf67c8 Mon Sep 17 00:00:00 2001
From: Blaise Li <blaise.li__git@nsup.org>
Date: Wed, 29 Jul 2020 17:17:23 +0200
Subject: [PATCH] Changed function doc to use it in "auto-methods".

---
 libriboseq/libriboseq.pyx | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/libriboseq/libriboseq.pyx b/libriboseq/libriboseq.pyx
index 7d381e0..db405d6 100755
--- a/libriboseq/libriboseq.pyx
+++ b/libriboseq/libriboseq.pyx
@@ -159,42 +159,42 @@ cdef bint crpf_has_good_psite(object isgood, str seq):
 
 
 def is_rpf29gooda(object isgood, str seq, int read_len):
-    """Return True if this is a RPF29goodA."""
+    """RPF29goodA: 29 nt, good codon at the A site (positions 16-18)"""
     return cread_is_29nt(read_len) and crpf_has_good_asite(isgood, seq)
 
 
 def is_rpf29bada(object isgood, str seq, int read_len):
-    """Return True if this is a RPF29badA."""
+    """RPF29badA: 29 nt, bad codon at the A site (positions 16-18)"""
     return cread_is_29nt(read_len) and not crpf_has_good_asite(isgood, seq)
 
 
 def is_rpf29goodp(object isgood, str seq, int read_len):
-    """Return True if this is a RPF29goodP."""
+    """RPF29goodP: 29 nt, good codon at the P site (positions 13-15)"""
     return cread_is_29nt(read_len) and crpf_has_good_psite(isgood, seq)
 
 
 def is_rpf29badp(object isgood, str seq, int read_len):
-    """Return True if this is a RPF29badP."""
+    """RPF29badP: 29 nt, bad codon at the P site (positions 13-15)"""
     return cread_is_29nt(read_len) and not crpf_has_good_psite(isgood, seq)
 
 
 def is_rpf29goodagoodp(object isgood, str seq, int read_len):
-    """Return True if this is a RPF29goodAgoodP."""
+    """RPF29goodAgoodP: 29 nt, good codon at the A site (positions 16-18) and good codon at the P site (positions 13-15)"""
     return cread_is_29nt(read_len) and crpf_has_good_asite(isgood, seq) and crpf_has_good_psite(isgood, seq)
 
 
 def is_rpf29goodabadp(object isgood, str seq, int read_len):
-    """Return True if this is a RPF29goodAbadP."""
+    """RPF29goodAbadP: 29 nt, good codon at the A site (positions 16-18) and bad codon at the P site (positions 13-15)"""
     return cread_is_29nt(read_len) and crpf_has_good_asite(isgood, seq) and (not crpf_has_good_psite(isgood, seq))
 
 
 def is_rpf29badagoodp(object isgood, str seq, int read_len):
-    """Return True if this is a RPF29badAgoodP."""
+    """RPF29badAgoodP: 29 nt, bad codon at the A site (positions 16-18) and good codon at the P site (positions 13-15)"""
     return cread_is_29nt(read_len) and (not crpf_has_good_asite(isgood, seq)) and crpf_has_good_psite(isgood, seq)
 
 
 def is_rpf29badabadp(object isgood, str seq, int read_len):
-    """Return True if this is a RPF29badAbadP."""
+    """RPF29badAbadP: 29 nt, bad codon at the A site (positions 16-18) and bad codon at the P site (positions 13-15)"""
     return cread_is_29nt(read_len) and (not crpf_has_good_asite(isgood, seq)) and (not crpf_has_good_psite(isgood, seq))
 
 
@@ -213,6 +213,7 @@ RPF2IS_FUN = {
 def make_fq_filter(str rpf_type, object isgood):
     if rpf_type == "RPF29":
         def fq_filter(fq_triplet):
+            """Reads of length 29 are called RPF29."""
             (_, seq, _) = fq_triplet
             return cread_is_29nt(len(seq))
     else:
-- 
GitLab