2879 days ago
Count the frequency of base G in a given DNA sequence
...rrentPos my $countG = 0; my $currentPos = 0; #calculate the length of $DNA my $DNAlength = length($DNA); #for each letter in the sequence check if it is the base G #if 'yes...2880 days ago
2880 days ago
Check if your coputer ready to use BioPerl
#!/usr/bin/perl use strict; use warnings; #bioperl example code use strict; use warnings; #make the bioperl module (class) accessible to your program use Bio::Seq; print"ok - ready to use Bio::Seq";2880 days ago
2599 days ago
Check overlapping range with Perl
#!/usr/bin/perl use strict; use warnings; my @ranges = 0; push @ranges, $ranges[-1] + 1 + int rand 200 for 1..10000; my @tests = map int rand $ranges[-1], 0.....2590 days ago
Genetic Algorithms demonstration with word DNA in Perl
...ts); # we pass a reference to the weights array here # do sanity checking on $index die "Undefine...', @dictionary; } # there is no easy way to avoid this exhaustive check of the dictionary # withou...2334 days ago
Clump Finding Problem Solved with Perl
...foreach my $name (keys %myHash){ print "$name " if $myHash{$name} == $clump; } kmerMatch ($string, $subStr, $kmer); sub kmerMatch { #Check the exact matching kmers with...2297 days ago
Plot the density of genes in R
#column1 = chromosome name and column2 = start position of the gene # check if ggplot2 is installed, if so, load it, # if not, install and load it if("ggplot2" %in% rownames(in...2247 days ago
Perl script to read multi fasta sequence one by one
#!/usr/bin/env perl use strict; use warnings; #USAGE #perl rohanRun.pl seq.fa my $outfile='tmp.fa'; my $fastaSeq_ref = readfasta ("$ARGV[0]"); my %fastaSeq...2184 days ago