2683 days ago
Genetic Algorithms demonstration with word DNA in Perl
...sure for fitness() only my @dictionary; my %freqs; # calculate the fitness of the DNA sub fitness { my $dna = shift @_; my $words = dna_to_words($dna); my $fitness = 0;...2362 days ago
Perl script to create a consensus of nucleotide sequences !
...# ATAAA print consensus(@instances2),"\n"; # ATAAA exit; sub consensus{ my @mi = @_; chomp(@mi); my $motif_count=0; my @words =(); my %H = ( A=>[], T=...2022 days ago
Perl One-Liner to print only non-uppercase letters
#Go through file and only print words that do not have any uppercase letters. perl -ne 'print unless m/[A-Z]/' dna.fa > dnaOnlyLowercase.fa #To lowercase everything perl -pne 'tr/[A-Z]/[a-z]/' dnaUpperCase.fa >dnawithoutuppercase.fa;1374 days ago
885 days ago