Sunday, January 4, 2015

How life works, referring to Cells, Cell division, DNA, Genes, Chromosomes and proteins.

 ‘LIFE’, this word refers to the all living organisms on the earth. Without life they won’t be viable at all. ”CELL” is the basic functional and structural unit of the living organisms. On the basis of the structure of the cell there are two types of living organisms, prokaryotes and eukaryote. Prokaryotes (e.g bacteria, yeast) are simple living organisms and eukaryotes (mammals, birds) are more advanced complex living organisms. The main difference is prokaryotes are not having nucleus, only having nuclear material to regulate functions compared to the eukaryotes. Usually eukaryotes made of more than one cell while prokaryotes are single cell organisms with cytoplasm lined by cell membrane.
Life of living organisms is determined particular primary functions of the cells which are regulated by the functional components inside the cell. It is applicable for both prokaryotes and eukaryotes. Those particular functions which are salient for maintain the life of living organisms are growth and development, reproduction, metabolism, synthesis of enzymes and proteins, excretion, responding to external and internal stimuli etc. So all of the functions are regulated and maintained by the functional components of the cells it self. 
Major functional components that eukaryotic cell is having are cell membrane, cytoplasm, nucleus with nucleolus, mitochondria, ribosomes, rough endoplasmic reticulum(RER), smooth endoplasmic reticulum (SER) etc. Cell membrane keep the organelles inside the cell while keep the cells together and act as an outline which demarcates the cells from the outside environment. It is electively permeable and allowing the things to be moved inside and outside which assist in metabolism of the cell. Mitochondria are the energy producers of the cells which is a main component for the viability of the cells. The quantity of the mitochondria inside the cell is vary according to the type of cell and the energy demand. They generate energy as ATP which maintain most of vital primary functions of the cells. Synthesis of cellular proteins is the key component in maintaining life of living organisms. Enzymes are type of proteins which are functional workhorses of cells which account for 10000 types of  different proteins. Ribosomes, RER, nucleus are functional organelles participating protein synthesis. The nucleus is the control centre of a cell which containing genetic material in the form of DNA and also having information for synthesis of proteins. Ribosomes  locate in the cytosol and synthesise appropriate proteins when required by interpretation of the cellular information carried in the nucleus. RER produce lipids and proteins inside the cells and actively participate on cellular metabolism. Ribosomes are attached to the surface of them and therefore named as rough endoplasmic reticulum.
Major primary function of the cells which refers to the life of living organisms is reproduction. Reproduction is formation of daughter cells by parent cells. Reproduction is done by the means of cellular division. So ultimately cell division is more helpful in maintaining the life of a living organism. Ancient way of reproduction is seen in prokaryotes, which is named as binary division. In eukaryotes there are two types of cell division. They are meiosis andmitosis. Mitosis is a type of cell division allows multicellular organisms to grow and repair damaged cells and  tissues. Here division of parent cell into two identical daughter cells duplicating all the cellular organelles. In sexual reproduction meiosis type of cell division seen ( e.g. sperms, eggs). Here  one parent cell produces four daughter cells but they are having half the number of parent chromosomes and identical to each other. 
In the nucleus genetic material and information for the protein synthesis carried by DNA. This information carried in chromosomes which are packages of DNA. Human cells having 23 distinct chromosomes. Except germ cells (e.g. sperms, eggs) each somatic cell is having 2 copies of each chromosomes. 23 pairs account for 46 chromosomes in total. One chromosome comes from female parent and other one comes from male parent in each chromosome pair. Chromosomes contain most protein and DNA. DNA is the main genetic information carrier inside the cells. It is double stranded long linear molecule with strong polymer of nucleotide. Basic unit of DNA molecule is nucleotide which is a complex molecule made up from three components, sugar, nitrogenous base and phosphoric acid. Double helix is formed with base pairing, the bases are adenine(A), Guanine(G), thymine(T) and cytosine(C). DNA molecule can be several or million nucleotides length. And there is no order in which nucleotide join together. Discrete segment of DNA molecules stands for genes. So the nucleotide sequence of the DNA molecule represents the biological information carried by the genes which helpful in maintaining life of living organisms. So that nucleotide sequence is the most important factor in the genetics. DNA of higher organisms  is packed in the several chromosome in each cell. The total genetic material stored in the chromosomes of an organism is known as genome. Genes may lie on different polynucleotides of a DNA strand.the nucleotide sequence is the essential set of instructions for the synthesis of RNA molecule. RNA plays important role in transcribing genetic information DNA to proteins or enzymes. The process which translating genes into protein is called gene expression. This formed proteins or enzymes from the genetic material stored in the DNA molecule do the real work of the living organism maintaining it’s life. They make bones, cartilages, muscles, haemoglobin, hormones, antibodies stores, releases and convert energy inside cells. Proteins are sequences composed of amino acids. Nucleotide sequence of a m-RNA molecule translated into a particular amino acid sequence of corresponding protein. The sequence of nucleotide in m-RNA reading serial order in group of three nucleotide in DNA  strand, which is named as codon. Each triplet of nucleotide or codon specifies one amino acid in polypeptide chain of protein molecule. Only 20 types of amino acids are found in proteins and there are 64 codons for coding synthesis of those amino acid and it is more than enough. So in protein synthesis pathway DNA and RNA play key roles.because protein is a sequence of amino acids and amino acid sequence is determined by the nucleotide sequence of m-RNA molecule while sequence of m-RNA complement to the nucleotide sequence of DNA strand which stored genetic material.
So life of an living organism depends on the functional components of the cells including nucleus, chromosomes, DNA, RNA, ribosomes as well as primary vital functions of the cells such as reproduction by cell division,protein or enzyme synthesis etc.

Wednesday, December 24, 2014

OSX Tweaks

1. Command Line

sudo lsof -i -P



2. Yosemite Web Development Environment




3. JAVA


Intellij IDEA

4. Graphics


5. PHPMYADMIN


6. Ports an easy way to install open source software on mac

7. Toch

Better touch tool

8. Keyboard shortcuts

Screen Shot 2014-11-05 at 2.43.15 PM.png




9. Bash shortcuts


bash_profile
alias f="cd Work/FYP/"
alias e="sudo vim ~/.bash_profile"
alias u=". ~/.bash_profile"
~

10. Pages app writting mathematical formulas



11. Vim on mac

Vim enters the insert mode using i (or a for append), regardless of platform. Overwrite mode is only rarely entered using Shift+r. I've never used the Insert key here.


12. Terminator Equivalant

iTerm2

13. Install Sublime




14. Cut in Mac

Highlight the item(s) to be moved, and type command-C to copy it. Then navigate to the destination window, and rather than pressing command-V (or Edit>Paste item) , instead press Option-command-V (or hold down option when using the Edit menu). This changes "paste" into "move item here", i.e, the item will disappear from where it was copied. The result is equivalent to a "cut and paste."

15. Clip board Manager



16. Record Screen

Using quicktime player


17. Swipe Problem




Tuesday, December 23, 2014

Environmental Monitoring System for Colombo District

The main purpose of this Environmental Monitoring System is to collect and store various environmental data gathered from sensors located around the city. Apart from that, database should assist in providing information for reporting and analysis of the environmental condition in the city. 
The data entry will be done by an automated system. Database will be updated automatically with data sent wirelessly from the sensors. Sensors will send data with in10 minute time intervals to the database. Sensors will also store the readings for a day’s period to avoid the loss of data in case wireless transmission fails. The System is able to monitor the following environmental conditions atmospheric pressure, SO2, CO2 level in the atmosphere, rain fall, wind speed, wind direction, temperature and humidity. Front end of the database is a web interface which is used to monitor, maintain and analyse the database. To access the database users should sign in using the web interface. Access and privileges to the database differs from the each type of user. There are four user levels.
  • Administrative
  • Data Entry
  • Researcher
  • Guest


Each user levels access privileges are as follows.
AdministrativeLevel 
Administrative Level includes full access and authority to the web interface and the database. They will be also in charge of maintaining the database. Administrative level users will be given the ability of viewing, present and the past data stored in the database. Administrators can create new users with specific privileges. Also they have the ability to add a new sensor to the system. Most importantly they have the authority to back up the database as a safety measure.
DataEntryLevel 
This level provides authority to view the previously entered data within a week . Data Entry Level users have the ability to edit data entries(make a value null) in case if there is a malfunction in the sensor system it transmits an obliviously wrong set of values. Otherwise these wrong values will affect analysis done by the researches. Apart from that they can enter completely new data entries if the wireless transmission fails. 
ResearchLevel 
Research level is for the researchers who analyse the data. They can view all past and present data with in a customisable range of time. They are allowed to download data from the main server. 
GuestLevel 
Guest Level includes the general public. They have very limited access to the database. They are only allowed to view the data of present weather condition from the web interface. For an example they can view the present temperature, rainfall etc of certain area. But they will be entitled to view history of the environmental data within a week. 

Database Design
Functional and nonfunctional requirements relating to the system are as follows.
Functional Requirements 
The database should 
  • Allow the automated system to enter the statistical data from sensors periodically. 
  • Allow the system to update existing data. 
  • Allow data entry operator to enter new data entries. 
  • Allow authenticated users to access and view environmental data records according to
    their privileges. 
Non-functional Requirements
  • There is a wireless transmission system to get data from sensors. (WAN) 
  • There is a single database (Mysql). 
  • There is a well implemented security to each level of users in order to prevent data
    corruption which will cause false analysis at the end. 
  • Database have backup system to backup old data to make sure no data is lost in case of
    a failure in the central database 
Database was designed according to the principles of database designing and after careful considerations of the functional and nonfunctional requirements. Following are the list of major design decisions that has been taken and rationale for taking those dictions 
  • To reduce the redundancy in database created a separate location table to store details about the locations and created foreign key constrained with other entities. Use of foreign keys help to keep data integrity which is used to aid the programmer to manipulate data in the correct way.
  • Created several views in order to hide data complexity and protect the data. For example when weather conditions are shown to the clients natural join of several tables are done through views excluding information which is not needed to the client.
  • Database updates rapidly in 24/7 from the readings of the sensors. Therefore database grows fast. Most of the time the users only need the most recent data(within a week).Doing quarrying on a large database reduces the performance. To overcome this, data which is older than 1 week are stored in separate table.
  • The database is  designed  in a way which allows to backup data in separate storage space. Above mentioned tables are used to backup data.
  • Decided to create several user levels with different privileges to access and view the database to increase the security.
  • Database is in the First Normal Form.
  • Decided to make location_id and sensor_id of 8 digits integers, so that the first two digits of the sensor_id will indicate which type of a sensor the and next two digits will indicate the year of the sensor which was installed and the last 4 digits will be the sensor number. In location_id, the first two digits will indicate the district number and the next three digits will indicate the sector and the last 3 is the location number.

ER/EER diagrams 


Database schema for EMS 



Implementation 
Initial implementation process 
After designing the ER diagrams and database schema for the EMS next step was to choose the suitable implementation methods to create the database and the User Interface. The first challenge is to choose the suitable database type for implement the database. From the choices available, MySQL was chosen for implementing the database. MySQL is good for web apps and it integrates nicely with PHP and other web page developing languages, and as its community server is free. Also MySQL is widely used in the society. Also it has portability, security, Scalability. 
The next task was to choose the suitable DBMS application type. For that purpose it has been considered the following aspects 
  • This DBMS will be accessed by multiple users at the same time. 
  • Those multiple users will do several different tasks at the same time. 
  • Those multiple users will not be located inside same premises. 
  • The number of users is not fixed. 
  • Different user types will have different level of privileges. 
  • All the data should have to be synchronously updated. 
  • Data have to be secured. 
  • Database is updated simultaneously with the data sent from the sensors. 
  • All the people can access this through the Internet. 
So after considering the above facts the model that has been chosen was a  web server with a single database back-end and web clients. All the data and the logic of the DBMS will be resides in the web server and client will be query the server with HTTP to accomplish their tasks. To accomplish the above we created a web site using HTML, PHP and JAVA Scripts. And integrate it with the MySQL database. 
Overall implementation process 
In the web server there will be a MySQL database resides with all the data. Web server will query the database with MySQL queries to store, retrieve find and edit the data. Data validation, arrangement will be done by the server logic. 
All the logic, validations, authentications and entering data and retrieval of data will be govern by the web server. That will be the interface of the database for the outside. Server will run on PHP. Client users HTTP request to accomplish their tasks. On those request server will do queries to the database to achieve the requested tasks. When the server receives those request, it will analyse and process those before executing queries. That will guarantee those rules and regulation of the system. 

Functionalities 
General functionalities 
Any user who visits the web application will be able to see the most recent weather condition in every location of the city.

Web Application will provide authentication of user with login information.

According the user level application will provide different functionalities.

Functionality Provided to Administrator 
View all past and present data by selecting a time period and a environmental condition 

Delete erroneous data entries


Add new users to the system


Ability to add data manually to the system if there is problem with the wireless transmission of data


Backup old data to archive


Functionality Provided to Data Entry level user 
Add new data entries 

Delete erroneous data entries 


View data within a week period by selecting particular data type


Functionality Provided to Research level user 
View all past and present data by selecting time period 


Functionality Provided to Guest level user
View weather condition in Colombo City area within a week.