Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aggregate pattern for sars #59

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
61 changes: 17 additions & 44 deletions corona.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,47 +43,20 @@
# 16 = 2'-O-methyltransferase (2'-O-MT)
# https://en.wikipedia.org/wiki/MRNA_(nucleoside-2%27-O-)-methyltransferase

# in front "the untranslated leader sequence that ends with the Transcription Regulation Sequence"
corona['untranslated_region'] = cc[0:265]

corona['orf1a'] = translate(cc[266-1:13483], True)

# cc[266-1+4398*3:13468] = 'TTT_TTA_AAC' aka 'X_XXY_YYZ'
# https://en.wikipedia.org/wiki/Ribosomal_frameshift
# Programmed −1 Ribosomal Frameshifting
# TODO: add this to the translate function with automatic detection
corona['orf1b'] = translate(cc[13468-1:21555], False).strip("*") # chop off the stop, note this doesn't have a start

# exploit vector, this attaches to ACE2. also called "surface glycoprotein"
# https://www.ncbi.nlm.nih.gov/Structure/pdb/6VYB -- open state
# https://www.ncbi.nlm.nih.gov/Structure/pdb/6VXX -- closed state
# 1273 amino acids
# S1 = 14-685
# S2 = 686-1273
# S2' = 816-1273
# https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2750777/
corona['spike_glycoprotein'] = translate(cc[21563-1:25384], True)

# Forms homotetrameric potassium sensitive ion channels (viroporin) and may modulate virus release.
corona['orf3a'] = translate(cc[25393-1:26220], True)

# these two things stick out, used in assembly aka they package the virus
corona['envelope_protein'] = translate(cc[26245-1:26472], True) # also known as small membrane
corona['membrane_glycoprotein'] = translate(cc[26523-1:27191], True)

corona['orf6'] = translate(cc[27202-1:27387], True)

corona['orf7a'] = translate(cc[27394-1:27759], True)
corona['orf7b'] = translate(cc[27756-1:27887], True) # is this one real?

corona['orf8'] = translate(cc[27894-1:28259], True)

# https://en.wikipedia.org/wiki/Capsid
# Packages the positive strand viral genome RNA into a helical ribonucleocapsid
# Includes the "internal" protein (from Coronavirus Pathogenesis)
# https://www.sciencedirect.com/topics/veterinary-science-and-veterinary-medicine/human-coronavirus-oc43
corona['nucleocapsid_phosphoprotein'] = translate(cc[28274-1:29533], True)

# might be called the internal protein (Coronavirus Pathogenesis)
corona['orf10'] = translate(cc[29558-1:29674], True)

class RNA:

def __init__(self):

self.corona['untranslated_region'] = cc[0:265]
self.corona['orf1a'] = translate(cc[266-1:13483], True)
self.corona['orf1b'] = translate(cc[13468-1:21555], False).strip("*") # chop off the stop, note this doesn't have a start
self.corona['spike_glycoprotein'] = translate(cc[21563-1:25384], True)
self.corona['orf3a'] = translate(cc[25393-1:26220], True)
self.corona['envelope_protein'] = translate(cc[26245-1:26472], True) # also known as small membrane
self.corona['membrane_glycoprotein'] = translate(cc[26523-1:27191], True)
self.corona['orf6'] = translate(cc[27202-1:27387], True)
self.corona['orf7a'] = translate(cc[27394-1:27759], True)
self.corona['orf7b'] = translate(cc[27756-1:27887], True) # is this one real?
self.corona['orf8'] = translate(cc[27894-1:28259], True)
self.corona['nucleocapsid_phosphoprotein'] = translate(cc[28274-1:29533], True)
self.corona['orf10'] = translate(cc[29558-1:29674], True)
24 changes: 14 additions & 10 deletions fold.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,20 @@
import sys
import argparse

parser = argparse.ArgumentParser(description='Fold some proteins.')
parser.add_argument('--scratch', action='store_true')
parser.add_argument('--temp', type=int, default=300)
parser.add_argument('--steps', type=int, default=100000, help="2500000000 should fold the protein")
parser.add_argument('--writes', type=int, default=1000, help="default is 1000")
parser.add_argument('--out', type=str, default="/tmp/output.pdb")
parser.add_argument('--pdb', type=str, default="proteins/villin/1vii.pdb")
parser.add_argument('--fasta', type=str, default=None)
args = parser.parse_args(sys.argv[1:])
class Fold:

def __init__(self):
self.parser = argparse.ArgumentParser(description='Fold some proteins.')
self.parser.add_argument('--scratch', action='store_true')
self.parser.add_argument('--temp', type=int, default=300)
self.parser.add_argument('--steps', type=int, default=100000, help="2500000000 should fold the protein")
self.parser.add_argument('--writes', type=int, default=1000, help="default is 1000")
self.parser.add_argument('--out', type=str, default="/tmp/output.pdb")
self.parser.add_argument('--pdb', type=str, default="proteins/villin/1vii.pdb")
self.parser.add_argument('--fasta', type=str, default=None)

a = Fold()
args = a.parser.parse_args(sys.argv[1:])

try:
platform = Platform.getPlatformByName("CUDA")
Expand Down Expand Up @@ -59,4 +64,3 @@
simulation.reporters.append(PDBReporter(args.out, steps_write))
simulation.reporters.append(StateDataReporter(stdout, steps_write, step=True, potentialEnergy=True, temperature=True))
simulation.step(steps)