Posts

Showing posts with the label ActiveState Perl

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

Addition, Subtraction, Multiplication, and Transpose of Matrices using Perl

Image
This is a Perl programming tutorial for computing addition, subtraction, multiplication, and the transpose of matrices with custom dimension ( row × column ). In this tutorial, I have used addition() , subtraction() , multiplication() , and transpose() subroutines to perform matrix manipulation by user's choice. Moreover, the input and output of data processing is done through getmatrix() and display() subroutines. The output of the matrix result is formatted in rows and columns mimic to an array. Matrix Manipulation In mathematics, a matrix is a rectangular array of numbers/symbols/expressions arranged in rows and columns. The individual items (elements or entries) in an m × n matrix A , often denoted by a i , j , where i and j represents the dimension. The rule for addition ( A + B ) or subtraction ( A − B ) of two matrices is that it must have an equal number of rows and columns. However, the rule for matrix multiplication ( A...