Compress and decompress the sequence with perl
use strict; use warnings; my @char; while () { @char = split //; } comp(\@char); #--------------------- my $com= "r0a3m4a4j0"; my @com = split //, $com; dcomp (\@com); #dcomp sub here sub dcomp { my ($com_ref)=@_; my @com=@$com_ref; my $car; for (my $aa=0; $aa2524 days ago
2479 days ago
Genetic Algorithms demonstration with word DNA in Perl
#!/usr/bin/perl -w # GA demonstration with word DNA (512 bits) use strict; use Data::Dum...thm is at # http://theoryx5.uwinnipeg.ca/CPAN/data/Sample/Sa...e population array # with the individual's data...2381 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->startR ;...2308 days ago
Remove duplicate lines with perl
#! perl -sw use strict; my %lines; #open DATA, $ARGV[0] or die "Couldn't open $ARGV[0]: $!\n"; while () { print if not $lines{$_}++; } __DATA__ apple apple plum vinegar apple banana banana banana apple2302 days ago
Remove the duplicated line present only next to each other with Perl
#!/usr/bin/perl use strict; use warnings; { $_ = ; my $next_line; while( $next_line = )...xt_line; } continue { $_ = $next_line; } print $_ if eof; } __DATA__...2302 days ago
Extract the values between to user defined string with Perl
#!/usr/bin/perl -w use strict; while () { process_record() if /^\s*START/; } sub pro...print "$line" } print "\n"; #a printout spacer for next record } __DATA__...2302 days ago
2274 days ago
Plot custom gene density with R
library(karyoploteR) pp2259 days ago
Estimate Genome Size with Jellyfish and R
jellyfish count -t 8 -C -m 19 -s 5G -o 19mer_out --min-qual-char=? /common/Tutorial/Genome_estimat...ed” score, where "?" = 30 jellyfish histo -o 19mer_out.histo 19mer_out #Plot datafram...2255 days ago