Nexclap

DNA Converter

This program converts a randomly generated DNA string to its corresponding polypeptide. However, while writing the program, I realized that it is more complicated than just basic conversions. The thing is, methionine (AUG) is the only amino acid that can start the strand and the strand is always ended by UUA, UAG, or UGA. So, the ribosome has to stop creating the polypeptide when it sees these. This is still something that I am working on including in the program. Anyway, hope you enjoy it!

from random import randint possiblevals= ["A","C", "T","G"] generatedlist= [] lengthsequence= int(input("Enter a number for the length of the DNA sequence ")) while lengthsequence%3 !=0: lengthsequence= int(input("Remember, nucleic acids are always present in groups of 3 called codons. Your number has to be divisible by 3. Please try again. ")) i=0 #making the DNA sequence while i<lengthsequence: randnum= randint(0,3) sequenceval= possiblevals[randnum] generatedlist.append(sequenceval) i=i+1 print (generatedlist) #making the RNA sequence possiblerna= ["U", "G", "A", "C"] rnalist= [] s=0 while s< lengthsequence: DNAval= generatedlist[s] dnaindex= possiblevals.index(DNAval) rnaconversion= possiblerna[dnaindex] rnalist.append(rnaconversion) s=s+1 print (rnalist) #making the amino acid chain finallist= [] str1="" a=0 b=1 c=2 e=0 p=3 listpossible= ["GCA", "GCC", "GCG", "GCU", "UGC", "UGU", "GAC", "GAU", "GAA", "GAG", "UUC", "UUU", "GGA", "GGC", "GGG", "GGU", "CAC","CAU", "AUA", "AUC", "AUU", "AAA", "AAG", "UUA", "UUG", "CUA", "CUC", "CUG", "CUU", "AUG", "AAC", "AAU","CCA", "CCC", "CCG", "CCU", "CAA","CAG","AGA", "AGG","CGA","CGC","CGG", "CGU", "AGC", "AGU", "UCA", "UCC", "UCG", "UCU", "ACA", "ACC", "ACG", "ACU", "GUA", "GUC", "GUG", "GUU", "UGG", "UAC", "UAU"] listamacids= ["Alanine", "Alanine", "Alanine", "Alanine", "Cysteine", "Cysteine", "Aspartic acid", "Aspartic acid", "Glutamic acid", "Glutamic acid", "Phenylalanine", "Phenylalanine", "Glycine", "Glycine","Glycine","Glycine", "Histidine", "Histidine", "Isoleucine", "Isoleucine", "Isoleucine", "Lysine", "Lysine", "Leucine", "Leucine", "Leucine", "Leucine", "Leucine", "Leucine", "Methionine", "Asparagine", "Asparagine", "Proline", "Proline", "Proline", "Proline", "Glutamine", "Glutamine", "Arganine", "Arganine", "Arganine", "Arganine", "Arganine", "Arganine", "Serine", "Serine", "Serine", "Serine", "Serine", "Serine", "Threonine", "Threonine", "Threonine", "Threonine", "Valine", "Valine", "Valine", "Valine", "Tryptophan", "Tyrosine", "Tyrosine"] while e< (lengthsequence/3): str1="" str1= str1+rnalist[a] str1= str1+rnalist[b] str1= str1+rnalist[c] index= listpossible.index(str1) var= listamacids[index] finallist.append(var) a=a+3 b=b+3 c=c+3 e=e+1 print (len(listpossible)) print (len(listamacids)) print (finallist)

webscraping arxiv.org with python

I scraped Arxiv.org with python and a few other modules. I print all article titles and ask user for which title they want, then I send then to the link.


import requests import urllib.request import time from bs4 import BeautifulSoup import webbrowser url = 'https://arxiv.org/' response = requests.get(url) soup = BeautifulSoup(response.text, "html.parser") one_a_tag = soup.findAll('a')[12] print(one_a_tag.text) link = 'arxiv.org'+one_a_tag['href'] n=1 counter = 0 y={} for i in soup.findAll('a'): counter+=1 if counter > 12 and counter<237: print(str(n)) print(i.text) y.update({i.text:i['href']}) n+=1 z=input('what article title do you want to view') print(y[z]) website='arxiv.org'+y[z] webbrowser.open_new(website)

Bike Crash severity using logistic regression

https://colab.research.google.com/drive/1SWle_HOg5DyJS8EiLARbZcn7qgLXnoef#scrollTo=Wv6NmcOqaDFo&line=1&uniqifier=1
Announcements
  • Test Announcement from Nexclap

    Test message from nexclap - please ignore

    2023-02-13

  • Test message

    Test message from nexclap - please ignore

    2023-02-11

  • Test message

    Test message from nexclap - please ignore

    2023-02-11

  • View all