Genetic Algorithms demonstration with word DNA in Perl
...mum fitness for survival my $generation_count = 100000; # run for this many generations my $generation = 0;...hild is now a part of the new generation } return \@new_population...returns more than mut_rate next if rand > $mut_rate; # mutate th...2385 days ago
Convert newline formated sequence into fasta format with perl
use strict; use warnings; my $filename = $ARGV[0]; open(my $fh, '2384 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"2368 days ago
Fill up the form and blast with perl
use WWW::Mechanize; use strict; use warnings; my $mech = WWW::Mechanize->new; my $sequence = 'GCCCGCGGTCTCAGAGATCTCGATATATTATA'; $mech->get('http://www...stx', 'BlastTargetSet' => 'ATH1_pep', 'QueryText' => $sequence...2339 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;...rName locationStart AlienGene AlienLength # The coordinate should not overlaps --- next pos...2327 days ago
Create genome scaffolding with Perl
...HBDVXN-/; # work on masked sequences as well $seq =~ tr/acgtuy...=> 0, # contig file for query sequences "prefix" => "psl_scaffol...print(STDERR "Loading query sequences into memory..."); open(my $...r (my $i = 0; $i {"prefix"}, $nextScaffoldID++); if(!exists($...2322 days ago
Perl script to convert fastq to fasta file
#!/usr/bin/env perl use strict; use warnings; use Bio::Factory::EMBOSS; my $usage = "perl $0 in.fq out.fa"...); # $seqret is a Bio::Tools::Run::EMBOSSApplication object $seqret->run({-sequence...2265 days ago
Plot custom gene density with R
library(karyoploteR) pp2263 days ago
Perl script to read multi fasta sequence one by one
#!/usr/bin/env perl use strict; use warnings; #USAGE #perl rohanRun.pl seq.fa my...} sub readfasta { (my $file)=@_; my %sequence; my $header; my $temp_seq; #suppose fasta files contains multiple sequence...2235 days ago
Perl script to find coding regions in DNA sequences
#!/usr/bin/perl -w use strict; # if the number of input argu...t "dnaloglkh.pl codontable DNAsequence\n"; exit(1); } # creat...dontable = $ARGV[0]; my $filesequence = $ARGV[1]; # open the f...############# # open the DNA sequence (second file) if (!open(SE...2169 days ago