Install BLAST in Ubuntu/Linux and Window !
#On ubuntu sudo apt-get install ncbi-blast+ #Ubuntu Conda installation conda install -c bioconda blast #Windows install...ad ftp://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/2.7.1/ncbi-blas...ih.gov/blast/executables/blast+/2.7.1/ncbi-blast-2.7.1+-win64.exe #...1136 days ago
2906 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 $curren...$DNAlength = length($DNA); #for each letter in the sequence check...f($base eq "G"){ $countG++; } $currentPos++; } #end of while...2906 days ago
2906 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($line = ){...} } exit(); __DATA__ ATGCCCAA ATGCCCAAAA ATGCCCAAAAAA...2906 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";2906 days ago
Parse a genbank file using regular expressions
#! /usr/local/bin/perl -w $genbank = "g...en (GENBANK, $genbank) || die "cannot open $gb_report for read...0; while () { if (/(LOCUS\s*)(\w*)(.*)/) { p...*)(\.)/) { print "Sequence name: $2\n"; } elsif...on=")(.*)/) { # protein product begins print "Transla...2906 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('-file' => "$inFile" ,...2905 days ago
2905 days ago
Perl script to Mutate a DNA Sequence
#!/usr/local/bin/perl -w # This script randomly mutates the DNA sequence and generates 10 successive...n the same directory of this script, enter the file name with...nafilename) ) { print "Cannot open file \"$dnafilename...{ $newbase = randomnucleotide(); } until...2905 days ago