Semantic Snips – Update


I am having some spare time. So I am taking the liberty to compile Semantic Snippets.

I’m using few handpicked resources to ensure everything is consistent. So all the code will be mash up of

At this stage I do not intend provide comprehensive guide to how html5 should be used as above resources are more than enough. Just compilation of snippets inline with best practice for different use cases with references to additional reading materials.

Some of this issues may be subjected to debate. I certainly welcome that

You can view the progress here:

https://github.com/Shavindra/SemanticSnips/

Advertisements

CATH Introduction – BioInformatics


CATH DATABASE Link

What is CATH?

Cath is a database of manually curated protein domain structures. It’s a hierarchical domain classification of protein structures in the Protein Data Bank. Protein structures are classified using a combination of automated and manual procedures. There are four major levels in this hierarchy:

  • Class – structures are classified according to their secondary structure composition (mostly alpha, mostly beta, mixed alpha/beta or few secondary structures).
  • Architecture – structures are classified according to their overall shape as determined by the orientations of the secondary structures in 3D space but ignores the connectivity between them.
  • Topology (fold family) – structures are grouped into fold groups at this level depending on both the overall shape and connectivity of the secondary structures.
  • Homologous superfamily – this level groups together protein domains which are thought to share a common ancestor and can therefore be described as homologous.

Cath Domain

structure Domains are regions of contiguous polypeptide chain that have been described as compact, local, and semi-independent units. Within a protein, domains can be anything from independant globular units joined only by a flexible length of polypeptide chain, to units which have a very extensive interface. There are a number of algorithms that have been developed to detect domains automatically, some of which have been incorporated into the CATH update protocol. Many domains, however, still …

Calculating average using a perl script


Ok here is the basic perl script for calculating average.

I assume you know how to run the script if you dont ( I will put up a tutorial later so for now dig around in other forms )

Perl Script for calculating average from another file

#!/usr/bin/perl
#calculate averate from a file

use strict;

my $total = 0;
my $count =0;
while (my $line = <>) {
      $total +=$line;
      $count ++=;
}
print "Average = ", $total / $count, "\n";

So the  explaniation for the above code is…

use strict; – allow to find simple mistakes

to find the $average need to calculate

my $total

and the total number of lines

my $count

At the begining of the loop these values are 0.

therefore define the inital value

my $total  = 0;
my $count =0;

So now what you need to do this read each line andadd each value consequtively.

while (my $line = <>) {
   $total += $line;
   $count ++=;
 }
print "Average = ", $total / $count, "\n";

Read the first line.  Then add then and the value read to the total inital value  of 0.

   $total = $line + $total

calculate the total

   $count = $count + 1

calculate the total number of lines read
this can be written in short form as below

   $total += $line;
   $count ++=;

then go back in loop adding value conseutively until there are no more lines to read and then print the line

print "Average = ", $total / $count, "\n";

Hope this is clear I will put a anotated diagram up with more explanation later on.

Back to school


Finally I am doing MSc. I didn’t do quite well in BEng as I hoped. I didn’t listen to my lecturer at the time.

You can’t look after anyone else if you don’t look after your self

Those were her exact words and something that failed to listen at the time but never forget any more. It’s been haunting me forever. Hopefully MSc in BioInformatics would allow me to put that right. Leave the nightmare behind.

I think I was quite lucky to get in to MSc. I got  ripped apart in my interview. My references came in very late. I am still not properly enrolled because I am waiting for the documents to come through. So I got to make the most of this. But this would be just the beginning.  2 evenings per week (learn Unix, Perl and Java). It’s going to be fun. Brings back some some bad memories and some good memories. Oh and I am totally not using the MSc as an excuse to break my bank to buy one of those Alienware :D.

In the coming weeks I will be putting up the Tutorials I’ve learnt here. Mainly as a personal record and also hope it would be use to someone.

 

Java Tutorial – Installing JAVA SE Development Kit (JDK)


Before writing a JAVA program first need to download JDK which allows write JAVA and compile the code.

  1. Download appropriate JAVA SE Development Kit (JDK) for your operating system
  2. Run the Installation
  3. Navigate to C:\Program Files\Java\jdk1.7.0\bin (this location may change in any instance you want to navigate to bin in JDK installation) make sure you have the .exe files there.
  4. copy the location of the bin C:\Program Files\Java\jdk1.7.0\bin
  5. Right click on computer and select properties > Advanced System settings > Environment variablesenvironment variables location
  6. Click on New and Variable name as Path and variable value as location of the bin so in my case it would be C:\Program Files\Java\jdk1.7.0\binUser Variable
  7. Click OK  OK
  8. To make sure compiler is working and ready for JAVA programming open cmd and run JavaC and if Java Compliler is working should get some random code as belowJavaC Working
Special thanks to Bucky Roberts for the clear accompanying video tutorial 

XAMPP Troubleshooting Apache won’t start


Configuring XAMPP for use in Windows

Issue #1 Apache server would not start.

Check for php.ini in the apache location below. For me it was missing php.ini file from drive:\xampp\apache\bin

Fix: #1 copy php.ini file from drive:\xampp\php and paste it in to the -> drive:\xampp\apache\bin

Issue #2 Localhost conguration of the XAMPP/Apache.

I did a port check it showed default port 80 was used by system (i.e. have IIS running) so http://localhost would not load the default xamp page instead it load the site I have in inetpub XAMPP Portc check

I use Tomcat (HTTP) port: 8080. In the above screen status shows it’s been used by a program. I am running XAMPP Apache hence its NOT free. if it’s not free and another program using that program shut it down (Skype is annoyance and often it’s skype).

If you have IIS running as well then you have to either

  1. Uninstall IIS
  2. Shut down IIS or
  3. Configure APACHE to use another port if you want to keep IIS running.

Fix1: Uninstall IIS

Programs > Windows features Turn on / Off > untick off Internet Information Systems >save

Fix2: Shutdown IIS

Right click and run cmd (windows command line) as an administrator and use the following commands

iisrest /stop

windows may restart IIS each time you turn n computer so you may have to run this command.

please make note of the following commands to restart IIS
iisrset /restart
iisreset /start

Fix3: Configure APACHE to use another port if you want IIS running at the same time

Configure the httpd.conf file located in the location below installation location drive: \xampp\apache\conf Locate following in the file #Listen 0.0.0.0:80 #Listen [::]:80 Listen 80 and ServerName localhost:80 change these to #Listen 0.0.0.0:8080 #Listen [::]:8080 Listen 8080 and ServerName localhost:8080 and save to get it all working make sure your URLs are as below.

Update: Video tutorial

I found this video Youtube (credits: GSNTube5)

I see alot of views on this page. I hope this is working for you. Please comment whether this worked for you or not. It would help others.