2887 days ago
2887 days ago
Perl subroutine to read and write files
...) #$string = "YO!"; #InOut('write','file.txt',\$string); sub InOut { my($bit,$file,$data) = @_; if($bit eq 'read'){ open InOut,"< $file" or die "Cannot open $file for input: $!\n";...2881 days ago
Perl script introduces control structures, arrays and hashes.
#!/usr/bin/env perl use strict; use warnings; my @first_array = ('DNA', 'ATGCGTGC', 5,..._array; # implicit way print "Scalar of array: $size_of_array\n\n"; print "Perl's index size of array: $#fi...2878 days ago
Blast script to index and extract sequence !!
...GCCGTGAGTAAATTAAAATTTTATTGACTTAGG TCACTAAATACTTTAACCAATATAGGCATAGCGCACAGACAGATAAAAATTACAGAGTAC # generate the blast database $ makeblastdb -dbtype nucl -out EC -in EC4115.fa -p...2868 days ago
Perl script to insert sequence in contig !!
# sub signature: #insertSEQintoCONTIGatLOC( SEQ , CONTIG , LOC ) ; sub insertSEQintoCONTIGatLOC{ my ( $SEQ , $CONTIG , $LOC ) = @_; substr( $CONTIG , $LOC ,...2724 days ago
2720 days ago
2709 days ago
2709 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...2706 days ago