This is my first jupyter notebook
In [2]:
import matplotlib.pyplot as plt
import numpy as np
In [7]:
x = np.linspace (0,2,100)
#y=x**2
y=2*x
fig, ax = plt.subplots()
#ax.plot (x,y)
ax.plot(x, y, color='red') # Change 'red' to any color you want
ax.set_xlabel("x axis")
ax.set_ylabel("y axis")
plt.show()
In [4]:
x
Out[4]:
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 [20]:
#calculate costs of sequencing 245Mbp at 2001 price, $10,000 per 1MPbg
#cost=10000.00
cost=0.001
bp1=248 #Mpbs fo chromosome 1
bp2 = 242
total_cost = cost*bp1 + cost*bp2
print(total_cost)
0.49
In [41]:
import pandas as pd
# Read the Excel file
data = pd.read_excel("CHrompose.xltx") # For .xls, make sure 'xlrd' is installed
In [42]:
data
Out[42]:
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 [55]:
#cost in $ to sequence 1Mega bps.
cost_2001 = 10000.00
cost_2011 = 0.10
cost_2021 = 0.01
In [46]:
#df['Sequencing_Cost'] = df['Length_Mbps'] * 10000
data['squencing_cost_2001']=data['baspepiars']*cost_2001/1000000
In [47]:
data
Out[47]:
chrmoosomes | baspepiars | squencing_cost_2001 | |
---|---|---|---|
0 | 1 | 248956422 | 2489564.22 |
1 | 2 | 242193529 | 2421935.29 |
2 | 3 | 198295559 | 1982955.59 |
3 | 4 | 190214555 | 1902145.55 |
4 | 5 | 181538259 | 1815382.59 |
5 | 6 | 170805979 | 1708059.79 |
6 | 7 | 159345973 | 1593459.73 |
7 | 8 | 145138636 | 1451386.36 |
8 | 9 | 138394717 | 1383947.17 |
9 | 10 | 133797422 | 1337974.22 |
10 | 11 | 135086622 | 1350866.22 |
11 | 12 | 133275309 | 1332753.09 |
12 | 13 | 114364328 | 1143643.28 |
13 | 14 | 107043718 | 1070437.18 |
14 | 15 | 101991189 | 1019911.89 |
15 | 16 | 90338345 | 903383.45 |
16 | 17 | 83257441 | 832574.41 |
17 | 18 | 80373285 | 803732.85 |
18 | 19 | 58617616 | 586176.16 |
19 | 20 | 64444167 | 644441.67 |
20 | 21 | 46709983 | 467099.83 |
21 | 22 | 50818468 | 508184.68 |
22 | X | 156040895 | 1560408.95 |
23 | Y | 57227415 | 572274.15 |
In [48]:
data['squencing_cost_2011']=data['baspepiars']*cost_2011/1000000
In [49]:
data['squencing_cost_2021']=data['baspepiars']*cost_2021/1000000
In [50]:
data
Out[50]:
chrmoosomes | baspepiars | squencing_cost_2001 | squencing_cost_2011 | squencing_cost_2021 | |
---|---|---|---|---|---|
0 | 1 | 248956422 | 2489564.22 | 24.895642 | 2.489564 |
1 | 2 | 242193529 | 2421935.29 | 24.219353 | 2.421935 |
2 | 3 | 198295559 | 1982955.59 | 19.829556 | 1.982956 |
3 | 4 | 190214555 | 1902145.55 | 19.021455 | 1.902146 |
4 | 5 | 181538259 | 1815382.59 | 18.153826 | 1.815383 |
5 | 6 | 170805979 | 1708059.79 | 17.080598 | 1.708060 |
6 | 7 | 159345973 | 1593459.73 | 15.934597 | 1.593460 |
7 | 8 | 145138636 | 1451386.36 | 14.513864 | 1.451386 |
8 | 9 | 138394717 | 1383947.17 | 13.839472 | 1.383947 |
9 | 10 | 133797422 | 1337974.22 | 13.379742 | 1.337974 |
10 | 11 | 135086622 | 1350866.22 | 13.508662 | 1.350866 |
11 | 12 | 133275309 | 1332753.09 | 13.327531 | 1.332753 |
12 | 13 | 114364328 | 1143643.28 | 11.436433 | 1.143643 |
13 | 14 | 107043718 | 1070437.18 | 10.704372 | 1.070437 |
14 | 15 | 101991189 | 1019911.89 | 10.199119 | 1.019912 |
15 | 16 | 90338345 | 903383.45 | 9.033834 | 0.903383 |
16 | 17 | 83257441 | 832574.41 | 8.325744 | 0.832574 |
17 | 18 | 80373285 | 803732.85 | 8.037328 | 0.803733 |
18 | 19 | 58617616 | 586176.16 | 5.861762 | 0.586176 |
19 | 20 | 64444167 | 644441.67 | 6.444417 | 0.644442 |
20 | 21 | 46709983 | 467099.83 | 4.670998 | 0.467100 |
21 | 22 | 50818468 | 508184.68 | 5.081847 | 0.508185 |
22 | X | 156040895 | 1560408.95 | 15.604090 | 1.560409 |
23 | Y | 57227415 | 572274.15 | 5.722741 | 0.572274 |
In [51]:
total_cost_2001=data['squencing_cost_2001'].sum()
In [52]:
print(total_cost_2001)
30882698.32
In [53]:
total_cost_2011=data['squencing_cost_2011'].sum()
print(total_cost_2011)
308.8269832
In [54]:
total_cost_2021=data['squencing_cost_2021'].sum()
print(total_cost_2021)
30.882698320000003
In [ ]: