In [12]:
#calculate cost of sequencing 245 mbp at 2001 price, 10,000 per 1Mbg
cost=10000.00
bp1=248 #Mpbs for chromosome 1
bp2=242
bp3=198
bp4=190
bp5=181
bp6=170
bp7=159
bp8=145
bp9=138
bp10=133
bp11=135
bp12=133
bp13=114
bp14=107
bp15=101
bp16=90
bp17=83
bp18=80
bp19=58
bp20=64
bp21=46
bp22=50
bpx=156
bpy=57
total_cost = cost*bp1 + cost*bp2 + cost*bp3 + cost*bp4 + cost*bp5 + cost*bp6 + cost*bp7 + cost*bp8 + cost*bp9 + cost*bp10 + cost*bp11 + cost*bp12 + cost*bp13 + cost*bp14 + cost*bp15 + cost*bp16 + cost*bp17 + cost*bp18 + cost*bp19 + cost*bp20 + cost*bp21 + cost*bp22 + cost*bpx + cost*bpy
In [9]:
import pandas as pd
# Read the Excel file
data = pd.read_excel("CHrompose.xltx") #for .xls, make sure 'xlrd' is installed
In [10]:
data
Out[10]:
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 [14]:
total_cost
Out[14]:
30780000.0
In [15]:
#calculate cost of sequencing 245 mbp at 2001 price, 10,000 per 1Mbg
cost=0.10
bp1=248 #Mpbs for chromosome 1
bp2=242
bp3=198
bp4=190
bp5=181
bp6=170
bp7=159
bp8=145
bp9=138
bp10=133
bp11=135
bp12=133
bp13=114
bp14=107
bp15=101
bp16=90
bp17=83
bp18=80
bp19=58
bp20=64
bp21=46
bp22=50
bpx=156
bpy=57
total_cost = cost*bp1 + cost*bp2 + cost*bp3 + cost*bp4 + cost*bp5 + cost*bp6 + cost*bp7 + cost*bp8 + cost*bp9 + cost*bp10 + cost*bp11 + cost*bp12 + cost*bp13 + cost*bp14 + cost*bp15 + cost*bp16 + cost*bp17 + cost*bp18 + cost*bp19 + cost*bp20 + cost*bp21 + cost*bp22 + cost*bpx + cost*bpy
In [16]:
total_cost
Out[16]:
307.80000000000007
In [17]:
#calculate cost of sequencing 245 mbp at 2001 price, 10,000 per 1Mbg
cost=0.01
bp1=248 #Mpbs for chromosome 1
bp2=242
bp3=198
bp4=190
bp5=181
bp6=170
bp7=159
bp8=145
bp9=138
bp10=133
bp11=135
bp12=133
bp13=114
bp14=107
bp15=101
bp16=90
bp17=83
bp18=80
bp19=58
bp20=64
bp21=46
bp22=50
bpx=156
bpy=57
total_cost = cost*bp1 + cost*bp2 + cost*bp3 + cost*bp4 + cost*bp5 + cost*bp6 + cost*bp7 + cost*bp8 + cost*bp9 + cost*bp10 + cost*bp11 + cost*bp12 + cost*bp13 + cost*bp14 + cost*bp15 + cost*bp16 + cost*bp17 + cost*bp18 + cost*bp19 + cost*bp20 + cost*bp21 + cost*bp22 + cost*bpx + cost*bpy
In [18]:
total_cost
Out[18]:
30.78
In [ ]: