Perl script to Mutate a DNA Sequence
...} sub randomposition { my($string) = @_; return int rand length $string; } sub randomelement { my(@array) = @_; return $array[rand @array]; } sub rando...2899 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";...2884 days ago
2855 days ago
Perl subroutine to read and write files
# Input output (InOut) the file # usage: # @array = InOut('read',$file) # $str...rite',$file,\$string) # InOut('write',$file,\@array) #$string = "YO!"; #InOut('...my @file = ; close InOut; return wantarray ? @file : join '', @file;...2849 days ago
Perl script introduces control structures, arrays and hashes.
...strict; use warnings; my @first_array = ('DNA', 'ATGCGTGC', 5, 'RNA', 'AUGC'); print $first_array[0], "\n\n"; # Scalar gives...tual size of an array my $size_of_array = scalar(@first_array); my $...ize: $another_way_of_getting_size_of_array\n\n"; # Control Loop: for...2845 days ago
Genetic Algorithms demonstration with word DNA in Perl
...# a reference to a population array sub evaluate_fitness {...n; # population size # create the weights array: select only survivors from t...of fitness() } # Function to sample from an array of weighted elements # origi...2355 days ago
Perl script to find coding regions in DNA sequences
...der of the sequence my @seql = ; # load the complete sequence into an array my $seq = ""; # us...ence inside close(SEQUENCE); # concat every segment (line) in the array into the var $seq my $i=0;...2138 days ago
Perl script to convert GFF 2 FASTA !
#!/usr/bin/perl use strict; use warnings; use Bio::Seq; use Bio::SeqIO; use Bio::DB::Fasta; $| = 1; # Flush output my $outfile_cds = Bio::SeqIO->new( -form...2122 days ago
1783 days ago
Installing ggplot2 and its dependencies on Ubuntu !
...se-AitvI6/r-base-3.4.4=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c utf8lite/src/array.c -o utf8lite/src/array.o gcc -std=gnu99 -I/usr/shar...1533 days ago