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"; #...'Number of seqs' => 2 ); print $sequence{'DNA'...2874 days ago
Install ATOM editor on Elemantory OS / Ubuntu
#Download ATOM deb file from https://atom.io/ https://atom.io/download/deb (bas...ild, rebuild-module-cache, remove, rm, search, show, star, starred, stars, test, uninstall, unlink, unpu...1188 days ago
Perl script to insert the DNA string in genome
...file (genome file) my $out = $ARGV[1]; # output fasta file my $chr="test"; #insertion chromosome my...upstream.$seqI.$downstream,-display_id => $seq->primary_id,-alphabet => "dna" ); $seq_out->wri...2671 days ago
Calculate ATGC percentage in parallel with perl
...use Parallel::ForkManager; use Bio::SeqIO; #usage: perl testParallel.pl my %sequences...t of the pool!\n"; sub checkATCG { my $name=shift; my $DNA=$sequences{$name}; my $length=length $DNA; my $a=($DNA=~tr/A//); my $b...2668 days ago
Calculate some statistics for a DNA alignment with Perl
use Bio::AlignIO; use Bio::Align::DNAStatistics; my $stats = Bio::Align::DNAStatistics->new(); my $alignin = Bio::AlignIO->new(-...-file => 't/data/nei_gojobori_test.aln'); my $alnobj = $in->n...2661 days ago
Genetic Algorithms demonstration with word DNA in Perl
#!/usr/bin/perl -w # GA demonstration with word DNA (512 bits) use strict; use...# a good starting point my $dna_length = 512; # 4 "letters" in the DNA my $dna_byte_length = $dna_length / 8...ent => 0, fitness => 0, dna => 0 }; # this is breeding...calculate the fitness of the DNA...2384 days ago
Insert the sequence at desire location in multi-fasta file with Perl
#!/usr/bin/perl use warnings; use strict; use Bio::SeqIO; use Bio::Seq; use File::Copy; #ARGV[0] should be in following format --- Keep the coordinate sorted...2326 days ago
2264 days ago
Perl script to find palindromic regions in DNA sequences
use strict; use warnings; my $pp = qr/(?: (\w) (?1) \g{-1} | \w? )/ix; my $filename = $ARGV[0]; open(my $fh, '2166 days ago
Perl script to find coding regions in DNA sequences
...(scalar(@ARGV) < 2) { print "dnaloglkh.pl codontable DNAsequence\n"; exit(1); }...$filecodontable")) { print "dnaloglkh.pl: the file $filecodon...################### # open the DNA sequence (second file) if..."%.2f\n",$r; __END__ To test the program, save this two fi...2167 days ago