This is my first Jupyter Notebook.
In [7]:
import matplotlib.pyplot as plt
import numpy as np
In [17]:
import numpy as np
x = np.linspace (0,2,100)
y=2*x
fig, ax = plt.subplots()
ax.plot (x,y, color='purple')
ax.set_xlabel("x axis")
ax.set_ylabel("y axis")
plt.show()
In [18]:
x
Out[18]:
array([0. , 0.02020202, 0.04040404, 0.06060606, 0.08080808, 0.1010101 , 0.12121212, 0.14141414, 0.16161616, 0.18181818, 0.2020202 , 0.22222222, 0.24242424, 0.26262626, 0.28282828, 0.3030303 , 0.32323232, 0.34343434, 0.36363636, 0.38383838, 0.4040404 , 0.42424242, 0.44444444, 0.46464646, 0.48484848, 0.50505051, 0.52525253, 0.54545455, 0.56565657, 0.58585859, 0.60606061, 0.62626263, 0.64646465, 0.66666667, 0.68686869, 0.70707071, 0.72727273, 0.74747475, 0.76767677, 0.78787879, 0.80808081, 0.82828283, 0.84848485, 0.86868687, 0.88888889, 0.90909091, 0.92929293, 0.94949495, 0.96969697, 0.98989899, 1.01010101, 1.03030303, 1.05050505, 1.07070707, 1.09090909, 1.11111111, 1.13131313, 1.15151515, 1.17171717, 1.19191919, 1.21212121, 1.23232323, 1.25252525, 1.27272727, 1.29292929, 1.31313131, 1.33333333, 1.35353535, 1.37373737, 1.39393939, 1.41414141, 1.43434343, 1.45454545, 1.47474747, 1.49494949, 1.51515152, 1.53535354, 1.55555556, 1.57575758, 1.5959596 , 1.61616162, 1.63636364, 1.65656566, 1.67676768, 1.6969697 , 1.71717172, 1.73737374, 1.75757576, 1.77777778, 1.7979798 , 1.81818182, 1.83838384, 1.85858586, 1.87878788, 1.8989899 , 1.91919192, 1.93939394, 1.95959596, 1.97979798, 2. ])
In [21]:
#calculate costs of sequencing 245Mbp at 2001 price, $10,000 1Mbp
cost=0.01
bp1=248
bp2=242
total_cost=cost*bp1+cost*bp2
print(total_cost)
4.9
In [27]:
import pandas as pd
data = pd.read_excel("CHrompose.xltx")
In [28]:
data
Out[28]:
chrmoosomes | baspepiars | |
---|---|---|
0 | 1 | 248956422 |
1 | 2 | 242193529 |
2 | 3 | 198295559 |
3 | 4 | 190214555 |
4 | 5 | 181538259 |
5 | 6 | 170805979 |
6 | 7 | 159345973 |
7 | 8 | 145138636 |
8 | 9 | 138394717 |
9 | 10 | 133797422 |
10 | 11 | 135086622 |
11 | 12 | 133275309 |
12 | 13 | 114364328 |
13 | 14 | 107043718 |
14 | 15 | 101991189 |
15 | 16 | 90338345 |
16 | 17 | 83257441 |
17 | 18 | 80373285 |
18 | 19 | 58617616 |
19 | 20 | 64444167 |
20 | 21 | 46709983 |
21 | 22 | 50818468 |
22 | X | 156040895 |
23 | Y | 57227415 |
In [30]:
cost_2001 = 10000
cost_2011 = 0.1
cost_2021 = 0.01
In [52]:
data['sequencing_cost_2001'] = data['baspepiars']*cost_2001/1000000
data['sequencing_cost_2011'] = data['baspepiars']*cost_2011/1000000
data['sequencing_cost_2021'] = data['baspepiars']*cost_2021/1000000
In [54]:
data
Out[54]:
chrmoosomes | baspepiars | sequencing_cost_2001 | sequencing_cost_2011 | sequencing_cost_2021 | |
---|---|---|---|---|---|
0 | 1 | 248956422 | 24895642.2 | 248.956422 | 24.895642 |
1 | 2 | 242193529 | 24219352.9 | 242.193529 | 24.219353 |
2 | 3 | 198295559 | 19829555.9 | 198.295559 | 19.829556 |
3 | 4 | 190214555 | 19021455.5 | 190.214555 | 19.021456 |
4 | 5 | 181538259 | 18153825.9 | 181.538259 | 18.153826 |
5 | 6 | 170805979 | 17080597.9 | 170.805979 | 17.080598 |
6 | 7 | 159345973 | 15934597.3 | 159.345973 | 15.934597 |
7 | 8 | 145138636 | 14513863.6 | 145.138636 | 14.513864 |
8 | 9 | 138394717 | 13839471.7 | 138.394717 | 13.839472 |
9 | 10 | 133797422 | 13379742.2 | 133.797422 | 13.379742 |
10 | 11 | 135086622 | 13508662.2 | 135.086622 | 13.508662 |
11 | 12 | 133275309 | 13327530.9 | 133.275309 | 13.327531 |
12 | 13 | 114364328 | 11436432.8 | 114.364328 | 11.436433 |
13 | 14 | 107043718 | 10704371.8 | 107.043718 | 10.704372 |
14 | 15 | 101991189 | 10199118.9 | 101.991189 | 10.199119 |
15 | 16 | 90338345 | 9033834.5 | 90.338345 | 9.033835 |
16 | 17 | 83257441 | 8325744.1 | 83.257441 | 8.325744 |
17 | 18 | 80373285 | 8037328.5 | 80.373285 | 8.037328 |
18 | 19 | 58617616 | 5861761.6 | 58.617616 | 5.861762 |
19 | 20 | 64444167 | 6444416.7 | 64.444167 | 6.444417 |
20 | 21 | 46709983 | 4670998.3 | 46.709983 | 4.670998 |
21 | 22 | 50818468 | 5081846.8 | 50.818468 | 5.081847 |
22 | X | 156040895 | 15604089.5 | 156.040895 | 15.604089 |
23 | Y | 57227415 | 5722741.5 | 57.227415 | 5.722742 |
In [55]:
total_cost_2001=data['sequencing_cost_2001'].sum()
In [56]:
print(total_cost_2001)
308826983.2
In [57]:
total_cost_2011=data['sequencing_cost_2011'].sum()
In [58]:
print(total_cost_2011)
3088.269832
In [59]:
total_cost_2021=data['sequencing_cost_2021'].sum()
In [60]:
print(total_cost_2021)
308.8269832
In [ ]: