"7.8 LAB: Double Helix All the Way (Long)" Code Answer's
You're definitely familiar with the best coding language Whatever that developers use to develop their projects and they get all their queries like "7.8 LAB: Double Helix All the Way (Long)" answered properly. Developers are finding an appropriate answer about 7.8 LAB: Double Helix All the Way (Long) related to the Whatever coding language. By visiting this online portal developers get answers concerning Whatever codes question like 7.8 LAB: Double Helix All the Way (Long). Enter your desired code related query in the search bar and get every piece of information about Whatever code related question on 7.8 LAB: Double Helix All the Way (Long).
7.8 LAB: Double Helix All the Way (Long)
#returns the upstream dna sequence
def find_upstream(dna_sequence):
index = dna_sequence.find('ATG')
return dna_sequence[0:index]
# finds and returns the gene sequence
def find_gene(dna_sequence):
index = dna_sequence.find('ATG')
return dna_sequence[index:]
# returns the second condon in the gene sequence
def second_condon(gene_sequence):
return gene_sequence[3:6]
# returns the third condon in the gene sequence
def third_condon(gene_sequence):
return gene_sequence[6:9]
# returns the complimentary nucleotide
def complementary_nucleotide(nucleotide):
if nucleotide=='G':
return 'C'
elif nucleotide=='C':
return 'G'
elif nucleotide=='A':
return 'T'
elif nucleotide=='T':
return 'A'
# returns the complimentary sequence
def complementary_sequence(dna_sequence):
comp_seq=""
for n in dna_sequence:
comp_seq += complementary_nucleotide(n)
return(comp_seq)
if __name__ == "__main__":
# assuming string comprises only of C,T,A,G characters
dna_sequence = input('Enter the DNA sequence:')
print("Original sequence: "+ dna_sequence)
gene_sequence = find_gene(dna_sequence)
location_of_gene = dna_sequence.find(gene_sequence)+1
print("\nATG condon at bp "+str(location_of_gene))
print("\tfollowed by {0} at bp {1}".format(second_condon(gene_sequence),str(location_of_gene+3)))
print("\tfollowed by {0} at bp {1}".format(third_condon(gene_sequence),str(location_of_gene+6)))
upstream =find_upstream(dna_sequence)
print('\nUpstream sequence: '+upstream)
print('Upstream length: {0} bp'.format(str(len(upstream))))
print('\nGene sequence: '+gene_sequence)
print('Gene length: {0} bp'.format(str(len(gene_sequence))))
print('[+ Strand]: '+gene_sequence)
print(' '+'|'*len(gene_sequence))
print('[+ Strand]: '+complementary_sequence(gene_sequence))
Source: www.chegg.com
All those coders who are working on the Whatever based application and are stuck on 7.8 LAB: Double Helix All the Way (Long) can get a collection of related answers to their query. Programmers need to enter their query on 7.8 LAB: Double Helix All the Way (Long) related to Whatever code and they'll get their ambiguities clear immediately. On our webpage, there are tutorials about 7.8 LAB: Double Helix All the Way (Long) for the programmers working on Whatever code while coding their module. Coders are also allowed to rectify already present answers of 7.8 LAB: Double Helix All the Way (Long) while working on the Whatever language code. Developers can add up suggestions if they deem fit any other answer relating to "7.8 LAB: Double Helix All the Way (Long)". Visit this developer's friendly online web community, CodeProZone, and get your queries like 7.8 LAB: Double Helix All the Way (Long) resolved professionally and stay updated to the latest Whatever updates.