2907 days ago
Find the number of each 2 consecutive characters AA, AC,AG,AT,CC,CA... with Perl
#!/usr/bin/perl -w use strict; my $subject = "AACGTACTGACGTACTGGTTGGTACGA"; my %results = (); while ($subject =~ m/[ACTG][ATGC]/g) { # matched text = $&...2906 days ago
2906 days ago
Generating a random string with Perl
#!/usr/bin/perl # This function generates random strings of a given length sub generate_random_string { my $length_of_randomstring=shift;# the length of # the...2904 days ago
Needleman-Wunsch Algorithm in Perl
#!/usr/bin/perl # USAGE: perl nw.pl HEAGAWGHEE PAWHEAE BLOSUM50.txt -8 # See: "Biological sequence anaysis" Durbin et al. ed. CUP 1998, Pg. 19 # Needleman-Wunsch global...2903 days ago
Count GC Content in nucleotide sequence with Perl
#!/usr/bin/perl -w ### Usage: get_gc_content.pl ### #---------------------------------------------------------...2903 days ago
Implementation of biological random mutation with Perl
#!/usr/bin/perl -w use strict; use warnings; #sequence for a better recognition my $DNA="AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA \ n"; my...2899 days ago
Perl script to generate a random psuedo DNA sequence !
#!/usr/bin/perl print "Enter a number of nucleotides: \n"; chomp ($N = ); @b=qw/A T G C/;print ">Genome\n";while($l2880 days ago
Perl script to extract lines with matching ids !!
#!/usr/bin/perl use strict; use warnings; my %patterns; #USAGE: perl extactByIds.pl Idsfile1 file2 > Result # Open file and get patterns to search for open(my $fh2,"2872 days ago
Perl script to find the absolute "full" path of the file !
#!/usr/bin/perl use Cwd; my $this_file_full_path = Cwd::abs_path(__FILE__); print "$this_file_full_path\n"; use Cwd qw/ realpath /; ## $0; this script my $path = realpath($0); print $path;2876 days ago