From a71bbcac49213b47b77da57b7f6f78c88e1b7edf Mon Sep 17 00:00:00 2001
From: Gina <gina.unibas@gmail.com>
Date: Mon, 14 Nov 2022 23:05:04 +0100
Subject: [PATCH] Adding docstring to PolyA

---
 sequence_extractor/polyA.py | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/sequence_extractor/polyA.py b/sequence_extractor/polyA.py
index 2c88e79..dc24b24 100644
--- a/sequence_extractor/polyA.py
+++ b/sequence_extractor/polyA.py
@@ -1,6 +1,31 @@
 import numpy as np
 
 def PolyA_generator(exon):
+def PolyA_generator(exon):
+"""Appends PolyA tail.
+
+    This function appends a polyA tail on the transcript sequence based on a random selection of bases, with A defined as being in larger proportion..
+
+    Parameters
+    ----------
+    arg1 : exon
+             Transcript sequence made up of exons.
+
+    Returns
+    -------
+    fasta
+        Transcript sequence with concatenated polyA tails.
+
+
+
+    Raises
+    ------
+    TypeError
+        ValueError: PolyA tail needs to contain majority As.
+    """
+listA = ['A','T','G','C']
+        polyA = ''.join(np.random.choice(listA,250,p=[0.9,0.040,0.020,0.020]))
+        return (exon+polyA)
 	listA = ['A','T','G','C']
 	polyA = ''.join(np.random.choice(listA,250,p=[0.9,0.040,0.020,0.020]))
 	return (exon+polyA)
-- 
GitLab