2904 days ago
2904 days ago
Perl subroutine to read and write files
...ile,$data) = @_; if($bit eq 'read'){ open InOut,"< $file" or die "Cannot open $file for input: $!\...', @file; } if($bit eq 'write'){ open InOut,"> $file" or die "Cannot open $file for output: $!...2898 days ago
Perl script introduces control structures, arrays and hashes.
...rict; use warnings; my @first_array = ('DNA', 'ATGCGTGC', 5, 'RNA', 'AUGC'); print $first_array[0], "\n\n"; # Scalar gives actual size of an array my $size_of_array = scalar(@first_array); my $anothe...2894 days ago
Blast script to index and extract sequence !!
...r. EC4115 chromosome, complete genome. AGCTTTTCATTCTGACTGCAACGGGCAATATGTCTCTGTGTGGATTAAAA...AAAATTTTATTGACTTAGG TCACTAAATACTTTAACCAATATAGGCATAGCGCACAGACAGATAAAAATTACAGAGT...tr. EC4115 chromosome, complete genome AGCTTTTCATTCTGACTGCAACGGGCAATATGTCTCTGT...2884 days ago
Perl script to insert sequence in contig !!
...= '$s' ) \n"; # OUTPUT: # s = ATATGATGATAGATGATAGTAGATAGATAGATAGATAGATAG # insert = 'CCCC ' # (now, s = ATATGATGATAGATGATAGTAGATAGCCCCATAGATAGATAGATAG' )";2741 days ago
2736 days ago
2725 days ago
2725 days ago
Perl script to remove the duplicate sequences from multifasta file
use strict; use Bio::SeqIO; my %unique; my $file = "myseqs.fa"; my $seqio = Bio::SeqIO->new(-file => $file, -format => "fasta"); my $outseq = Bio::SeqIO->ne...2722 days ago