Posts

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 = ...

Installing Latest Apache Web Server on Windows 10

Image
This tutorial describes step-by-step instructions to install the latest Apache HTTP Server software (latest stable version is 2.4.32, as on date 18 March 2018) on Windows 10 operating system. About Apache HTTP Server Apache HTTP Server (“Apache” and “httpd”) was launched in 1995 and it has been the most popular web server on the Internet since April 1996. The Apache HTTP Server Project is a collaborative software development effort aimed at creating a robust, commercial-grade, featured, and freely-available source code implementation of an HTTP (Web) server. This project is part of the Apache Software Foundation. The latest released version of Apache HTTP Server Project is Apache HTTP Server 2.4.29 (as on date 18 March 2018). This version of Apache is the latest GA release of the new generation 2.4.x branch of Apache HTTPD and represents fifteen years of innovation by the project, and is recommended over all previous releases. Downloading Apache HTTP Se...

Simple WebServer using Python

Image
This is a simple example to develop your own Python web server used for application development or testing Python script and should not be used on a public network . It works similar to the Apache web server with limited functionalities and not intended to be a full-featured web server. This tutorial demonstrates just to activate the built-in web server through a batch file. Instructions For developing a Python web server, we simply need Python software alone. The batch file (.bat) was created to activate the built-in web server, automatically open the default web browser with custom folder as root directory (www), and minimize the command line window while running the Python script. Step 1: Download and install Python software according to your system platform. I have downloaded Windows x86-64 executable installer for 64-bit Windows 10 operating system. Step 2: Create a new folder named www ( optional , your path to the webpages). Also, create a new file index.html in...