Calculate some statistics for a DNA alignment with Perl
...lnobj = $in->next_aln; my ($seq1id,$seq2id) = map { $_->display_id } $alnobj->each_seq; my $results = $stats->calc_KaKs_pair($alnobj, $seq1id, $seq2id); print "comparing ".$results->[0]{'Seq1'}."...2677 days ago
Extract fasta sequence from a multifasta file with coordinates
...e from a directory of Fasta files my $db = Bio::DB::Fasta->new('/path/to/fasta/files/'); my @i...I stuff } # Filehandle access my $fh = Bio::DB::Fasta->newFh('/path/to/fasta/files/'); while...2560 days ago
2497 days ago
Genetic Algorithms demonstration with word DNA in Perl
...ing peacefully"; } } sub select_parents { my $population = shi...< 2; # we need to fill $pop_size parenting slots, to preserve the...parent population $individual->{parent}--; # decrease...vivors from the population select_parents($pop_ref); $pop_ref =...2399 days ago
Calculate Dinucleotide Frequency with Perl
#!/usr/bin/perl -w use strict; my ($genome, $head, $tail); my (%mono_nt, %di_nt); $/ = ">"; open my $fasta, '2366 days ago
Clump Finding Problem Solved with Perl
#Find patterns forming clumps in a string. #Given: A string Genome, and integers k, L, and t. #Return: All distinct k-mers forming (L, t)-clumps in Genome. use stri...2361 days ago
Loop over with all files in a directory in bash
#!/bin/bash FILES=/media/ComparativeGenomics/ncbi-genomes-2017-11-13/* ref=/media/ComparativeGenomics/ncbi-genomes-2017-11-13/...CA_000196735.1_ASM19673v1_genomic.fna path=/home/urbe/Tools/SATSUMA/sa...ore current file name mkdir $ff $path/SatsumaSynteny -q $ref -t $...2359 days ago
Create genome scaffolding with Perl
...ntation in usage code use Getopt::Long qw(:config auto_version auto_help pass_through); our $VERSION =...Loading query sequences into memory..."); open(my $queryFile, "=21 tab-separated values, got %d)",...2336 days ago
Plot the clock using Lastz -gerenal outfile
use strict; use warnings; use Statistics::R ; use List::Util qw(sum); #Usage perl clockPlot.pl Palindrome.palfc 1500 my $R = Statistics::R->new() ; $R->startR ; my $fileN=$AR...2326 days ago
Extract the values between to user defined string with Perl
...process_record { my $line; while (defined ($line = ) and $line !~ /^\s*END/) { print "$line" } print "\n"; #a printout spacer for next record } __DA...2320 days ago