Skip to content
Snippets Groups Projects
Commit 0e81da69 authored by Samuel Mondal's avatar Samuel Mondal
Browse files

Rudimentary code for exon concatenation plus a line for polyA generation

parent a95db809
No related branches found
No related tags found
No related merge requests found
fa = open("fasta.fa",'r')
lines = fa.readlines()
for x in range(int(len(lines)/2)):
if x == 0:
annotation = lines[0]
read = lines[1]
if x >= 1:
if lines[2*x] == lines[2*(x-1)]:
read+= lines[(2*x)+1]
else:
annotation = lines[2*x]
read = lines[(2*x)+1]
# Function for random addition of polyA to sequences
import numpy as np
listA = ['A','U','G','C']
''.join(np.random.choice(listA,250,p=[0.9,0.040,0.020,0.020]))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment