Install BLAST in Ubuntu/Linux and Window !
#On ubuntu sudo apt-get install ncbi-blast+ #Ubuntu Conda installation conda install -c bioconda blast #Windows installation Fir...ih.gov/blast/executables/blast+/2.7.1/ncbi-blast-2.7.1+-win64.exe wit...7.1/ncbi-blast-2.7.1+-win64.exe #Run this installer using the de...1160 days ago
2930 days ago
Count the frequency of base G in a given DNA sequence
#!/usr/bin/perl use strict; use warnings; my $DNA = "GATTACACAT"; #initialize $countG and $currentPos my $countG = 0; my $currentPos...th of $DNA my $DNAlength = length($DNA); #for each letter in the...e eq "G"){ $countG++; } $currentPos++; } #end of while loop...2930 days ago
2930 days ago
Read lines from input file – print lines that match a regular expression
#!/usr/bin/perl use strict; use warnings; my $line; #read the line-by-line for each line ask if it matches the regex print it if it matches while($l...G?C*[ATCG]+?A{3,10}$/) { print "$line\n"; } }...2930 days ago
Check if your coputer ready to use BioPerl
#!/usr/bin/perl use strict; use warnings; #bioperl example code use strict; use warnings; #make the bioperl module (class) accessible to your program use Bio::Seq; print"ok - ready to use Bio::Seq";2930 days ago
Parse a genbank file using regular expressions
#! /usr/local/bin/perl -w $genbank = "genbank_file.txt"; open (GENBANK, $genbank) || die "c...\s*)(\w*)(.*)/) { print "Locus: $2\n"; } el...m: $2\n"; } elsif(/(gene)(\s*)(\d*)(\.\.)(\d*)/) {...elsif (/(.*)(")/) { # terminal quote; end of translation...2930 days ago
BioPerl to convert between sequence formats from Fasta to Genbank
#!/usr/local/bin/perl -w # Sequence formats to choose: Fasta, EMBL. GenBank, Swissprot, PIR and GCG use Bio::SeqIO; $inFile = "BRCA2.fa"; $in = Bio::SeqIO->newFh('-f...'-format' => 'Fasta'); $out = Bio::SeqIO->newFh('-format' => 'Genbank');...2929 days ago
2929 days ago
Perl script to Mutate a DNA Sequence
#!/usr/local/bin/perl -w # This script randomly mutates the DNA sequence and generates 10 su...me directory of this script, enter the file name with its ful...me; unless ( open(DNAFILE, $dnafilename) ) { print "C...wbase; do { $newbase = randomnucleotide();...2929 days ago