140 likes | 222 Views
Practical Getting started with Perl. Bioinformatics. Dr. Aladdin Hamwieh Khalid Al- shamaa Abdulqader Jighly. Aleppo University Faculty of technical engineering Department of Biotechnology. 2010-2011. Training. Input: n Output: X. Homework. X. Inputs: Height (X) Width (Y)
E N D
Practical • Getting started with Perl Bioinformatics Dr. Aladdin Hamwieh Khalid Al-shamaa Abdulqader Jighly Aleppo University Faculty of technical engineering Department of Biotechnology 2010-2011
Training • Input: • n • Output: • X
Homework X • Inputs: • Height (X) • Width (Y) • Outputs: • Perimeter • Area Y
String Operator $a="Bio"; $b="technology"; $a=$a.$b; # We can also use $a.=$b; print $a;
String Operator $peptide="AGWGSPK"; $leng = length($peptide); print "Length of $peptide is $leng \n"; $x="A simple"; $x.=" sentence"; print "$x\n"; $x=uc($x); print "$x\n"; $x=lc($x); print "$x\n"; print reverse($x)."\n";
Translation $dna="accACgttAGGTct"; $rna=lc($dna); $rna=~tr/t/u/; print $rna; $cdna =lc($dna); $cdna =~tr/ATCG/TAGC/; print $cdna ;
Conditions if (condition) { action } elseif{ another action } else{ alternative action }
Example $x=149; $y=100; if ($x > $y){ print "$x is greater than $y\n"; } elseif ($x = $y){ print "$x is equal to $y\n"; } else{ print "$x is less than $y\n"; }
Example $x=5*4; $y=17+3; if($x==$y) { print "$x equals $y"; }
Homework • Store a DNA sequence in $x variable: • Convert it to RNA. • Change if from 5’ to 3’ direction into 3’ to 5’ direction • Write a simple script that would allow you to print the complimentary sequence (from 5’ to 3’) of it if its length were more than 100 bpand if it equal of less than 100 bp let the program print the original sequence.