19 February 2013





Math Programming,
et al


In the previous post we talked about math programming, calculations, and coding. Before I proceed, I’d like to apologize for my long hiatus from this series. In actuality, I had laser surgery in my left eye and am still awaiting the same surgery, this time in my right eye. (My health insurance will not allow treatment in both eyes on the same day, but rather, at least 90 days in between.) So, of course, I had some post treatment irritations in the left eye for which I had to drop some meds in the affected one. Nevertheless, as is said, "Keep on coding."

On a lighter note, I recently updated my armamentarium gadget-wise. The gadgets namely are a Nexus 7 tablet with 32GB internal memory along with wifi and 3G capabilities. Along with that, I  gota separate Android smartphone: an LG Optimus L E615 Dual Sim. This gives my eyes some exercise to perform. The reason for the acquisitions was not an electronic whim, but rather work purposes. I’m developing medical apps for the Android platform, mathematical apps in particular for calculating biophysics values. 


But do let me proceed from where I last covered a few days ago, and that was, commercial software for math purposes eg MATLAB, Maple, and Mathematica. To be fair to the open-source arena, we have MATLAB-based progs such as Freemat, SciLab, and GNU-Octave. For more data analysis and visualization needs you can try out SciDAVIS (requires Python 2.6) along with the aforementioned programs all available on the sourceforge.net website. There are quite a number of math and information analysis programs and one should be willing to search for the apps for one’s specific needs. 

Incidentally, several of these programs need pre-installed JVM (Java Virtual Machine), C++ compiler, or Python in any of its specific versions. It is worthwhile noting that these programming languages are cross-platform. So whether PC or Mac, or even Linux, there is a recipe just cut out for you, more or less.



You, and the User

Your needs, as well as user’s needs, will narrow down your choices for programming language or environment. Programs aren’t built in a day. So experience and patience are keys to your development timeline. Did we mention budget too? Let’s not forget that one.

What is the best language for your needs? The answer is open to discussion. If you are developing for the Windows platform, then C++ (Visual, or Intel) compilers will be quite useful. Like I mentioned earlier, these languages are mostly cross-platform and the compiler you use will depend on your own machine and for your intended audience. 


Python is quite handy for mathematics applications. You will need to install the Python environment on your computer. Python is a high-level language and is used a lot as a scripting language, available from the 2.4 version to the latest 3.3 version and above.


Java, both a programming language and a software platform, is almost always needed as a necessary environment on basically every computing machine, from desktops to car auto-navigation, and operating environments. In this regard, you may be using these a lot for embedded systems or Android app development.


Let me not forget Sage, a great piece of scientific and mathematics software system. And it’s free too! It does work on a Virtual Machine app like Virtual Box in Windows.



Time and Patience

It will take a bit of time learning how to encode your algorithms in any of the intended platform languages. You will have to learn basic computer programming principles. There are a plethora of books, Wikis, and videos to learn from. I will include a list of sources below, and hope you can make use of them. In the meantime understand your needs and what platform you are writing programs for. If you are hoping to deliver this program to the community, or even monetize the program, then it will be wise to learn certain distribution principles (even Marketing principles) so you get to see where your activity is intended for. From Medical Imaging to Electronic Health Record (EHR) needs, it’s all coding.



I can’t possibly cover all there is to know about programming in a blog post as this for now. If you send comments, or email me about your interest in specific programming issues then I will send you a bit of programming nuggets. Keep in touch: no worthwhile programming is done in total isolation from the community.  And do link back to this blog. Or, Like this on your Facebook page,  or Twitter. Many thanks as always!



Links:

For Open Source:



Python>

Python official website http://www.python.org/


Python 3.3 Documentation http://docs.python.org/2/tutorial/

matplotlib (a mathematics plotting environment for Python) http://matplotlib.org/



C++>

C++ Standards Foundation website http://isocpp.org/,

C++ FAQ from its founder’s website http://www.stroustrup.com/


C and C++ Programming tutorials http://www.cprogramming.com/tutorial.html

MinGW-Minimalist GNU for Windows http://www.mingw.org/

MinGW –W64 for 32 and 64 bit Windows http://mingw-w64.sourceforge.net/


ARM Linux GCC – OS X Mountain Lion (Mac, of course) http://www.benmont.com/tech/crosscompiler.html


JAVA>

JAVA  for end-users http://www.java.com/en/

JAVA for developers (Oracle website) http://www.oracle.com/technetwork/java/index.html

BioJAVA for processing biologic data http://biojava.org/wiki/Main_Page


For Commercial Options:


Embarcadero C++ Builder XE3 for Windows 8 and Mac http://www.embarcadero.com/products/cbuilder
Other Commercial options are mentioned on the Official Websites for the specific languages as cited above.


Extra: 3 Tips for a Good Presentation:
1: Be Real;
2: Be Interactive;
3: Be Simple.



Productivity App for the week:

Cribr (for Windows) for making Cheat Sheets.



Happy Coding! Develop for the Future and not the Past.



Fernando Yaakov Lalana, M.D. 

PS: Remember- A 64-bit operating system can run 32-bit software, but a 32-bit operating system can not run 64-bit software.







09 January 2013




Math: Getting it Right



Whether you’re baking Grandma’s favourite chocolate cake, or working on file encryption routines, one principle stands out- get the math right. While some jobs are satisfactory with an estimate, more often than not, it is a rigorous working out of an algorithm that is vital to the success of the work. Intuitive calculations do play a role in program design. But to get an accurate outcome one must be able to code the algorithm with precision. We’ve all heard of GIGO. And this holds true in program design and testing. Even if one has the latest digital programmable calculator, or a robust 64-bit computer, the flow of program instructions leaves no room for guesswork. For our purpose today we will talk about the importance of accuracy in application development.


Application development, or, software development holds at its core “solutions programming.” This means the process of design and writing of programs that intends to solve a particular problem or group of problems with a common purpose. This process oftentimes begins with back-of-the-envelope notes and/or diagrams. Such notes may delineate the program flow. Crucial to the flow of the program is the algorithm, input values, and output characteristics. But before actual code is written, the developer or team of developers must engage in program design. A classic tool for this is flowcharting. Whether one uses flowcharting programs, or plastic layout stencils (of previous years), the process is inherently similar. But let’s make one thing clear: at the heart of an algorithm is a mathematical formula. It may be a solution for an ordinary differential equation, or a character sorting algorithm. Therefore, the requirements for a program, based on research and/or market demand, must be well delineated before any design begins. In a competitive world we must also be able to create a better product than the competition. Of course, in a market based economy there’s room for everybody. Nevertheless we must improve continuously or lay waste by the wayside.


The choice of computer language for the application will depend on several factors. If the application is an extension of a preexisting system, the application will be written in the language of that system. The application in this scenario is usually called a module, or “add-in.” Some languages are better fit for scientific programs. In this case, the language has a large library of functions, and “calls” to the specific functions are easier to implement than writing a function from scratch. Some mathematical software packages are used by industrial, scientific, and engineering sectors. These packages are available in commercial offerings and cost a major investment to an organization. Examples of these offerings are Matlab, Maple, and Mathematica. Sometimes these programs become the lingua franca of the industry. These packages offer advantages easily adapted for a particular engineering problem.


Open-source programs have been developed for a wide array of applications as well. Like the commercial mainstream applications, these open-source applications are also extensible. These extensions may be available “off-the-shelf” or written by the particular industry team whose programmers are familiar with the engineering process.  Whether the application is a “stand alone” program, or a module, the same principles of design are applicable.


Writing the program once it is designed is a laborious process that can be undertaken by an individual, or a coding team.  If one solitary author writes the code, he may be better able to tie the pieces of code together. This may take a very long time though, since he has to check everything him- or herself.  This may be fine for small- to medium- size projects. But large-scale programs are better written by a team of developers, each responsible for a certain portion of the program. The task of syncing the program sections or components is distributed among the program writers. The project leader, or leaders, then checks and rechecks the code. The use of an IDE (Integrated Development Environment) facilitates both coding and checking your program. IDEs have been developed with the programmer in mind, and are available for specific languages and frameworks.The IDE is in itself a program for writing programs.


The integrity of the code is verified only by rigorous testing. It is not just a question of whether the program runs, but also if the code is optimized or tuned. Software testing is carried out by both, members of the programming team and the potential users. The question is then-does the program do its job and do it well? And this oftentimes differentiates between a lackluster program and a beautifully coded and optimized application. It is not a matter of adding unnecessary bells-and-whistles to a program, that in turn create bloatware. Not only that- it can differentiate between your program and that of the competition.


Both software testing and application lifecycle management (ALM) are essential activities of the software maker. In spite of the initial development of a good product, software updates and upgrades are necessary and keep the program evolving. Needs change and new needs arise.  Software development teams listen to market trends in order to deliver a relevant product. One frequently overlooked activity in software development is good documentation. This activity aims to assist the developer as well as the user. For the developer, good documentation keeps the project in focus. Also, it helps the software developer assist the user with regards to overall structure of the program as well as its functions.


Launching of the product comes only after several cycles of testing in all operating conditions. Whether one is a freelance programmer or a member of a software development team, the rules of software maintenance are the same. Some teams or companies release small frequent updates, or, upgrades  with major improvements and features, with release dates somewhat far between.  From designing to prototyping to actual coding, the software author commits himself to a tough discipline.  Whether one belongs to a Fortune 500 company, a university biomedical statistics team, or a game-programming outfit, or even an enthusiast web- or mobile- app designer, the stages of software development are essentially the same. It is a creative process, with ups and downs.  With writer’s block, and with free-flowing moments; it is a craft, and an art.

In any case: get the math right.


Work smart.

Fernando Yaakov Lalana, M.D.






24 December 2012


Lest I forget...

May Everybody have a 

Great Holiday Season!

May all your days be Healthy and Bright!!

from:
Fernando Yaakov Lalana, M.D.
SISTEMA Bio~SIGNA

13 December 2012

Maths? Are you talking to me?
If we were to make a survey of math attitudes in the public, the results would vary depending from what sector we would be making it. I might propose roughly 3 different responses: 1) My everyday work depends on it, 2) I use it only when my activity might warrant it, 3) I don’t like math.
Attitudes and responses to math depend on conditioning and experience, like most any attitudes. If one is born with a talent, math might not be as problematic as with the rest of the group. But math requires also a skill honed over time. If, for example, the child is taught at home before he even starts formal schooling, he/she may be at a fairly good advantage. The school instructors also play a crucial and long lasting impression on the student. A memory, whether encouraging or discouraging, is imprinted on the individual learner, and at that, for a considerable length of time. That will spell the difference between initiative or simple lack of interest. If the student was rewarded for a right answer to the problem, the school instructor will be playing an important positive learning experience that will last for a long time beyond the school arena.
The instructor should fertilize an environment of openness and adaptability in the classroom and in the student. And there must be an application of the subject learned, an application without which the material may be forgotten. The student must be, thence, a good and practical problem solver. After all, we are to be life-long problem solvers.
This will be it for now. For your info, this post was written on a new Samsung i5 (Third Generation Micro processor) based laptop with 4GB RAM, and 2GB graphics memory. This I purchased just yesterday because the laptop I had been using went bonkers and I would have to replace the hard disk, cooling fan, heat sink, and a new battery as well. This new laptop is on a 1-week test drive. I hope it doesn’t give me any problems. If it does, I’m replacing it.

Stay safe. Be a problem solver.

Fernando Yaakov Lalana, M.D.

30 November 2012

Hello guys. These are indeed difficult times. But not without some relief. A long good look at the budget deficit, or, the weather, and you will agree that the grey clouds will be around a bit more. But we must be hopeful, whichever way. Well, to be honest, the past week has been a tad difficult for myself and my family. We've had a death in the family, namely, my 92-year-old foster mom. She was the last of that batch of great folks that weathered wars here and there. I need not say more. Oh yes, my PC has been in and out of the technician's shop. I had to fix the Windows aspect, while the repair people still have to install a new cooling fan and heat sink. So either tomorrow or on Monday, this laptop will be in for surgery. Quite simply, a overheating problem caused the unit to shut down by itself quite a number of times. This caused a corruption of Windows that eventually was unrecoverable. Hopefully, things will work out. An ultrabook in the horizon? Who knows. In the meantime, I'm preparing for the up and coming posts, which I hope will tickle your frontal lobe. Stay tuned. Stay safe. Fernando Yaakov Lalana, M.D.

15 November 2012

NOTICE: Please be patient. Experiencing difficulties due to Windows and hardware issues. Will be back soon. Thank you. -Fernando Yaakov Lalana,M.D.

01 November 2012

Lives Lost-Lives Changed

In lieu of the new scheduled post, I choose to send a message to the people of the US eastern seaboard. My heart goes out to all those who lost their loved ones in the worst disaster to hit the East Coast in a century. Likewise, to all those who lost property as well as life's memories my heartiest embrace and sympathy. These are indeed trying times, to say the least. But it is in times like these that the courage and love for their fellow neighbors shine through. Government officials, Firefighters, Medical Personnel and Ordinary Citizens have shown extraordinary love and resilience, hurdles notwithstanding, in reaching out and caring for the weak and the afflicted. All of these things demonstrate the devotion they have for the good of their fellow man. May all this serve as an example to the rest of the nation and the world.

Stay Safe.

Fernando Yaakov Lalana, M.D.




17 October 2012


Theranostics = Therapeutics + Diagnostics


- Before we go into the topic for today, we must take a quick look at the just recently held Nobel Prize awards (Science). Every year since 1901, the Nobel Prize has been awarded for accomplishments in physics, chemistry, physiology or medicine, literature and for peace. Alfred Bernhard Nobel, a Swedish chemist, engineer, innovator, and armaments manufacturer, held 350 different patents, dynamite being the most famous. He used his fortune to posthumously institute the Nobel Prizes. Three of the Nobel prizes are relevant to bioinformatics: Chemistry, Physics, and Physiology and Medicine



Nobel Prize - Chemistry 2012


The Nobel Prize in Chemistry 2012 was awarded jointly to Robert J. Lefkowitz and Brian K. Kobilka" for studies of G-protein-coupled receptors" "The Nobel Prize in Chemistry". Nobelprize.org. 12 Oct 2012 http://www.nobelprize.org/nobel_prizes/chemistry/



Nobel Prize - Physics 2012

The Nobel Prize in Physics 2012 was awarded jointly to Serge Haroche and David J. Wineland "for ground-breaking experimental methods that enable measuring and manipulation of individual quantum systems" "The Nobel Prize in Physics". Nobelprize.org. 12 Oct 2012 http://www.nobelprize.org/nobel_prizes/physics/

Nobel Prize - Physiology or Medicine 2012

The Nobel Prize in Physiology or Medicine 2012 was awarded jointly to Sir John B. Gurdon and Shinya Yamanaka "for the discovery that mature cells can be reprogrammed to become pluripotent" "The Nobel Prize in Physiology or Medicine 2012". Nobelprize.org. 12 Oct 2012 http://www.nobelprize.org/nobel_prizes/medicine/laureates/2012/

For more Nobel Prize info,visit

Nobel Prize Main Web Page here 

Regarding the prize for Chemistry involving G-Protein Coupled Receptors, there is a noteworthy webpage dealing with this study and development area. It is here 

There are quite a few applications using the G-CPR mechanism. One salient one has been in the chemistry of opioid substances in the area of Structural Neurobiology. For more on this feature, kindly visit The StevensLaboratory


Having mentioned the above, we now move on to what may be, in my opinion, the next arena for prize-winning developments. 



Theranostics - Buzzword?, or, the next Big Thing?

 - As mentioned earlier, Theranostics is an area of Medical development that combines the principles of therapeutics and the processes of diagnostics. It is touted as the very important facet of personalized Medicine, pharmacogenomics, and molecular imaging. In this arena, a treatment option, whether a patient can be either helped, or harmed by a treatment modality, can be identified by imaging with nanopores, Quantum Dots, “tagged” immunoglobulins, and others. What’s more is that theranostics aims to improve treatment outcomes and the overall safety of the patient. On the other hand, the incorporation of theranostics-based examinations and procedures requires much-needed resources and more specialized training. So it must demonstrate cost-effectiveness across the board. However, if developed judiciously, theranostics may well be the eventual cost-effective business model for this decade and the next and beyond.

Four Facets of Theranostics:

1. Diagnostic agent.  2. Carrier agent. 

 - We will start with the diagnostic elements. There are many developments involving MRI and the use of magnetic particles as the contrast agent. In atherosclerosis, for example, in one study, atherosclerotic lesions (in rabbits) containing accumulations of ultrasmall superparamagnetic iron oxides (USPIO) were detected. The  study protocol entailed performing MRI and histologic studies to compare the uptake of dextran- and mannan-dextran-coated USPIO (D-USPIO and DM-USPIO, respectively) by the atherosclerotic walls of rabbits.[1]   Dextran, a polysaccharide consisting of many glucose units, has been used extensively clinically and in the laboratory owing to its ability to exert osmotic pressure[2]. Mannans are polysaccharides consisting of mannose units and have diverse effects depending on the fraction used and the state of purification. Mannans’ different mechanisms function at different levels depending upon the specific phenomenon being influenced. Whereas dextran is a polymer of glucose, yeast mannan is a polymer consisting entirely of mannose. In this study, the investigators analyzed the signal to-noise ratio (SNR) of the aortic wall in the same region of interest (ROI) and this was calculated in both in vivo and in vitro studies. Next, histologic assessment was carried out and showed that iron-positive regions were significantly larger in rabbits injected with DM- rather than D-USPIO (P < 0.05) for all doses. The investigators suggest that DM-USPIO is superior to D-USPIO for the study of atherosclerotic lesions in rabbits. 

 - This is an example of a diagnostic agent, supermagnetic iron-oxide particles, delivered by the Mannan-Dextran as the carrier agent, and the diagnostic modality was imaging via nuclear magnetic resonance. It is almost like the proverbial golden shoe that fit the damsel’s foot. 


3. Targeting agent. 4. Therapeutic agent.


 - Tests, regardless of modality, would be of no import if there was no therapeutic system that would improve treatment outcome. Currently, the standards for diagnostic examination are still in the hands of the classic clinical laboratory, radiology, and physiologic signal analysis (e.g. EEG, EKG, EMG). Nevertheless, clinical bedside diagnostics still play a vital part of patient care. This is when the clinician and patient set the tone for a better outlook, and where confidence between patient and clinician is irreplaceable. Why? Because the ethical, psychological, and cognitive aspects in Medical Practice dictate that the patient is above any test and of foremost importance in decision making.


 - Drug, chemical, or other treatment choices may be either broad spectrum or highly selective. On many occasions clinicians are faced with a patient with aggressive, late stage malignancy.  When the most “suitable” (for reducing the tumor) drug(s) are toxic to the patient, the physician has to maximize new technology that may be of help. And this is an area where theranostics will be of utmost help to the patient. After histologic and surgical classification (of the tumor), the next appropriate step would be to utilize a diagnostic procedure as mentioned in the study above, or other specialized imaging modality.

 - Quercetin, a plant-derived flavonoid, is derived from quercetum (oak forest), and is a hydrophobic antioxidant-- which purportedly scavenges damaging particles in the body known as free radicals, which damage cell membranes, tamper with DNA, and even cause cell death. Found in fruits, vegetables, leaves and grains, it has been used since the late 1800s for a wide variety of purposes. It is sold as a herbal dietary supplement, and touted to have anti-infllammatory, anti-viral, and anti-cancer agent, to name a few properties. While neither the US FDA nor the American Cancer Society have approved quercitin for cancer or any medical condition, it has been the subject of research until now because of its potential anticancer activity. 

 - In one study, quercitin was loaded into monomethoxy poly(ethylene glycol)-poly(ε-caprolactone). These loaded micelles (QU/MPEG-PCL)  given via intravenous route  significantly suppressed the growth of established xenograft A2780S ovarian tumors through causing cancer cell apoptosis and inhibiting angiogenesis in vivo. Furthermore, the anticancer activity of quercetin on ovarian cancer cells was studied in vitro. [3] This is an example of nano-formulation of treatment agent (quercitin) and drug delivery agent (MPEG-PCL).

 - We have talked about a few examples where new technologies improve health outcome, or at least identified available tools in theranostics, which make it more possible to select the treatment of choice in difficult clinical circumstances. A thorough understanding of the potentials of theranostics, as well as  its current limitations will make us more competent in our own sphere of work. While this management modality is still in its infancy,  a good systematic review and analysis of clinical and laboratory data will allow us to wield new weapons in our fight against disease.

References:
  1. Tsuchiya K, Nitta N, Sonoda A, Nitta-Seko A, Ohta S, Takahashi M, Murata K, Mukaisho K, Shiomi M, Tabata Y, Nohara S.;Evaluation of atherosclerotic lesions using dextran- and mannan-dextran-coated USPIO: MRI analysis and pathological findings. Int J Nanomedicine. 2012;80. Epub 2012 May 
  2. Dextran /PHARMACOSMOS; http://www.dextran.net/dextran-chemistry.html
  3. Xiang Gao ,  BiLan Wang,  XiaWei Wei ,  Ke Men ,  Fengjin Zheng ,          Yingfeng Zhou , Yu Zheng ,  MaLing Gou ,  Meijuan Huang,  Gang       Guo,  Ning Huang,  ZhiYong Qian  and  Yuquan Wei Anticancer effect and     mechanism of polymer micelle-encapsulated quercetin on ovarian cancer Nanoscale, 2012, Advance Article
 
 - Stay focused. Work smart. 'Til the next...


 - Fernando Yaakov Lalana, M.D.