Posts

NCBI BLAST Graphical Summary using HTML/CSS

Image
This is a simple tutorial for designing a webpage for displaying the graphical summary of biological sequence alignment similar to the output of the NCBI BLAST+ program using HTML and CSS languages. In this tutorial, I have given few example hits (in bars) that match all range of bit scores (mentioned by color key). NCBI BLAST Graphical Summary NCBI BLAST is a most popular bioinformatics framework for finding local similarity between two or more biological sequences. It addresses a fundamental problem in bioinformatics research. The heuristic algorithm it uses is much faster than other approaches, such as calculating an optimal alignment. This emphasis on speed is vital to making the algorithm practical on the huge genome databases currently available, although subsequent algorithms can be even faster. In NCBI BLAST, the graphic is an overview of the database sequences aligned to the query sequence. These are represented horizontal bars colored coded by score and showing the ex...

ATCG Content of Multiple Gene Sequences using C++

Image
This is a simple tutorial for computing ATCG contents of multiple gene sequences using the classes, objects, and members in C++. In this tutorial, I have used Dev C++ v5.11 software for compiling the C++ program. Program Design A. Define a class to represent a gene sequence data. Include the following members: Data members: Gene name Gene ID Length A, T, G, C content Member functions: To read data for a gene To compute A, T, G, C content To display all the details of a gene B. Write a main program to test the program by reading n gene sequences data. Source Code /* Computing ATCG Content of Multiple Gene Sequences */ #include <iostream> #include <iomanip> #include <conio.h> #include <string.h> #include <stdlib.h> class gene { char r, gene_name[20][20], gene_seq[20][200], gene_id[20][20], id[20]; int gene_length, a, t, c, g, o, n, i, j, m, substr_eq, substr_rem; std::str...

Biological Sequence Pattern Matching using Perl

Image
This article is a simple Perl programming tutorial for matching patterns in the biological sequence using regular expressions. In this tutorial, I have used ActiveState Perl 5.24.3 software for compiling the Perl script. Pattern Matching In Bioinformatics, string matching or pattern matching is a fundamental and popular method used in a wide range of applications ranging from sequence alignment to functional prediction. Pattern matching is classified into exact pattern matching and approximate pattern matching. The exact pattern matching method does not allow any insertion, deletion, or substitution of characters while matching with the target sequence, whereas the approximate pattern matching method allows with certain limitations. In Computational Biology, a pattern is an expression as a sequence of characters with a defined set of symbolic representation. Example: N{P}-[ST]{P}A(2,3). Source Code system('cls'); print "\n+-----------------------------------+...

Computing Amino Acid Composition using C++

Image
This article explains the simple method to compute composition of amino acids in the protein sequence using C++. In this tutorial, I have used Dev C++ v5.11 software for compiling the C++ program. Length of the Protein Sequence Length of the protein sequence is the count ( C ) of the total number of amino acid characters in the protein sequence. Let, Protein Sequence (S) = S 1 S 2 S 3 …S l -1 S l Where, S ∈ {A, C, D, E, F, G, H, I, K, L, M, N, P, Q, R, S, T, V, W, Y} Then, l is the length of the protein sequence (S). Amino Acid Composition of the Protein Sequence Amino acid composition is the sum of count ( C ) of each amino acids in the protein sequence. Count of each amino acids is C A , C C , C D , C E , C F , C G , C H , C I , C K , C L , C M , C N , C P , C Q , C R , C S , C T , C V , C W , and C Y . Source Code // Computing Composition of Amino Acids in the Protein Sequence #include <iostream> #include <iomanip> #include <stri...

Computing Sum, Mean, Variance, Standard Deviation, Coefficient of Variation, Smallest, Biggest, Median, Range, and Mode using C++

Image
This is a programming tutorial for computing sum, mean, variance, standard deviation, coefficient of variation, smallest number, biggest number, median, range, and mode of n numbers using C++. In this tutorial, I have used Dev C++ v5.11 software for compiling the C++ program. The formula for calculating sum, mean, variance, standard deviation, coefficient of variation, smallest number, biggest number, median, range, and mode of set of n numbers is given below: Description Formula Number of Samples n Sum (Total) \[\sum\limits_{i=1}^{n}{{{x}_{i}}}={{x}_{1}}+{{x}_{2}}+...+{{x}_{n}}\] Mean (Average) \[\bar{x}=\frac{\sum\limits_{i=1}^{n}{{{x}_{i}}}}{n}\] Variance \[{{\operatorname{var}}_{x}}=\frac{\sum\limits_{i=1}^{n}{{{({{x}_{i}}-\bar{x})}^{2}}}}{n-1}\] Standard Deviation \[{{\sigma }_{x}}=\sqrt{\frac{\sum\limits_{i=1}^{n}{{{({{x}_{i}}-\bar{x})}^{2}}}}{n-1}}\] Coefficient of ...

Simple Server and Client Chat using Python

Image
In Python language, socket (or network socket) is a module used to communicate between two computers. It provides two types of interface to access the network, namely low-level (platform dependent connections — Example: Telnet) and high-level (application dependent connections — Example: HTTP, FTP, SMTP, etc.). This is a simple tutorial to establish the low-level socket connection between server and client to communicate messages using the TCP/IP protocol. Server and Client Chat In this tutorial, I have used two scripts server.py to serve data by sending an invitation to the client, and client.py to receive data on acceptance of the invitation. After accepting the invitation, both server and client share messages mutually. — Server — An server script performs the sequence of functions such as socket() , bind() , listen() , and accept() (repeats for more than one client) to communicate with the client. The description of each functions used in the ser...

Retrieving Windows Product Key using VB Script

Image
In this article, I present the simple and safe method to retrieve product key of Windows operating system using VB Script. The VB Script reads the value of Windows product from the Registry Editor ( regedit ) and translates it to a formatted product key (25 alphanumeric characters). Also, it creates the backup of the product information to the local drive (Desktop). Instructions Step 1: Create a VB Script file “ WinProductKey.vbs ” using any ASCII text editor and enter the following codes. Source Code Dim objshell, path, DigitalID Set objshell = CreateObject("WScript.Shell") 'Set registry key path Path = "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\" 'Registry key value DigitalID = objshell.RegRead(Path & "DigitalProductId") Dim ProductName, ProductID, ProductKey, ProductData 'Get ProductName, ProductID, ProductKey ProductName = "Product Name: " & objshell.RegRead(Path & "ProductName") ProductID = ...