R script to visualize fastANI core-genome comparison
####### # Purpose: Visualize fastANI core-genome comparison # Usage: Rscript # Output: .pdf #...noPlotR package: http://genoplotr.r-forge.r-project.org #Parse command line arguments query_fasta=commandArgs(T...1092 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" ,...2906 days ago
2906 days ago
2907 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 $...Alength = length($DNA); #for each letter in the sequence...2907 days ago
2907 days ago
Parse a genbank file using regular expressions
#! /usr/local/bin/perl -w $genbank = "genbank_file.txt"; open (GENBANK, $genbank) || die "cannot open $gb_repo...rint "GI: $2\n"; } elsif (/(DEFINITION\s*)(.*)(\.)/) { print "Sequence...2907 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 mutat...txt # In Linux : /home/user/sequence/rnafile.txt use File::Path...@_; my($position) = randomposition($dna); my $curr...do { $newbase = randomnucl...2906 days ago
Perl script to count the number of Adenine, Thymine, Guanine and Cytosine in your DNA Sequence
#!/usr/local/bin/perl -w # While executing this script it asks for the file name of the DNA sequence. If the sequence file is not available in the same directory of this scri.... In windows: c:\dnafile.txt, In Linux: /home/user/sequence/...2906 days ago
Extract a random sequence from a file
#!/usr/local/bin/perl -w use strict; use warnings; use autodie; use List::Util qw/ shuffle /; my $outputfile = 'randomoutp...2905 days ago