Parse a genbank file using regular expressions
...} elsif(/(gene)(\s*)(\d*)(\.\.)(\d*)/) { print "Gene length: $5\n"; } elsif (/(CDS\s*)(\d*)(\.\.)(\d*)/) { # ex: CDS 357..1541 $cds_start = $2...2923 days ago
Retrieve NCBI GenBank records with a range of accession numbers
...ncbi.nlm.nih.gov/entrez/eutils', retries => 0, maxRetries => 5, help => undef );...records out of $count available records.\n" ); } my $retmax = 500; if ( $retmax > $count...2922 days ago
A multilayer perceptron (MLP) neural network in Perl
...#To include an input bias create an #extra input in the training data #and set to 1 ################ User settings ######### my $numEpochs = 500; my $numHidden = 4; my $L...2922 days ago
2916 days ago
Needleman-Wunsch Algorithm in Perl
...# USAGE: perl nw.pl HEAGAWGHEE PAWHEAE BLOSUM50.txt -8 # See: "Biolog...SMATCH scores we will use values read from BLOSUM50) my $MATCH = 1; # +1 fo...y $GAP = $gapcost; # for any gap my %BLOSUM50 = (); my @aalist = (); #...2912 days ago
Perl script to extract fasta sequence by matching name/ids !!
...asta" or die; while () { trim($_); s/>//g; my ($id) = split (/\n/, $_); #my @i=split (/\s/, $id); # To avoid >flattened_line_10751 circular cases print OU...2881 days ago
2878 days ago
2878 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"; # Scalar gives actual size of an ar...2868 days ago
Blast script to index and extract sequence !!
# look at the file $ head EC4115.fa >NC_011353.1 Escherichia coli O157:H7 str. EC4115 chromosome, complete genome. AGCTTTT...keblastdb -dbtype nucl -out EC -in EC4115.fa -parse_seqids # retreiv...nates $ blastdbcmd -db EC -range 100-105 -entry 'NC_011353.1' >lcl|NC...2858 days ago