Read a tab delimited file and search with perl
use strict; use warnings; use Data::Dumper; use Text::CSV; use IO::Handle; my $file = "/home/urbe/Tools/Alienomics_v0.1/Alienomics/output/intermediate_files/rRNA/refGene.megablast"; open my $fh, "[0]\n"; warn Dumper $row; # To see the structure }2523 days ago
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; $aa2513 days ago
2467 days ago
Genetic Algorithms demonstration with word DNA in Perl
...tion with word DNA (512 bits) use strict; use Data::Dumper; # individuals in th...ithm is at # http://theoryx5.uwinnipeg.ca/CPAN/data/Sample/Sample.html # (the CP...he population array # with the individual's data # the DNA is a random numb...2370 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...2297 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 apple2290 days ago
Remove the duplicated line present only next to each other with Perl
...t line: $_ -- next line: $next_line$/"; print $_ if $_ ne $next_line; } continue { $_ = $next_line; } print $_ if eof; } __DATA__ apple apple plum vinega...2290 days ago
Extract the values between to user defined string with Perl
...while (defined ($line = ) and $line !~ /^\s*END/) { print "$line" } print "\n"; #a printout spacer for next record } __DATA__ XXXX YYYY START These...2290 days ago
2262 days ago
Plot custom gene density with R
library(karyoploteR) pp2247 days ago