Implementation of biological random mutation with Perl
...!/usr/bin/perl -w use strict; use warnings; #sequence for a better recognition my $DNA="AAAA...AAAAA \ n"; my $I; my $mutant; srand (time | $$). $mutant=mutate ($DNA); print "Mutate \ n"...2898 days ago
Perl script to generate a random psuedo DNA sequence !
#!/usr/bin/perl print "Enter a number of nucleotides: \n"; chomp ($N = ); @b=qw/A T G C/;print ">Genome\n";while($l2880 days ago
Perl script to extract lines with matching ids !!
#!/usr/bin/perl use strict; use warnings; my %patterns; #USAGE: perl extactByIds.pl Idsfile1 file2 > Result # Open file and get patterns to search for open(my $fh2,"2872 days ago
Perl script to extract fasta sequence by matching name/ids !!
#!/usr/bin/perl use strict; use warnings; use Text::Trim qw(trim); #Usage perl extractSeqbyID.pl i...($id) = split (/\n/, $_); #my @i=split (/\s/, $id); # To avoid >flattened_line_10751 circular cases...2872 days ago
Perl script to find the absolute "full" path of the file !
#!/usr/bin/perl use Cwd; my $this_file_full_path = Cwd::abs_path(__FILE__); print "$this_file_full_path\n"; use Cwd qw/ realpath /; ## $0; this script my $path = realpath($0); print $path;2876 days ago
2868 days ago
2868 days ago
2868 days ago
Perl subroutine to read and write files
...nOut('read',$file) # $string = InOut('read',$file) # InOut('write',$file,\$string) # InOut('write',$file,\@array) #$string = "...turn wantarray ? @file : join '', @file; } if($bit eq 'write'){ open InOut,"> $file"...2862 days ago
Blast script to index and extract sequence !!
...ichia coli O157:H7 str. EC4115 chromosome, complete genome. AGCTTTTCATTCTGACTGCA...AGGCATAGCGCACAGACAGATAAAAATTACAGAGTAC # generate the blast database $ makebla...ichia coli O157:H7 str. EC4115 chromosome, complete genome AGCTTTTCATTCTGACTGCAA...2849 days ago