2915 days ago
2915 days ago
2915 days ago
Perl subroutine to read and write files
# Input output (InOut) the file # usage: # @array = InOut('read',$file) # $string = InOut('read',$file) # InOut('write'...# InOut('write',$file,\@array) #$string = "YO!"; #InOut('write','fi...< $file" or die "Cannot open $file for input: $!\n"; my @file = ;...2909 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...# Scalar gives actual size of an array my $size_of_array =...calar of array: $size_of_array\n\n"; print "Perl's index size...; print $sequence{'DNA'}, "\n"; # Control Loop: foreach...2905 days ago
Blast script to index and extract sequence !!
...ook at the file $ head EC4115.fa >NC_011353.1 Escherichia coli O1...7 str. EC4115 chromosome, complete genome. AGCTTTTCATTCTGACTGCAACGG...CGCACAGACAGATAAAAATTACAGAGTAC # generate the blast database $ ma...EC -entry 'NC_011353.1' | head >lcl|NC_011353.1 Escherichia coli O1...2895 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($CONTIG)...GATAGATAG"; print "s = $s \n"; print 'insert = '.($s = insertSEQin...2751 days ago
2747 days ago
2736 days ago
2736 days ago