2863 days ago
2863 days ago
2863 days ago
Perl subroutine to read and write files
...put (InOut) the file # usage: # @array = InOut('read',$file) # $...ng = InOut('read',$file) # InOut('write',$file,\$string) # InOut(...O!"; #InOut('write','file.txt',\$string); sub InOut { my($bit,...oin '', @file; } if($bit eq 'write'){ open InOut,"> $fi...2857 days ago
Perl script introduces control structures, arrays and hashes.
#!/usr/bin/env perl use strict; use warnings; my @first_array = ('DNA', 'ATGCGTGC', 5, 'RNA', 'AUGC'); print $first_array[0], "\n\n"; # Scal...scalar(@first_array); my $another_way_of_getting_size_of_array...ing_size_of_array\n\n"; # Control Loop: for for (my $i=0;...2853 days ago
Blast script to index and extract sequence !!
...e file $ head EC4115.fa >NC_011353.1 Escherichia coli O157:H7 str. EC4115 chromosome, complete...GCATAGCGCACAGACAGATAAAAATTACAGAGTAC # generate the blast database $ make...eive an entry by id $ blastdbcmd -db EC -entry 'NC_011353.1' | head >lcl|N...2843 days ago
Perl script to insert sequence in contig !!
# sub signature: #insertSEQintoCONTIGatLOC( SEQ , CONTIG , LOC ) ; sub insertSEQintoCONTIGatLOC{ my ( $SEQ , $CONTIG , $LOC ) = @_; substr( $CONTIG , $LOC , -length($CO...TGATAGATGATAGTAGATAGATAGATAGATAGATAG"; print "s = $s \n"; print 'inser...2699 days ago
2695 days ago
2684 days ago
2684 days ago