Calculate some statistics for a DNA alignment with Perl
..."; for (sort keys %{$results->[0]} ){ next if /Seq/; printf("%-9s %.4f \n",$_ , $results-..."; for (sort keys %$an ){ next if /Seq/; printf("%-9s %.4f \n",$_ , $an->{$_}...2659 days ago
2646 days ago
Transpose the file coordinates and plot dendrogram in R
#Save this as tr.awk { for (i=1; i2627 days ago
Extract fasta sequence from a multifasta file with coordinates
#!/usr/bin/perl use Bio::DB::Fasta; #USAGE perl extractFASTAwithSIZE.pl finalSample_filtered.fa 0 1000 > aaaaaa.fa my $fastaFile = shift; my $querySizeST = shift; my $qu...2542 days ago
Extract fasta sequence from a multifasta file with fasta header Ids
#!/usr/bin/perl use strict; use warnings; #Usage: perl my $list = shift @ARGV; my $fasta = shift @ARGV; my $out = shift @ARGV; my %select; open LIS...2528 days ago
Collision free write with Perl
#Write into outfile -- collision free because of multicore usesage sub collision_free_write { my($outFile, $msg) = @_; open my $ofh, ">>", $outFile or die "$0 [$$]: open: $!...2471 days ago
Genetic Algorithms demonstration with word DNA in Perl
...($letter >= 65 && $letter {fitness} cmp $b->{fitness} } @$pop_ref; printf "generation %d: size %dnleast...te_length) { vec($random_dna, $byte-1, 8) = int(rand(256)); # printf "Byte $byte; Random DNA is no...2381 days ago
Convert newline formated sequence into fasta format with perl
use strict; use warnings; my $filename = $ARGV[0]; open(my $fh, '2379 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 sorte...2323 days ago
Create genome scaffolding with Perl
...>{"query"})){ pod2usage({-exitVal => 1, -message => sprintf("Error: query file '%s' doesn...nsusLength; $replacementSeqs{$sName}{fullName} = sprintf("%s [%s %s]", $newSeqID, $sNa...2318 days ago