Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

detect stop codon

stop_codons = ["TGA", "TAG", "TAA"]
sequence = "ATGAAATGA"
sequence2 = "ATGAAATTA"

is_stop_codon = lambda x : any(x[i:i+3] in stop_codons for i in range(0,len(x),3))

print is_stop_codon(sequence)
print is_stop_codon(sequence2)
Comment

PREVIOUS NEXT
Code Example
Python :: django override help text 
Python :: olst = [] a = int(input()) b = int(input()) for ele in range(a,b+1): if ele%2 != 0: olst.append(ele) print(olst[::-1]) 
Python :: resample and replace with mean in python 
Python :: how to close python with a line of code 
Python :: if(guess_password == list(password): 
Python :: Goal Perser 
Python :: python folium add minimap to map 
Python :: subplot adjust python 
Python :: how to tell python to create a random numer 
Python :: python check if number is complex 
Python :: python scatter plot 
Python :: Pandas bins pd.cut() 
Python :: python parse dict from string 
Python :: Finding the sum of even Fibonacci numbers less than or equal to given limit 
Python :: xpath helium 
Python :: how to remove trackback on python when ctrl c 
Python :: fizzbuzz python 
Python :: pandast change datetime to date 
Python :: set x label matplotlib 
Python :: radix sort python 
Python :: spacy frenc hlemmatizer 
Python :: price for bazaar item hypixel python 
Python :: python format float as currency 
Python :: rotate x labels in plots, matplotlib 
Python :: how to open html file in python 
Python :: choosing the correct lower and upper bounds in cv2 
Python :: get all paragraph tags beautifulsoup 
Python :: pandas add a column with loc 
Python :: discord bot python on reaction 
Python :: how to get 2 random inputs in a list using for loop 
ADD CONTENT
Topic
Content
Source link
Name
6+4 =