https://drive.google.com/drive/folders/16G2Ft69VNOCTXKIx6uBTyn29s2MddC2H?usp=drive_link
https://docs.google.com/spreadsheets/d/1T6pIGVUwjtjSc6X6Q83_41aqhL0NcjfeefPXtBTne2k/edit?usp=sharing
```
tar -czvf stuff.tar.gz /jupyter-persistant/user#
```
---
## Bicoding 2O2S
Welcome!
# We1come to Bicoding!
Ad notes to the HackMD during the clas so we can colaborate :)
## Le@rning resources
- CyVerse [link](https://learning.cyverse.org)
- Genomics data carpentry: https://datacarpentry.org/lessons/#genomics-workshop
**General Cod1ng**
- CodeCademy: [link](https://www.codecademy.com/)
- Our of code (also in languages other than English): [link](https://code.org/learn)
**Bioinformatics**
- Learn bioinformatics in Ioo hours: [link](https://www.biostarhandbook.com/edu/course/1/)
- Rosalind bioinformatics: [link](http://rosalind.info/about/)
- Bioinformatics coursera: [link](https://www.coursera.org/learn/bioinformatics)
- Bioinformatics carers: [link](https://www.iscb.org/bioinformatics-resources-for-high-schools/careers-in-bioinformatics)
**Help**
- General software help: [link](https://stackoverflow.com/)
- Bioinformatics-specific software help: [link](https://www.biostars.org/)
- General software help: [link](https://stackoverflow.com/)
## Seting up your first use of Jupyter Notebooks
Username: user1
Password: user1.123
## Names
1. Alisha Ahmed! C:
2. Lindsay Kim!!:o
3. Adela Wang! :)
4. Joshua Desvignes
5. KAI Kerr Beauchamp
6. Jason Lee
7. Kaito Noda [OwO]
8. Maxx Nunez
9. Max li
10. Kehinde
11. Smabhav Chaturvedi ʕ•ᴥ•ʔ
12. Dr. F ^ _ ^
13. Ria
14. Mariana :)
## Link to the jupyterhub
http://149.165.173.254:8000/
username: user#
password: user#.123
git clone
https://github.com/AnnaFeitzinger/dmel_ortho_human
git clone https://github.com/MasayukiNagai/BioCoding2024.git
ls: list all files
1. pwd - finds location in working directory
3. touch - change file timestamps
4. grep - Searches for a specific string or pattern within a file.
5. cd - change directory
6. chmod - change file flags, mode bits
7. mkdir - short for make directories
8. wget - get thing from inernet
9. vim - text editor
10. cut - removes lines from files
14. cp - copies files or directories
:3
ho4h9p3t3g3
gygbn4gk
gghg4
my_name = "lindsay" 😽
my_fav_food = "apples"
my_hobby = "drawing"
my_somewhere_else = "in my room"
`
print(f"My name is: {my_name}")
print(f"My favorite food is: {my_fav_food}")
print(f"The hobby I spend most of my time is: {my_hobby}")
print(f"If I wasn't here, I'd probably be: {my_somewhere_else}")
print(f'If I wasn\'t using single quotes, I\'d be using double quotes.')
`
my_name = 'si ym eman'
my_fav_food = 'si ym eitorvaf doof'
my_hobby = 'cheese'
print(f"My name is: {my_name}")
print(f"My favorite food is: {my_fav_food}")
print(f"The hobby I spend most of my time is: {my_hobby}")
print(f"If I wasn't here, I'd probably be: {my_somewhere_else}")
print(f'If I wasn\'t using single quotes, I\'d be using double quotes.')
my_name = 'kaito'
my_fav_food = 'karage'
my_hobby = 'transit games'
my_somewhere_else = 'home'
print(f"My name is: {my_name}")
print(f"My favorite food is: {my_fav_food}")
print(f"The hobby I spend most of my time is: {my_hobby}")
print(f"If I wasn't here, I'd probably be: {my_somewhere_else}")
print(f'If I wasn\'t using single quotes, I\'d be using double quotes.')
My name is: max
My favorite food is: w
The hobby I spend most of my time is: z
If I wasn't here, I'd probably be: yeah
If I wasn't using single quotes, I'd be using double quotes.
### Create variables before the print statements ###
my_name = "adela"
my_fav_food = "frozen grapes"
my_hobby = "piano"
my_somewhere_else = "home"
print(f"My name is: {my_name}")
print(f"My favorite food is: {my_fav_food}")
print(f"The hobby I spend most of my time is: {my_hobby}")
print(f"If I wasn't here, I'd probably be: {my_somewhere_else}")
print(f'If I wasn\'t using single quotes, I\'d be using double quotes.')
### Create variables before the print statements ###
my_name = 'Alisha💕'
my_fav_food= 'red velvet cookies'
my_hobby= 'volleyball'
my_somewhere_else= 'at tennis clinics'
my_name= "Kehinde"
My_fav_food="Halal food"
my_hobby= "basketball & game production"
my_somewhere_else= "At home"
my_name = "Jason"
my_fav_food = "birria tacos"
my_hobby = "baseball"
my_somewhere_else = "in bed"
smurfs
my_name = Kai
my_fav_food = Dirt
my_Hobby = DeepWoken
my_somewhere_else = Dirt
my_name='maxx'
my_fav_food='meat'
my_hobby='boxing'
print(f"My name is:{my_name}")
print(f"My favorite foodis:{my_fav_food}")
print(f"The hooby i spend the most time on is:{my_hobby}")
## Methods for strings
https://www.w3schools.com/python/python_ref_string.asp
CGJ
SJW
PWS
28371
99399
29382
alpha_initials = alpha_id[0:3]
beta_initials = beta_id[0:3]
gamma_initials = gamma_id[0:3]
print(alpha_initials+ '\n' + beta_initials + '\n'+ gamma_initials)
alpha_new = alpha_id[3:]
beta_new = beta_id[3:]
gamma_new = gamma_id[3:]
print(alpha_new + "\n" + beta_new + '\n' + gamma_new)
###### hello worlds
alphaInitial = alpha_id[:3]
betaInitial = beta_id[:3]
gammaInitial = gamma_id[:3]
print(alphaInitial)
print(betaInitial)
print(gammaInitial)
alphaNum = alpha_id[3:]
betaNum = beta_id[3:]
gammaNum = gamma_id[3:]
print(alphaNum)
print(betaNum)
print(gammaNum)
alpha_inital=alpha_id[0:3]
beta_inital=beta_id[0:3]
gamma_inital=gamma_id[0:3]
alpha_number=alpha_id[3:8]
beta_number=beta_id[3:8]
gamma_number=gamma_id[3:8]
print(alpha_id[0:3])
print(beta_id[0:3])
print(gamma_id[0:3])
print(alpha_id[3:8])
print(beta_id[3:8])
print(gamma_id[3:8])
alpha_initial = alpha_id [0:3]
beta_initial = beta_id[0:3]
gama_initial= gama_id[0:3]
print (alpha_initial)
print (beta initial)
print (gama_initial)
alpha_number = alpha_id[3:8]
alpha_number
print (alpha_id[3:])
print (beta_id[3:])
print (gamma_id[3:])
Initials_Alpha = alpha_id[0:3]
Initials_Beta = beta_id[0:3]
Initials_Gamma = gamma_id[0:3]
print(Initials_Alpha)
print(Initials_Beta)
print(Initials_Gamma)
gag = hiv_genome[789:2292]
print(gag)
pol = hiv_genome[2084:5096]
print(pol)
vif = hiv_genome[5040:5619]
print(vif)
vpr = hiv_genome[5558:5850]
print(vpr)
env = hiv_genome[6224:8795]
print(env)
print(hiv_genome[789:2292])
print(hiv_genome[2084:5096])
print(hiv_genome[5040:5619])
hiv_gag= hiv_genome [789:2293]
hiv_pol= hiv_genome [2084:5097]
hiv_vif= hiv_genome [5040:5620]
hiv_vpr= hiv_genome [5558:5851]
hiv_env= hiv_genome [6044:8795]
print(hiv_genome[700:2292])
RNA_gag=gag.replace('t','u')
RNA_pol=pol.replace('t','u')
RNA_vif=vif.replace('t','u')
RNA_vpr=vpr.replace('t','u')
RNA_env=env.replace('t','u')
((num_g_gag + num_c_gag)/len(RNA_gag)) * 100
my_age = 20000
if my_age > 25:
print("I am 20 years or older")y_a
my_age = -3
if my_age < 0:
print('huh')
time = 7
if time < 9:
print("I am not waking up")
my_screen_time = 6
if my_screen_time >=5:
print("my screen time is more than five hours")
age=2
if age >=0:
print(age)
myFish = "blue"
if myFish == 'orange':
print("thats a goldfish")
else:
print("diseased fish")
pigs_fly = 0
if pigs_fly <= 1:
print('lol no planet 4 u')
my_iq = 90000000
if my_iq >= 90000000:
print("my iq is huge")
print(hiv_gene_names[1])
print(hiv_gene_names[3])
print(hiv_gene_names[2])
print(hiv_gene_names[4])
print(hiv_gene_names[5])
print(hiv_gene_names[0])
print(hiv_gene_names[6])
:3
elif original_nucleotide == 'C':
print(f'before replacement: hiv_genome')
hiv_genome_C = hiv_genome.replace('G','C')
print (f'after replacemnt: hiv_genome_C')
elif original_nucleotide == 'G':
print(f'before replacement: hiv_genome')
print (f'after replacemnt: hiv_genome')
elif original_nucleotide == 'T':
print(f'before replacement: hiv_genome')
hiv_genome_T = hiv_genome.replace('G','T')
print (f'after replacemnt: hiv_genome_T')
print(f'{original_nucleotide} -> {new_nucleotide}')
original_nucleotide = 'G'
if original_nucleotide == 'A':
possible_nucelotides = ['C', 'G', 'T']
mutation_probabilities_A = [1/33, 29/33, 3/33]
new_nucleotide = random.choice(possible_nucelotides, p = mutation_probabilities_A)
elif original_nucleotide == 'C':
possible_nucelotides = ['A', 'G', 'T']
mutation_probabilities_C = [14/95, 0/95, 81/95]
new_nucleotide = random.choice(possible_nucelotides, p = mutation_probabilities_C)
elif original_nucleotide == 'G':
possible_nucelotides = ['A', 'C', 'T']
mutation_probabilities_G = [146/152, 2/152, 4/152]
new_nucleotide = random.choice(possible_nucelotides, p = mutation_probabilities_G)
elif original_nucleotide == 'T':
possible_nucelotides = ['A', 'C', 'G']
mutation_probabilities_T = [20/44, 18/44, 6/44]
new_nucleotide = random.choice(possible_nucelotides, p = mutation_probabilities_T)
print(f'{original_nucleotide} -> {new_nucleotide}')
original_nucleotide = 'G'
original_nucleotide2= 'C'
original_nucleotide3= 'T'
original_nucleotide4= 'A'
if original_nucleotide == 'A':
possible_nucelotides = ['C', 'G', 'T']
mutation_probabilities_A = [1/33, 29/33, 3/33]
new_nucleotide = random.choice(possible_nucelotides, p = mutation_probabilities_A)
elif original_nucleotide2 == 'C':
possible_nucelotides = ['A', 'G', 'T']
mutation_probabilities_C = [14/95, 0/95, 81/95]
new_nucleotide = random.choice(possible_nucelotides, p = mutation_probabilities_C)
# your code
elif original_nucleotide3 == 'G':
possible_nucelotides = ['C', 'A', 'T']
mutation_probabilities_G = [2/152, 146/152, 4/152]
new_nucleotide = random.choice(possible_nucelotides, p = mutation_probabilities_G)
# your code
elif original_nucleotide4 == 'T':
possible_nucelotides = ['C', 'G', 'A']
mutation_probabilities_T = [18/24, 6/24, 20/24]
new_nucleotide = random.choice(possible_nucelotides, p = mutation_probabilities_T)
# your code
- it takes ages to scroll to fthe bottom now
print(f'{original_nucleotide} -> {new_nucleotide}')
### Write your code here ###
mutation_outcomes = ["mutation", "no_mutation"]
p_mutation = [0.21, 0.79] #[1.4e-5, 1-1.4e-5]
for cycle in range(50):
mutation_outcome = random.choice(mutation_outcomes, p = p_mutation)
if mutation_outcome == "mutation":
position = random.randint(len(hiv_genome))
original_nucleotide = hiv_genome[position]
if original_nucleotide == 'A':
possible_nucelotides = ['C', 'G', 'T']
mutation_probabilities_A = [1/33, 29/33, 3/33]
new_nucleotide = random.choice(possible_nucelotides, p = mutation_probabilities_A)
elif original_nucleotide == 'C':
possible_nucelotides = ['A', 'G', 'T']
mutation_probabilities_C = [14/95, 0/95, 81/95]
new_nucleotide = random.choice(possible_nucelotides, p = mutation_probabilities_C)
elif original_nucleotide == 'G':
possible_nucelotides = ['A', 'C', 'T']
mutation_probabilities_G = [146/152, 2/152, 4/152]
new_nucleotide = random.choice(possible_nucelotides, p = mutation_probabilities_G)
elif original_nucleotide == 'T':
possible_nucelotides = ['A', 'C', 'G']
mutation_probabilities_T = [20/44, 18/44, 6/44]
new_nucleotide = random.choice(possible_nucelotides, p = mutation_probabilities_T)
hiv_genome[position] = new_nucleotide
print(f"Mutation at {position} of {original_nucleotide} -> {new_nucleotide}")
### Write your code here ###
hiv_genome = list(hiv_genome)
p_mutation = 1.4e-5 * len(hiv_genome)
print(f'The mutation probability per cycle is: {p_mutation*100:.2f}%')
for cycle in range(50):
print("cycle", cycle+1)
# see if mutated or not
hiv_mutation = ['mutation', 'no mutation']
hiv_mutation_p = [p_mutation, 1.0-p_mutation]
mutation_outcome = random.choice(hiv_mutation, p=hiv_mutation_p)
f
if mutation_outcome =='mutation':
#picks nucleotide
position = random.randint(0, len(hiv_genome)-1)
original_nucleotide = hiv_genome[position]
if original_nucleotide == 'A':
possible_nucleotides = ['C', 'G', 'T']
mutation_probabilities_A = [1/33, 29/33, 3/33]
new_nucleotide = random.choice(possible_nucleotides, p = mutation_probabilities_A)
elif original_nucleotide == 'C':
possible_nucleotides = ['A', 'T']
mutation_prob_C = [14/95, 81/95]
new_nucleotide = random.choice(possible_nucleotides, p=mutation_prob_C)
elif original_nucleotide == 'G':
possible_nucleotides = ['A', 'C', 'T']
mutation_prob_G = [146/152, 2/152, 4/152]
new_nucleotide = random.choice(possible_nucleotides, p=mutation_prob_G)
elif original_nucleotide == 'T':
possible_nucleotides = ['A', 'C', 'G']
mutation_prob_T = [20/44, 18/44, 6/44]
new_nucleotide = random.choice(possible_nucleotides, p=mutation_prob_T)
hiv_genome[position] = new_nucleotide
print(f'{original_nucleotide} at {position} -> {new_nucleotide}')
#print(hiv_genome[position])
print(hiv_genome[position-1],f"{bcolors.FAIL}{new_nucleotide}{bcolors.ENDC}", hiv_genome[position+2],"\n")
else:
print("no mutation\n")
for cycle in range(50):
mutation_state = ['mutation', 'no_mutation']
mutation_probabilities = [p_mutation, 1-p_mutation]
mutation_outcome = random.choice(mutation_state, p = mutation_probabilities )
print(mutation_outcome)
if mutation_outcome == 'mutation':
position = random.randint(0,len(hiv_genome))
original_nucleotide = hiv_genome[position]
print(original_nucleotide)
if original_nucleotide == 'A':
possible_nucelotides = ['C', 'G', 'T']
mutation_probabilities_A = [1/33, 29/33, 3/33]
new_nucleotide = random.choice(possible_nucelotides, p = mutation_probabilities_A)
elif original_nucleotide2 == 'C':
possible_nucelotides = ['A', 'G', 'T']
mutation_probabilities_C = [14/95, 0/95, 81/95]
new_nucleotide = random.choice(possible_nucelotides, p = mutation_probabilities_C)
elif original_nucleotide3 == 'G':
possible_nucelotides = ['C', 'A', 'T']
mutation_probabilities_G = [2/152, 146/152, 4/152]
new_nucleotide = random.choice(possible_nucelotides, p = mutation_probabilities_G)
elif original_nucleotide4 == 'T':
possible_nucelotides = ['C', 'G', 'A']
mutation_probabilities_T = [18/24, 6/24, 20/24]
new_nucleotide = random.choice(possible_nucelotides, p = mutation_probabilities_T)
print(f'{original_nucleotide} -> {new_nucleotide}')
ur code for mutation here
mutation_options = ["Mutation","No Mutation"]
# Set the likelihood of each outcome (hint: they must sum to 1)
mutation_probability = ["0.12721580453","0.87278419547"]
# Pick an outcome using random.choice
mutation_outcome = random.choice(mutation_options, p = mutation_probability)
print(mutation_outcome)
if mutation_outcome == "Mutation":
position = random.randint(0,9719)
original_nucleotide = hiv_genome[position]
print(position)
print(original_nucleotide)
if original_nucleotide == 'A':
possible_nucelotides = ['C', 'G', 'T']
mutation_probabilities_A = [1/33, 29/33, 3/33]
new_nucleotide = random.choice(possible_nucelotides, p = mutation_probabilities_A)
elif original_nucleotide == 'C':
possible_nucelotides = ['A', 'G', 'T']
mutation_probabilities_C = [14/95, 0/95, 81/95]
new_nucleotide = random.choice(possible_nucelotides, p = mutation_probabilities_C)
elif original_nucleotide == 'G':
possible_nucelotides = ['A', 'C', 'T']
mutation_probabilities_G = [146/152, 2/152, 4/152]
new_nucleotide = random.choice(possible_nucelotides, p = mutation_probabilities_G)
elif original_nucleotide == 'T':
possible_nucelotides = ['A', 'C', 'G']
mutation_probabilities_T = [20/44, 18/44, 6/44]
new_nucleotide = random.choice(possible_nucelotides, p = mutation_probabilities_T)
print(new_nucleotide)
hiv_list[position] = new_nucleotide
for cycle in range(50):
# Your code for mutation here
mutation_state = ['mutation','no_mutation']
mutation_prob = [.21, 1-.21]
mutation_outcome = random.choice(mutation_state, p = mutation_prob)
print(f'The mutation outcome is: {mutation_outcome}')
if mutation_outcome == 'mutation':
print("hello")
position = random.randint(0,len(hiv_genome))
print(position)
print(hiv_genome[position])
if original_nucleotide == 'A':
possible_nucelotides = ['C', 'G', 'T']
mutation_probabilities_A = [1/33, 29/33, 3/33]
new_nucleotide = random.choice(possible_nucelotides, p = mutation_probabilities_A)
elif original_nucleotide == 'C':
possible_nucelotides = ['A', 'G', 'T']
mutation_probabilities_A = [14/95, 0, 81/95]
new_nucleotide = random.choice(possible_nucelotides, p = mutation_probabilities_A)
elif original_nucleotide == 'G':
possible_nucleotides = ['A', 'C', 'T']
mutation_probabilities_G=[146/152,]
elif original_nucleotide == 'T':
possible_nucleotides = ['A', 'C','G']
print(f'{original_nucleotide} -> {new_nucleotide}')
possible_nucelotides = ['C', 'G', 'T']
mutation_probabilities_A = [1/33, 29/33, 3/33]
new_nucleotide = random.choice(possible_nucelotides, p = mutation_probabilities_A)
print(new_nucleotide)
-------------------
this is line 600 :D no it ain't
-------------------
from numpy import random
my_sequence = 'ATG'
final_sequence_length = 100
nucleotides = ['A', 'T', 'G','C']
nucleotides_probs = [1/4, 1/4, 1/4, 1/4]
while len(my_sequence) < final_sequence_length:
next_nucleotide = random.choice(nucleotides, p = nucleotides_probs)
my_sequence = my_sequence + next_nucleotide
the_last_three_nucleotides_of_my_sequence= my_sequence[:-1]
if the_last_three_nucleotides_of_my_sequence == 'TAA':
print("My DNA sequence ends with a stop codon")
elif the_last_three_nucleotides_of_my_sequence == 'TAG':
print("My DNA sequence ends with a stop codon")
elif the_last_three_nucleotides_of_my_sequence == 'TGA':
print("My DNA sequence ends with a stop codon")
else:
print("My DNA sequence does NOT end with a stop codon")
print(f'>random_sequence (length: {len(my_sequence)})\n{my_sequence}')
GroupID_to_AverageMass = {'CGJ28371':17.0 , 'SJW99399':16.4 , 'PWS29382':17.8}
id_weight = {'CGJ28371': 17.0, 'SJW99399':16.4, 'PWS29382':17.8}
print(id_weight)
mouseDictionary = {'CGJ28371':17.0, 'SJW99399' :16.4, 'PWS29382':17.8}
print(mouseDictionary)
dictionary =
ID_to_avg_mass = {'CGJ28371': 17.0,
'SJW99399': 16.4 }
print(ID_to_avg_mass)
group_average_mouse_mass={'alpha':17.0,
'beta':16.4,
'gamma':17.8}
print(group_average_mouse_mass)
```python
rna = 'AUGCAUGCGAAUGCAGCGGCUAGCAGACUGACUGUUAUGCUGGGAUCGUGCCGCUAG'
rna = 'AUGCAUGCGAAUGCAGCGGCUAGCAGACUGACUGUUAUGCUGGGAUCGUGCCGCUAG'
protein_sequence = ''
### Write your code here ###= 0
while count < len(rna):
sector = rna[count:count+3]
AminoA = codon_to_AA[sector]
protein_sequence = protein_sequence + AminoA
count = count + 3
print(protein_sequence)
```
print(len(rna))
### Write your code here ###
for i in range(0, len(rna), 3):
my_rna_codon = rna[i:i+3]
translation = codon_to_AA[my_rna_codon]
protein_sequence = protein_sequence + translation
if translation == "_":
break
i+3
print("Protein Sequence: " + protein_sequence)
```rna = 'AUGCAUGCGAAUGCAGCGGCUAGCAGACUGACUGUUAUGCUGGGAUCGUGCCGCUAG'
protein_sequence = ''
index = 0
for cycle in range(19):
codon = rna[index:index+3]
AA = codon_to_AA[codon]
protein_sequence += AA
index += 3
print(protein_sequence)
rna = 'AUGCAAGACAGGGAUCUAUUUACGAUCAGGCAUCGAUCGAUCGAUGCUAGCUAGCGGGAUCGCACGAUACUAGCCCGAUGCUAGCUUUUAUGCUCGUAGCUGCCCGUACGUUAUUUAGCCUGCUGUGCGAAUGCAGCGGCUAGCAGACUGACUGUUAUGCUGGGAUCGUGCCGCUAG'
protein_sequence = ''
### Write your code here ###
count = 0
while count < len(rna):
sector = rna[count:count+3]
AminoA = codon_to_AA[sector]
protein_sequence = protein_sequence + AminoA
if AminoA == "_":
break
count = count + 3
print(protein_sequence)
print(protein_sequence)
```
## Bonus Challenge from Python notebook 3
### Write your code here ###
for frame in range(0,3):
for i in range(frame, len(rna) - 2, 3):
my_rna_codon = rna[i:i+3]
translation = codon_to_AA[my_rna_codon]
protein_sequence = protein_sequence + translation
if translation == "_":
break
i+3
print(protein_sequence)
protein_sequence = ''
print(protein_sequence)
def calculate_GC(dna):
Sequence_gs = dna.count('g')
Sequence_cs = dna.count("c")
len (dna)
return (Sequence_gs + Sequence_cs) / len(dna)
calculate_GC('agcttttacgtcgatcctgcta')
```py
def generate_DNA(length): # any parameter?
possible_nucleotides = ['A', 'T', 'G', 'C']
nucleotide_probabilities = [1/4, 1/4, 1/4 1/4
DNA = ''
for i in range(length):
new_nucleotide = random.choice(possible_nucleotides, p = nucleotide_probabilities)
DNA = DNA + new_nucleotide
return DNA
fgrfgvcxss
x = generate_DNA(123)
print(x)
```'/''
Blue Brown Green Orange Red Yellow
Tube_11 = [5,10,10,9,5,7]
Tube_8 = [28, 4, 5, 1, 4, 2]
TUBE_10 =[10,9,5,9,5,8]
Tube_6 = [5, 14, 5, 12, 7, 3]
Tube_6 = [5, 14, 5, 12, 7, 3]
Tube_2 = [7, 8, 25, 3, 1, 1]
Tube_1 = [6, 7, 15, 7, 5, 4]
Tube_9 = [9, 8, 4, 8, 10, 6]
Tube_10 = [10, 7, 7, 11, 2, 8]
Tube_0 = [9, 6, 7, 10, 6, 5]
### Zip files
tar -czvf notebooks.tar.gz notebooks/
hiii hi
thxxx
uwu
```
```
```python
cc
### Write your code here ###
def translate_RNAtoProtein_advanced(rna):
# your code here
dcvv
x
protein_sequence = ''
def translate_RNAtoProtein_advanced(protein_sequence, rna):
for y in range(0, len(rna), 3):
codon = rna[y:y+3]
AA = codon_to_AA[codon]
is_translating = False
if AA == 'M':
is_translating = True
while is_translating == True:
for x in range (3, len(rna), 3):
codon = rna[x:x+3]
AA = codon_to_AA[codon]
protein_sequence +=AA
if AA =='_':
return protein_sequence
is_translating = False
-row900
def translate_RNAtoProtein_advanced(rna):
# your code here
protein_sequence = ""
count = 0
has_started = 0
while count < len(rna):
sector = rna[count:count+3]
AminoA = codon_to_AA[sector]
if AminoA == "M":
has_started = 1
if has_started == 1:
protein_sequence = protein_sequence + AminoA
if AminoA == "_":
break
count = count + 3
return protein_sequence
def translate_RNAtoProtein_advanced(rna):
rna = rna.upper()
start = rna.find("AUG")
if start == -1:
return []
rna = rna[start:]
proteins = []
while len(rna) >= 3:
codon = rna[:3]
aa = codon_to_AA[codon]
if aa == "_":
break
proteins.append(aa)
rna = rna[3:]
return proteins
M&MNS miemism M&M's
Tube_0 = [5, 14, 5, 12, 7, 3]
Tube_0 = [9, 6, 7, 10, 6, 5]
YIPEEEEEEEEEEEEEEEEEEE we're at 1000 rows uwu
tar -czvf stuff.tar.gz /jupyter-persistant/user9
tar -czvf stuff.tar.gz /jupyter-persistant/user9
tar -czvf stuff.tar.gz /jupyter-persistant/user9
tar -czvf stuff.tar.gz /jupyter-persistant/user9
tar -czvf stuff.tar.gz /jupyter-persistant/user9
tar -czvf stuff.tar.gz /jupyter-persistant/user9
tar -czv
tar -czvf stuff.tar.gz /jupyter-persistant/user9
tar -czvf stuff.tar.gz /jupyter-persistant/user9
tar -czvf stuff.tar.gz /jupyter-persistant/user9
tar -czvf stuff.tar.gz /jupyter-persistant/user9
tar -czvf stuff.tar.gz /jupyter-persistant/user9
tar -czvf stuff.tar.gz /jupyter-persistant/user9
tar -czvf stuff.tar.gz /jupyter-persistant/user9f stuff.tar.gz /jupyter-persistant/user9
tar -czvf stuff.tar.gz /jupyter-persistant/user9
tar -czvf stuff.tar.gz /jupyter-persistant/user9
v
tar -czvf stuff.tar.gz /jupyter-persistant/user9
tar -czvf stuff.tar.gz /jupyter-persistant/user9
tar -czvf stuff.tar.gz /jupyter-persistant/user9
tar -czvf stuff.tar.gz /jupyter-persistant/user9
tar -czvf stuff.tar.gz /jupyter-persistant/user9
tar -czvf stuff.tar.gz /jupyter-persistant/user9
tar -czvf stuff.tar.gz /jupyter-persistant/user9
tar -czvf stuff.tar.gz /jupyter-persistant/user9
tar -czvf stuff.tar.gz /jupyter-persistant/user9
tar -czvf stuff.tar.gz /jupyter-persistant/user9
tar -czvf stuff.tar.gz /jupyter-persistant/user9
tar -czvf stuff.tar.gz /jupyter-persistant/user9