BASH script for SelfBLAST a genome
#!/bin/bash #self BLAST a genome -- Expecting you have blast and samtools installed in your system #Aut...[ -f $MYDB.nhr ] then echo "BLAST database for MergedContigs.fasta genome exists" else echo "Thanks...2653 days ago
Download the genome from NCBI using bash script/command
#!/bin/bash # Download the genome from NCBI using command # Create a Directory mkdir genome cd genome # Look for geno...l 'ftp://ftp.ncbi.nlm.nih.gov/genomes/refseq/vertebrate_other/asse...#cat $f cd .. done #Reference #ftp://ftp.ncbi.nlm.nih.g...2533 days ago
Unzip all the genome file and remove all fasta header except first one
#!/bin/bash gzip -d *.gz FILES=$(pwd)/* for f in $FILES do echo "Processing $f file..." if [[ $f =~ \.fna$ ]]; then awk ' /^>/ && FNR > 1 {next} {print...2532 days ago
Download the gff files from NCBI using bash script/command
#!/bin/bash # Download the genome from NCBI using command # Create a Directory mkdir genome_gff cd genome_gff # Look...s|(ftp://ftp.ncbi.nlm.nih.gov/genomes/all/.+/)(GCF_.+)|\1\2/\2_gen...l 'ftp://ftp.ncbi.nlm.nih.gov/genomes/refseq/vertebrate_other/asse...2524 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, '2339 days ago
Genetic Algorithms demonstration with word DNA in Perl
#!/usr/bin/perl -w # GA demonstration with word DNA (512 bits) use strict;..._ref = []; # a reference to a population array...= sample(\@weights); # we pass a reference to the weights array here...le module) sub sample { # get the refere...2373 days ago
Clump Finding Problem Solved with Perl
#Find patterns forming clumps in a string. #Given: A string Genome, and integers k, L, and t. #Return: All distinct k-mers forming (L, t)-clumps in Genome. use strict; use warnings...2335 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...ould be in following format --- Keep the coordinate sorted by name+location #GenomechrName locationStart AlienGen...2315 days ago
Create genome scaffolding with Perl
#!/usr/bin/perl use warnings; use strict; use English; use Pod::Usage; ## uses...=head1 NAME psl_scaffolder.pl - use self-mapped PSL file to scaffold a genome =head1 SYNOPSIS ./psl_s...2309 days ago
Plot the density of genes in R
#column1 = chromosome name and column2 = start position of the gene # check if ggplot2 is installed, if so, load it, # if not, install and load it if("ggplot2" %i...2285 days ago