This is my first jupyter notebook
import matplotlib.pyplot as plt
import numpy as np
#calcuate cost of sequencing 245Mbp at price, $10,000 per 1Mbp
cost_2001 = 10000.00
cost_2011 = 0.10
cost_2021 = 0.01
cost = 0.001
bp1 = 248 #Mbps to chromosome 1
bp2 = 242
total = cost*(bp1+bp2)
total
0.49
import pandas as pd
#read the excel file
data = pd.read_excel(r"C:\Users\QBPAM\Downloads\CHrompose2.xlsx")
data
chromosomes | basepairs | |
---|---|---|
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 |
data["sequencing_cost_2001"] = (data["basepairs"]*cost_2001)/(10**6)
data["sequencing_cost_2001"]
0 2489564.22 1 2421935.29 2 1982955.59 3 1902145.55 4 1815382.59 5 1708059.79 6 1593459.73 7 1451386.36 8 1383947.17 9 1337974.22 10 1350866.22 11 1332753.09 12 1143643.28 13 1070437.18 14 1019911.89 15 903383.45 16 832574.41 17 803732.85 18 586176.16 19 644441.67 20 467099.83 21 508184.68 22 1560408.95 23 572274.15 Name: sequencing_cost_2001, dtype: float64
total_2001 = data["sequencing_cost_2001"].sum()
print(total_2001)
30882698.32
data["sequencing_cost_2011"] = (data["basepairs"]*cost_2011)/(10**6)
data["sequencing_cost_2011"]
0 24.895642 1 24.219353 2 19.829556 3 19.021455 4 18.153826 5 17.080598 6 15.934597 7 14.513864 8 13.839472 9 13.379742 10 13.508662 11 13.327531 12 11.436433 13 10.704372 14 10.199119 15 9.033834 16 8.325744 17 8.037328 18 5.861762 19 6.444417 20 4.670998 21 5.081847 22 15.604090 23 5.722741 Name: sequencing_cost_2011, dtype: float64
total_2011 = data["sequencing_cost_2011"].sum()
print(total_2011)
308.8269832
data["sequencing_cost_2021"] = (data["basepairs"]*cost_2021)/(10**6)
data["sequencing_cost_2021"]
0 2.489564 1 2.421935 2 1.982956 3 1.902146 4 1.815383 5 1.708060 6 1.593460 7 1.451386 8 1.383947 9 1.337974 10 1.350866 11 1.332753 12 1.143643 13 1.070437 14 1.019912 15 0.903383 16 0.832574 17 0.803733 18 0.586176 19 0.644442 20 0.467100 21 0.508185 22 1.560409 23 0.572274 Name: sequencing_cost_2021, dtype: float64
total_2021 = data["sequencing_cost_2021"].sum()
print(total_2021)
30.882698320000003
print("The total cost in 2001 was $", total_2001, ", the total cost in 2011 was $", total_2011, ", and the total cost in 2021 was $", total_2021)
The total cost in 2001 was $ 30882698.32 , the total cost in 2011 was $ 308.8269832 , and the total cost in 2021 was $ 30.882698320000003