In [4]:
%%writefile simulation_run_3.py
#!/usr/bin/env python
#SBATCH --mem=8000
import subprocess as sp
import os
import sys
jobindex = int(sys.argv[1])
currentindex = -1
mrnafiles = filter(lambda x: x.startswith('yfp'), os.listdir('../annotations/simulations/run3/'))
mrnafiles = ['../annotations/simulations/run3/' + File for File in mrnafiles]
terminationandStallStrengths = [
('--5prime-preterm-rate',0,'../processeddata/simulations/run3_stallstrengthfits_trafficjam.tsv'),
('--5prime-preterm-rate',1,'../processeddata/simulations/run3_stallstrengthfits_5primepreterm.tsv'),
('--selective-preterm-rate',1,'../processeddata/simulations/run3_stallstrengthfits_selpreterm.tsv'),
]
for mrnafile in mrnafiles:
currentindex += 1
if currentindex != jobindex:
continue
for typeOfTermination, terminationRate, stallstrengthfile in terminationandStallStrengths:
cmd = ' '.join([
'./reporter_simulation',
'--trna-concn', '../annotations/simulations/leucine.starvation.average.trna.concentrations.tsv',
typeOfTermination,
'%0.2g'%terminationRate,
'--threshold-accommodation-rate', '22',
'--output-prefix','../rawdata/simulations/run3/',
'--stall-strength-file', stallstrengthfile,
'--input-genes', mrnafile
])
sp.check_output(cmd, shell=True)
In [5]:
import subprocess as sp
# loop submits each simulation to a different node of the cluster
for index in range(40):
sp.check_output([
'sbatch', # for SLURM cluster; this line can be commented out if running locally
'-t', '30', # for SLURM cluster; this line can be commented out if running locally
'-n', '1', # for SLURM cluster; this line can be commented out if running locally
'simulation_run_3.py',
str(index)
])
In [6]:
%%writefile simulation_run_4.py
#!/usr/bin/env python
#SBATCH --mem=8000
import subprocess as sp
import os
import sys
jobindex = int(sys.argv[1])
currentindex = -1
mrnafiles = filter(lambda x: x.startswith('yfp'), os.listdir('../annotations/simulations/run4/'))
mrnafiles = ['../annotations/simulations/run4/' + File for File in mrnafiles]
terminationandStallStrengths = [
('--5prime-preterm-rate',0,'../processeddata/simulations/run4_stallstrengthfits_trafficjam.tsv'),
('--5prime-preterm-rate',1,'../processeddata/simulations/run4_stallstrengthfits_5primepreterm.tsv'),
('--selective-preterm-rate',1,'../processeddata/simulations/run4_stallstrengthfits_selpreterm.tsv'),
]
for mrnafile in mrnafiles:
currentindex += 1
if currentindex != jobindex:
continue
for typeOfTermination, terminationRate, stallstrengthfile in terminationandStallStrengths:
cmd = ' '.join([
'./reporter_simulation',
'--trna-concn', '../annotations/simulations/leucine.starvation.average.trna.concentrations.tsv',
typeOfTermination,
'%0.2g'%terminationRate,
'--threshold-accommodation-rate', '22',
'--output-prefix','../rawdata/simulations/run4/',
'--stall-strength-file', stallstrengthfile,
'--input-genes', mrnafile
])
sp.check_output(cmd, shell=True)
In [7]:
import subprocess as sp
# loop submits each simulation to a different node of the cluster
for index in range(30):
sp.check_output([
'sbatch', # for SLURM cluster; this line can be commented out if running locally
'-t', '30', # for SLURM cluster; this line can be commented out if running locally
'-n', '1', # for SLURM cluster; this line can be commented out if running locally
'simulation_run_4.py',
str(index)
])
In [9]:
%%writefile simulation_run_5.py
#!/usr/bin/env python
#SBATCH --mem=8000
import subprocess as sp
import os
import sys
jobindex = int(sys.argv[1])
currentindex = -1
mrnafiles = filter(lambda x: x.startswith('yfp'), os.listdir('../annotations/simulations/run5/'))
mrnafiles = ['../annotations/simulations/run5/' + File for File in mrnafiles]
terminationandStallStrengths = [
('--5prime-preterm-rate',0,'../processeddata/simulations/run5_stallstrengthfits_trafficjam.tsv'),
('--5prime-preterm-rate',1,'../processeddata/simulations/run5_stallstrengthfits_5primepreterm.tsv'),
('--selective-preterm-rate',1,'../processeddata/simulations/run5_stallstrengthfits_selpreterm.tsv'),
]
for mrnafile in mrnafiles:
currentindex += 1
if currentindex != jobindex:
continue
for typeOfTermination, terminationRate, stallstrengthfile in terminationandStallStrengths:
cmd = ' '.join([
'./reporter_simulation',
'--trna-concn', '../annotations/simulations/leucine.starvation.average.trna.concentrations.tsv',
typeOfTermination,
'%0.2g'%terminationRate,
'--threshold-accommodation-rate', '22',
'--output-prefix','../rawdata/simulations/run5/',
'--stall-strength-file', stallstrengthfile,
'--input-genes', mrnafile
])
sp.check_output(cmd, shell=True)
In [10]:
import subprocess as sp
# loop submits each simulation to a different node of the cluster
for index in range(20):
sp.check_output([
'sbatch', # for SLURM cluster; this line can be commented out if running locally
'-t', '30', # for SLURM cluster; this line can be commented out if running locally
'-n', '1', # for SLURM cluster; this line can be commented out if running locally
'simulation_run_5.py',
str(index)
])
In [11]:
%%writefile simulation_run_14.py
#!/usr/bin/env python
#SBATCH --mem=8000
import subprocess as sp
import os
import sys
jobindex = int(sys.argv[1])
currentindex = -1
mrnafiles = filter(lambda x: x.startswith('yfp'), os.listdir('../annotations/simulations/run14/'))
mrnafiles = ['../annotations/simulations/run14/' + File for File in mrnafiles]
terminationandStallStrengths = [
('--5prime-preterm-rate',0,'../processeddata/simulations/run14_stallstrengthfits_trafficjam.tsv'),
('--5prime-preterm-rate',1,'../processeddata/simulations/run14_stallstrengthfits_5primepreterm.tsv'),
('--selective-preterm-rate',1,'../processeddata/simulations/run14_stallstrengthfits_selpreterm.tsv'),
]
for mrnafile in mrnafiles:
currentindex += 1
if currentindex != jobindex:
continue
for typeOfTermination, terminationRate, stallstrengthfile in terminationandStallStrengths:
cmd = ' '.join([
'./reporter_simulation',
'--trna-concn', '../annotations/simulations/serine.starvation.average.trna.concentrations.tsv',
typeOfTermination,
'%0.2g'%terminationRate,
'--threshold-accommodation-rate', '22',
'--output-prefix','../rawdata/simulations/run14/',
'--stall-strength-file', stallstrengthfile,
'--input-genes', mrnafile
])
sp.check_output(cmd, shell=True)
In [12]:
import subprocess as sp
# loop submits each simulation to a different node of the cluster
for index in range(15):
sp.check_output([
'sbatch', # for SLURM cluster; this line can be commented out if running locally
'-t', '30', # for SLURM cluster; this line can be commented out if running locally
'-n', '1', # for SLURM cluster; this line can be commented out if running locally
'simulation_run_14.py',
str(index)
])
In [14]:
%%writefile simulation_run_15.py
#!/usr/bin/env python
#SBATCH --mem=8000
import subprocess as sp
import os
import sys
jobindex = int(sys.argv[1])
currentindex = -1
mrnafiles = filter(lambda x: x.startswith('yfp'), os.listdir('../annotations/simulations/run15/'))
mrnafiles = ['../annotations/simulations/run15/' + File for File in mrnafiles]
terminationandStallStrengths = [
('--5prime-preterm-rate',0,'../processeddata/simulations/run15_stallstrengthfits_trafficjam.tsv'),
('--5prime-preterm-rate',1,'../processeddata/simulations/run15_stallstrengthfits_5primepreterm.tsv'),
('--selective-preterm-rate',1,'../processeddata/simulations/run15_stallstrengthfits_selpreterm.tsv'),
]
for mrnafile in mrnafiles:
currentindex += 1
if currentindex != jobindex:
continue
for typeOfTermination, terminationRate, stallstrengthfile in terminationandStallStrengths:
cmd = ' '.join([
'./reporter_simulation',
'--trna-concn', '../annotations/simulations/serine.starvation.average.trna.concentrations.tsv',
typeOfTermination,
'%0.2g'%terminationRate,
'--threshold-accommodation-rate', '22',
'--output-prefix','../rawdata/simulations/run15/',
'--stall-strength-file', stallstrengthfile,
'--input-genes', mrnafile
])
sp.check_output(cmd, shell=True)
In [15]:
import subprocess as sp
# loop submits each simulation to a different node of the cluster
for index in range(15):
sp.check_output([
'sbatch', # for SLURM cluster; this line can be commented out if running locally
'-t', '30', # for SLURM cluster; this line can be commented out if running locally
'-n', '1', # for SLURM cluster; this line can be commented out if running locally
'simulation_run_15.py',
str(index)
])
In [16]:
%%writefile simulation_run_16.py
#!/usr/bin/env python
#SBATCH --mem=8000
import subprocess as sp
import os
import sys
jobindex = int(sys.argv[1])
currentindex = -1
mrnafiles = filter(lambda x: x.startswith('yfp'), os.listdir('../annotations/simulations/run16/'))
mrnafiles = ['../annotations/simulations/run16/' + File for File in mrnafiles]
terminationandStallStrengths = [
('--5prime-preterm-rate',0,'../processeddata/simulations/run16_stallstrengthfits_trafficjam.tsv'),
('--5prime-preterm-rate',1,'../processeddata/simulations/run16_stallstrengthfits_5primepreterm.tsv'),
('--selective-preterm-rate',1,'../processeddata/simulations/run16_stallstrengthfits_selpreterm.tsv'),
]
for mrnafile in mrnafiles:
currentindex += 1
if currentindex != jobindex:
continue
for typeOfTermination, terminationRate, stallstrengthfile in terminationandStallStrengths:
cmd = ' '.join([
'./reporter_simulation',
'--trna-concn', '../annotations/simulations/leucine.starvation.average.trna.concentrations.tsv',
typeOfTermination,
'%0.2g'%terminationRate,
'--threshold-accommodation-rate', '22',
'--output-prefix','../rawdata/simulations/run16/',
'--stall-strength-file', stallstrengthfile,
'--input-genes', mrnafile
])
sp.check_output(cmd, shell=True)
In [17]:
import subprocess as sp
# loop submits each simulation to a different node of the cluster
for index in range(18):
sp.check_output([
'sbatch', # for SLURM cluster; this line can be commented out if running locally
'-t', '30', # for SLURM cluster; this line can be commented out if running locally
'-n', '1', # for SLURM cluster; this line can be commented out if running locally
'simulation_run_16.py',
str(index)
])
In [18]:
%%writefile simulation_run_6.py
#!/usr/bin/env python
#SBATCH --mem=8000
import subprocess as sp
import os
import sys
jobindex = int(sys.argv[1])
currentindex = -1
mrnafiles = filter(lambda x: x.startswith('yfp'), os.listdir('../annotations/simulations/run6/'))
mrnafiles = ['../annotations/simulations/run6/' + File for File in mrnafiles]
terminationandStallStrengths = [
('--5prime-preterm-rate',0,'../processeddata/simulations/runs678_stallstrengthfits_trafficjam.tsv'),
('--5prime-preterm-rate',1,'../processeddata/simulations/runs678_stallstrengthfits_5primepreterm.tsv'),
('--selective-preterm-rate',1,'../processeddata/simulations/runs678_stallstrengthfits_selpreterm.tsv'),
]
for mrnafile in mrnafiles:
currentindex += 1
if currentindex != jobindex:
continue
for typeOfTermination, terminationRate, stallstrengthfile in terminationandStallStrengths:
cmd = ' '.join([
'./reporter_simulation',
'--trna-concn', '../annotations/simulations/leucine.starvation.average.trna.concentrations.tsv',
typeOfTermination,
'%0.2g'%terminationRate,
'--threshold-accommodation-rate', '22',
'--output-prefix','../rawdata/simulations/run6/',
'--stall-strength-file', stallstrengthfile,
'--input-genes', mrnafile
])
sp.check_output(cmd, shell=True)
In [19]:
import subprocess as sp
# loop submits each simulation to a different node of the cluster
for index in range(8):
sp.check_output([
'sbatch', # for SLURM cluster; this line can be commented out if running locally
'-t', '10', # for SLURM cluster; this line can be commented out if running locally
'-n', '1', # for SLURM cluster; this line can be commented out if running locally
'simulation_run_6.py',
str(index)
])
In [20]:
%%writefile simulation_run_7.py
#!/usr/bin/env python
#SBATCH --mem=8000
import subprocess as sp
import os
import sys
jobindex = int(sys.argv[1])
currentindex = -1
mrnafiles = filter(lambda x: x.startswith('yfp'), os.listdir('../annotations/simulations/run7/'))
mrnafiles = ['../annotations/simulations/run7/' + File for File in mrnafiles]
terminationandStallStrengths = [
('--5prime-preterm-rate',0,'../processeddata/simulations/runs678_stallstrengthfits_trafficjam.tsv'),
('--5prime-preterm-rate',1,'../processeddata/simulations/runs678_stallstrengthfits_5primepreterm.tsv'),
('--selective-preterm-rate',1,'../processeddata/simulations/runs678_stallstrengthfits_selpreterm.tsv'),
]
for mrnafile in mrnafiles:
currentindex += 1
if currentindex != jobindex:
continue
for typeOfTermination, terminationRate, stallstrengthfile in terminationandStallStrengths:
cmd = ' '.join([
'./reporter_simulation',
'--trna-concn', '../annotations/simulations/leucine.starvation.average.trna.concentrations.tsv',
typeOfTermination,
'%0.2g'%terminationRate,
'--threshold-accommodation-rate', '22',
'--output-prefix','../rawdata/simulations/run7/',
'--stall-strength-file', stallstrengthfile,
'--input-genes', mrnafile
])
sp.check_output(cmd, shell=True)
In [21]:
import subprocess as sp
# loop submits each simulation to a different node of the cluster
for index in range(9):
sp.check_output([
'sbatch', # for SLURM cluster; this line can be commented out if running locally
'-t', '30', # for SLURM cluster; this line can be commented out if running locally
'-n', '1', # for SLURM cluster; this line can be commented out if running locally
'simulation_run_7.py',
str(index)
])
In [23]:
%%writefile simulation_run_8.py
#!/usr/bin/env python
#SBATCH --mem=8000
import subprocess as sp
import os
import sys
jobindex = int(sys.argv[1])
currentindex = -1
mrnafiles = filter(lambda x: x.startswith('yfp'), os.listdir('../annotations/simulations/run8/'))
mrnafiles = ['../annotations/simulations/run8/' + File for File in mrnafiles]
terminationandStallStrengths = [
('--5prime-preterm-rate',0,'../processeddata/simulations/runs678_stallstrengthfits_trafficjam.tsv'),
('--5prime-preterm-rate',1,'../processeddata/simulations/runs678_stallstrengthfits_5primepreterm.tsv'),
('--selective-preterm-rate',1,'../processeddata/simulations/runs678_stallstrengthfits_selpreterm.tsv'),
]
for mrnafile in mrnafiles:
currentindex += 1
if currentindex != jobindex:
continue
for typeOfTermination, terminationRate, stallstrengthfile in terminationandStallStrengths:
cmd = ' '.join([
'./reporter_simulation',
'--trna-concn', '../annotations/simulations/leucine.starvation.average.trna.concentrations.tsv',
typeOfTermination,
'%0.2g'%terminationRate,
'--threshold-accommodation-rate', '22',
'--output-prefix','../rawdata/simulations/run8/',
'--stall-strength-file', stallstrengthfile,
'--input-genes', mrnafile
])
sp.check_output(cmd, shell=True)
In [24]:
import subprocess as sp
# loop submits each simulation to a different node of the cluster
for index in range(238):
sp.check_output([
'sbatch', # for SLURM cluster; this line can be commented out if running locally
'-t', '10', # for SLURM cluster; this line can be commented out if running locally
'-n', '1', # for SLURM cluster; this line can be commented out if running locally
'simulation_run_8.py',
str(index)
])
In [26]:
%%writefile simulation_run_9.py
#!/usr/bin/env python
#SBATCH --mem=8000
import subprocess as sp
import os
import sys
import numpy as np
jobindex = int(sys.argv[1])
currentindex = -1
mrnafiles = ['../annotations/simulations/run4/yfp_cta18_initiationrate_0.3.csv']
# use experimental fits for stall strengths from run 4
terminationandStallStrengths = [
('--5prime-preterm-rate','../processeddata/simulations/run4_stallstrengthfits_5primepreterm.tsv'),
('--background-preterm-rate','../processeddata/simulations/run4_stallstrengthfits_selpreterm.tsv'),
('--selective-preterm-rate','../processeddata/simulations/run4_stallstrengthfits_selpreterm.tsv'),
]
for mrnafile in mrnafiles:
for typeOfTermination, stallstrengthfile in terminationandStallStrengths:
for terminationRate in [0] + list(10.0**np.arange(-2,1.01,0.05)):
currentindex += 1
if currentindex != jobindex:
continue
cmd = ' '.join([
'./reporter_simulation',
'--trna-concn', '../annotations/simulations/leucine.starvation.average.trna.concentrations.tsv',
typeOfTermination,
'%0.4g'%terminationRate,
'--threshold-accommodation-rate', '22',
'--output-prefix','../rawdata/simulations/run9/',
'--stall-strength-file', stallstrengthfile,
'--input-genes', mrnafile
])
sp.check_output(cmd, shell=True)
In [1]:
import subprocess as sp
# loop submits each simulation to a different node of the cluster
for index in range(200):
sp.check_output([
'sbatch', # for SLURM cluster; this line can be commented out if running locally
'-t', '20', # for SLURM cluster; this line can be commented out if running locally
'-n', '1', # for SLURM cluster; this line can be commented out if running locally
'simulation_run_9.py',
str(index)
])
In [31]:
%%writefile simulation_run_11.py
#!/usr/bin/env python
#SBATCH --mem=8000
import subprocess as sp
import os
import sys
jobindex = int(sys.argv[1])
currentindex = -1
mrnafiles = list(filter(lambda x: x.startswith('yfp'), os.listdir('../annotations/simulations/run11/')))
mrnafiles = ['../annotations/simulations/run11/' + File for File in mrnafiles]
terminationandStallStrengths = [
('--5prime-preterm-rate',0,'../processeddata/simulations/run11_stallstrengthfits_trafficjam.tsv'),
('--5prime-preterm-rate',1,'../processeddata/simulations/run11_stallstrengthfits_5primepreterm.tsv'),
('--selective-preterm-rate',1,'../processeddata/simulations/run11_stallstrengthfits_selpreterm.tsv'),
]
for mrnafile in mrnafiles:
currentindex += 1
if currentindex != jobindex:
continue
for typeOfTermination, terminationRate, stallstrengthfile in terminationandStallStrengths:
cmd = ' '.join([
'./reporter_simulation',
'--trna-concn', '../annotations/simulations/leucine.starvation.average.trna.concentrations.tsv',
typeOfTermination,
'%0.2g'%terminationRate,
'--threshold-accommodation-rate', '22',
'--output-prefix','../rawdata/simulations/run11/',
'--stall-strength-file', stallstrengthfile,
'--input-genes', mrnafile
])
sp.check_output(cmd, shell=True)
In [32]:
import subprocess as sp
# loop submits each simulation to a different node of the cluster
for index in range(20):
sp.check_output([
'sbatch', # for SLURM cluster; this line can be commented out if running locally
'-t', '30', # for SLURM cluster; this line can be commented out if running locally
'-n', '1', # for SLURM cluster; this line can be commented out if running locally
'simulation_run_11.py',
str(index)
])