Python Programming for Biology: Bioinformatics and Beyond



Download 7,75 Mb.
Pdf ko'rish
bet240/514
Sana30.12.2021
Hajmi7,75 Mb.
#91066
1   ...   236   237   238   239   240   241   242   243   ...   514
Bog'liq
[Tim J. Stevens, Wayne Boucher] Python Programming

Handling array data

The Python examples for microarrays that we describe involve creating our own kind of

object.  We  are  not  forced  to  take  this  approach,  and  could  work  with  isolated  numeric

arrays or use Python data structures like lists or dictionaries. However, we want to show

how  object  orientation  can  organise  data  in  a  helpful  way,  improving  consistency  and

convenience. In this case we will define one class of custom object called a Microarray,

which as the name suggests will house all the data relating to one microarray experiment

(which in turn represents lots of spots of miniature sub-experiments). This class of object

will contain all the microarray data in terms of what each array spot element represents (in

terms of conditions or components) as well as the detected signals for each spot element.

We  will  store  the  arrays  of  signal  information  as  two-dimensional  NumPy  arrays,  which

will  make  doing  mathematical  operations  easier,  but  the  rest  of  the  data  model  will  be

regular Python for ease of bookkeeping.

The  Microarray  class  will  also  contain  its  own  functions  (i.e.  methods  for  that  class)

that will operate on the data contained within the data structure. This is a convenient way

to write a program because you do not have to import the functions or pass the microarray

object into the operation, rather the class gains methods that are innately bound to the data,

and  thus  they  are  immediately  accessible  to  it.  The  downside  of  doing  this  is  that  the

programming  is  a  little  trickier,  which  is  why  for  teaching  purposes  we  initially  avoid

classes  in  the  book,  but  it  is  generally  good  practice  to  use  this  style  when  you  have  a

distinct concept that pulls all the data together, albeit a microarray or a molecular structure

(as  illustrated  in

Chapter  8

).  So  although  there  may  be  more  programming  in  the  initial

instance things will hopefully be easier in the long run.


Download 7,75 Mb.

Do'stlaringiz bilan baham:
1   ...   236   237   238   239   240   241   242   243   ...   514




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish