Perl script for calculate Levenshtein distance
sub levenshtein_dist { my ($str1, $str2) = @_; my ($len1, $len2) = (length $str1, length $str2); if ($len1 == 0) { return $len2; } if ($len2 == 0) { return $len1; } my %mat; for (my $i = 0; $i2345 days ago
Calculate Dinucleotide Frequency with Perl
#!/usr/bin/perl -w use strict; my ($genome, $head, $tail); my (%mono_nt, %di_nt); $/ = ">"; open my $fasta, '2343 days ago
Insert the sequence at desire location in multi-fasta file with Perl
...nate sorted by name+location #GenomechrName locationStart AlienGene AlienLength # The coordinate should not overlaps --- next postition shold be bigger than firstpos+alienLen open(my $fh, '2319 days ago
Create genome scaffolding with Perl
..."non-existent file, '$argument'\n", -verbose => 0}); } } @ARGV = @...uery assembly file provided", -verbose => 0}); } if(!(-f $projO...) < threshold my $trimTotal = ($preTrim + $postTrim); if($trimTotal {"t...2313 days ago
Plot the clock using Lastz -gerenal outfile
use strict; use warnings; use Statistics::R ; use List::Util qw(sum); #Usage perl clockPlot.pl Palindrome.palfc 1500 my $R = Statistics::R->new() ; $R->start...2304 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,...gplot2") library(ggplot2) } # import a text file with gene positions # columns should be: c...2289 days ago
2269 days ago
Perl script to convert fastq to fasta file
...use strict; use warnings; use Bio::Factory::EMBOSS; my $usage = "perl $0 i...or die $usage; my $factory = Bio::Factory::EMBOSS->new; my $seqret = $factor...am('seqret'); # $seqret is a Bio::Tools::Run::EMBOSSApplication object $seqret...2256 days ago
Plot custom gene density with R
library(karyoploteR) pp2254 days ago
Perl script to find palindromic regions in DNA sequences
use strict; use warnings; my $pp = qr/(?: (\w) (?1) \g{-1} | \w? )/ix; my $filename = $ARGV[0]; open(my $fh, '2159 days ago