Posts

Showing posts from September, 2018

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 MatchingIn 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 Codesystem('cls'); print "\n+-----------------------------------+"; print &q…

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 SequenceLength of the protein sequence is the count (C) of the total number of amino acid characters in the protein sequence.Let, Protein Sequence (S) = S1S2S3…Sl-1SlWhere, 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 SequenceAmino acid composition is the sum of count (C) of each amino acids in the protein sequence.Count of each amino acids is CA, CC, CD, CE, CF, CG, CH, CI, CK, CL, CM, CN, CP, CQ, CR, CS, CT, CV, CW, and CY.Source Code// Computing Composition of Amino Acids in the Protein Sequence #include <iostream> #include <iomanip> #include <string.h> #include <conio.h> using namespace std; struct composition { char seq[100]; int a,…