Genetic Algorithms demonstration with word DNA in Perl
...the population my $popsize = 1024; # a good starting point my $dna_length = 512; # 4 "letters" in...ng slots of the individual by 1 } foreach my $parent (@pa..._to_words($sorted_population[-1]->{dna}), $sorted_pop...2366 days ago
Extract fasta sequence with Ids with Bash script
#!/bin/bash while IFS='' read -r line || [[ -n "$line" ]]; do echo "Text read from file: $line" samtools faidx ONT.fasta $line > $line.faa done < "$1"2348 days ago
Perl script for calculate Levenshtein distance
sub levenshtein_dist { my ($str1, $str2) = @_; my ($len1, $len2) = (length $str1, length $str2); if ($len1 == 0) { return $len2; } if ($len2 == 0) { return $len1; } my %mat; for (my $i = 0; $i2334 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, '2332 days ago
Reformat the file names with Perl
...use warnings; use File::Copy qw(copy);; $| = 1; my %hash; my @files = gl...next if $line =~ /^#/; #next if $. == 1; my ($lichenName, $name,...."_$pName[0]"."_$hash{$pName[0]}{code}"."_$pName[1]"."."."scf"; if ( -f "$file...2330 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/GCA_000196735.1_ASM19673v1_genomic.fna...2325 days ago
Fill up the form and blast with perl
...w.arabidopsis.org/Blast/'); $mech->submit_form( form_name => 'myForm', fields => { 'Algorithm' => 'blastx', 'BlastTargetSet' => 'ATH1_pep', 'QueryText' => $se...2319 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 sort...2308 days ago
Create genome scaffolding with Perl
..._through); our $VERSION = "1.00"; =head1 NAME psl_scaffolder.pl - u...} sub getMatch { my ($b1, $b2) = @_; return((($b1 e....."); open(my $queryFile, "=21 tab-separated values, got %d)...$displayed{$fullName} = 1; } }...2302 days ago
Plot the clock using Lastz -gerenal outfile
...); #Usage perl clockPlot.pl Palindrome.palfc 1500 my $R = Statistics::R->ne...startR ; my $fileN=$ARGV[0]; my $mSize=$ARGV[1]; open (my $fh2, $fileN) or...if $len < $mSize; my @chr = split '\_', $arr[1]; $chr[0] =~ s/[a-z]//g;...2293 days ago