2142 days ago
Count the frequency of base G in a given DNA sequence
#!/usr/bin/perl use strict; use warnings; my $DNA = "GATTACACAT"; #initialize $countG and $currentPos m...DNA,$currentPos,1); if($base eq "G"){ $countG++; } $currentPos++; } #end of wh...2914 days ago
Parse a genbank file using regular expressions
#! /usr/local/bin/perl -w $genbank = "genbank_file.txt"; open (GENBANK, $genbank) || die "cann...ex: CDS 357..1541 $cds_start = $2; $cds_end = $4; print "CDS: $cds_start - $cds_end\n";...2914 days ago
A multilayer perceptron (MLP) neural network in Perl
#!/usr/local/bin/perl -w #################################################### #MLP neural network in Perl Or...umHidden = 4; my $LR_IH = 0.7; my $LR_HO = 0.07; ################ Data dependent se...2913 days ago
Blast result parser with Perl and Bioperl
#!/usr/local/bin/perl # # Dr. Xiaodong Bai # It may be freely di...re, query frame, query start, query end, hit start, hit end, positives, and identical #...\tquery_start\t"; print OUT "query_end\thit_start\thit_end\tpositive...# get the start and the end of th...2912 days ago
2908 days ago
Extracting FASTA sequences based on position with perl script !!
#!/usr/bin/env perl #Uses: perl sub-seq.pl input.txt range use strict; use warnings; my $end = pop; my $start = pop; l...+)/; my ($header) = "$/$1_$start-$end\n"; my $seq = ${^POSTMAT...print +( substr $seq, $start - 1, $end ) . "...2619 days ago
Transpose the file coordinates and plot dendrogram in R
#Save this as tr.awk { for (i=1; i2615 days ago
Extract the fastq sequence with range in Perl
use Bio::DB::Fasta; open(POSITIONS,"positions.txt"); while(){ chomp; my ($seqName,$begin,$end) = split(/\s/); my $db = Bio::DB::Fasta->new('allGenomeContacted.fa'); my $seq = $db->seq("$seqName", $begin => $end); print "$seq\n"; } close(POSITIONS);2466 days ago
Genetic Algorithms demonstration with word DNA in Perl
...e accept # you can use any word list at the end of the program # do the @d...ing, that's OK) # increment the fitness depending on how long the match was;...ogy by century come computer electronics evolution field fitting genetic in...2369 days ago