<?xml version='1.0'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:atom="http://www.w3.org/2005/Atom" >
<channel>
	<title><![CDATA[BOL: Owner]]></title>
	<link>https://bioinformaticsonline.com/snippets/owner/abhinav?offset=20</link>
	<atom:link href="https://bioinformaticsonline.com/snippets/owner/abhinav?offset=20" rel="self" type="application/rss+xml" />
	<description><![CDATA[]]></description>
	
	<item>
	<guid isPermaLink="true">https://bioinformaticsonline.com/snippets/view/43566/install-php-on-ubuntu-apache-server</guid>
	<pubDate>Fri, 29 Oct 2021 04:46:03 -0500</pubDate>
	<link>https://bioinformaticsonline.com/snippets/view/43566/install-php-on-ubuntu-apache-server</link>
	<title><![CDATA[Install Php on Ubuntu / Apache server !]]></title>
	<description><![CDATA[<code>#Installing PHP 7.2 with Apache
#If you are using Apache as your web server to install PHP and Apache PHP module run the following command:

sudo apt install php libapache2-mod-php

#Once the packages are installed restart the Apache service:
sudo systemctl restart apache2</code>]]></description>
	<dc:creator>Abhi</dc:creator>
</item>
<item>
	<guid isPermaLink="true">https://bioinformaticsonline.com/snippets/view/43565/install-mysql-on-ubuntu</guid>
	<pubDate>Fri, 29 Oct 2021 04:43:46 -0500</pubDate>
	<link>https://bioinformaticsonline.com/snippets/view/43565/install-mysql-on-ubuntu</link>
	<title><![CDATA[Install MySQL on Ubuntu !]]></title>
	<description><![CDATA[<code>#Installing MySQL on Ubuntu

#To install MySQL on your Ubuntu server follow the steps below:
First, update the apt package index by typing:

sudo apt update

#Then install the MySQL package with the following command:

sudo apt install mysql-server

#Once the installation is completed, the MySQL service will start automatically. To check whether the MySQL server is running, type:

sudo systemctl status mysql

#To secure MySQL
#Run the script by typing:
sudo mysql_secure_installation

#To log in to the MySQL server as the root user type:
sudo mysql

#If you want to login to your MySQL server as root from an external program such as phpMyAdmin you have two options.

The first one is to change the authentication method from auth_socket to mysql_native_password. You can do that by running the following command:

mysql &gt; ALTER USER &#039;root&#039;@&#039;localhost&#039; IDENTIFIED WITH mysql_native_password BY &#039;very_strong_password&#039;;
mysql &gt; FLUSH PRIVILEGES;

#The second, recommended option is to create a new administrative user with access to all databases:

mysql &gt; GRANT ALL PRIVILEGES ON *.* TO &#039;administrator&#039;@&#039;localhost&#039; IDENTIFIED BY &#039;very_strong</code>]]></description>
	<dc:creator>Abhi</dc:creator>
</item>
<item>
	<guid isPermaLink="true">https://bioinformaticsonline.com/snippets/view/43557/onliner-to-convert-multi-line-fasta-to-single-line-fasta</guid>
	<pubDate>Wed, 20 Oct 2021 05:00:38 -0500</pubDate>
	<link>https://bioinformaticsonline.com/snippets/view/43557/onliner-to-convert-multi-line-fasta-to-single-line-fasta</link>
	<title><![CDATA[Onliner to convert multi line fasta to single line fasta !]]></title>
	<description><![CDATA[<code>#Oneliner to convert
awk &#039;/^&gt;/ {printf(&quot;\n%s\n&quot;,$0);next; } { printf(&quot;%s&quot;,$0);}  END {printf(&quot;\n&quot;);}&#039; &lt; file.fa &gt; fileres.fa

#Then delete the first empty line
tail -n +2 fileres.fa &gt; fileout.fa</code>]]></description>
	<dc:creator>Abhi</dc:creator>
</item>
<item>
	<guid isPermaLink="true">https://bioinformaticsonline.com/snippets/view/43438/downloading-mmseqs-databases</guid>
	<pubDate>Wed, 06 Oct 2021 06:25:12 -0500</pubDate>
	<link>https://bioinformaticsonline.com/snippets/view/43438/downloading-mmseqs-databases</link>
	<title><![CDATA[Downloading mmseqs databases !]]></title>
	<description><![CDATA[<code># mmseqs databases
Usage: mmseqs databases &lt;name&gt; &lt;o:sequenceDB&gt; &lt;tmpDir&gt; [options]

  Name                	Type      	Taxonomy	Url
- UniRef100           	Aminoacid 	     yes	https://www.uniprot.org/help/uniref
- UniRef90            	Aminoacid 	     yes	https://www.uniprot.org/help/uniref
- UniRef50            	Aminoacid 	     yes	https://www.uniprot.org/help/uniref
- UniProtKB           	Aminoacid 	     yes	https://www.uniprot.org/help/uniprotkb
- UniProtKB/TrEMBL    	Aminoacid 	     yes	https://www.uniprot.org/help/uniprotkb
- UniProtKB/Swiss-Prot	Aminoacid 	     yes	https://uniprot.org
- NR                  	Aminoacid 	       -	https://ftp.ncbi.nlm.nih.gov/blast/db/FASTA
- NT                  	Nucleotide	       -	https://ftp.ncbi.nlm.nih.gov/blast/db/FASTA
- PDB                 	Aminoacid 	       -	https://www.rcsb.org
- PDB70               	Profile   	       -	https://github.com/soedinglab/hh-suite
- Pfam-A.full         	Profile   	       -	https://pfam.xfam.org
- Pfam-A.seed         	Profile   	       -	https://pfam.xfam.org
- Pfam-B              	Profile   	       -	https://xfam.wordpress.com/2020/06/30/a-new-pfam-b-is-released
- eggNOG              	Profile   	       -	http://eggnog5.embl.de
- dbCAN2              	Profile   	       -	http://bcb.unl.edu/dbCAN2
- Resfinder           	Nucleotide	       -	https://cge.cbs.dtu.dk/services/ResFinder
- Kalamari            	Nucleotide	     yes	https://github.com/lskatz/Kalamari

#For example, run the following to download and setup the Swiss-Prot at the output path outpath/swissprot:

mmseqs databases UniProtKB/Swiss-Prot outpath/swissprot tmp

#In this case, since Swiss-Prot has a value yes in the Taxonomy column above, all necessary files to use it as a valid seqTaxDB will be downloaded and prepared by the databases command.

More information @ https://github.com/soedinglab/mmseqs2/wiki#downloading-databases</code>]]></description>
	<dc:creator>Abhi</dc:creator>
</item>
<item>
	<guid isPermaLink="true">https://bioinformaticsonline.com/snippets/view/43435/install-hhsuite-using-conda</guid>
	<pubDate>Wed, 06 Oct 2021 05:06:43 -0500</pubDate>
	<link>https://bioinformaticsonline.com/snippets/view/43435/install-hhsuite-using-conda</link>
	<title><![CDATA[Install hhsuite using conda !]]></title>
	<description><![CDATA[<code>(base) [abhi@hn1 bin]$ conda install -c conda-forge -c bioconda hhsuite
Collecting package metadata (current_repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: /home/abhi/anaconda3

  added / updated specs:
    - hhsuite


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    _openmp_mutex-4.5          |            1_gnu          22 KB
    conda-4.10.3               |   py38h578d9bd_2         3.0 MB  conda-forge
    hhsuite-3.3.0              |py38pl526h6ed170a_1        26.6 MB  bioconda
    libgomp-9.3.0              |      h5101ec6_17         311 KB
    ------------------------------------------------------------
                                           Total:        30.0 MB

The following NEW packages will be INSTALLED:

  _openmp_mutex      pkgs/main/linux-64::_openmp_mutex-4.5-1_gnu
  hhsuite            bioconda/linux-64::hhsuite-3.3.0-py38pl526h6ed170a_1
  libgomp            pkgs/main/linux-64::libgomp-9.3.0-h5101ec6_17

The following packages will be UPDATED:

  conda                               4.10.3-py38h578d9bd_1 --&gt; 4.10.3-py38h578d9bd_2


Proceed ([y]/n)? y


Downloading and Extracting Packages
_openmp_mutex-4.5    | 22 KB     | ######################################################################################################## | 100%
conda-4.10.3         | 3.0 MB    | ######################################################################################################## | 100%
hhsuite-3.3.0        | 26.6 MB   | ######################################################################################################## | 100%
libgomp-9.3.0        | 311 KB    | ######################################################################################################## | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done</code>]]></description>
	<dc:creator>Abhi</dc:creator>
</item>
<item>
	<guid isPermaLink="true">https://bioinformaticsonline.com/snippets/view/43429/download-desire-version-of-blast-software</guid>
	<pubDate>Wed, 06 Oct 2021 02:55:15 -0500</pubDate>
	<link>https://bioinformaticsonline.com/snippets/view/43429/download-desire-version-of-blast-software</link>
	<title><![CDATA[Download desire version of Blast software !]]></title>
	<description><![CDATA[<code>#Create a directory and wget it
wget ftp://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/2.6.0/ncbi-blast-2.6.0+-x64-linux.tar.gz

#unpacking blast
tar -zxvf ncbi-blast-2.6.0+-x64-linux.tar.gz

#Slurm template

#!/bin/bash
#SBATCH --partition=longjobs
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=32
#SBATCH --time=1:00:00
#SBATCH --job-name=vsearch
#SBATCH -o result_%N_%j.out
#SBATCH -e result_%N_%j.err

export SBATCH_EXPORT=NONE
export OMP_NUM_THREADS=???

module load ncbi-blast/2.6.0_x86_64</code>]]></description>
	<dc:creator>Abhi</dc:creator>
</item>
<item>
	<guid isPermaLink="true">https://bioinformaticsonline.com/snippets/view/43426/command-line-to-download-blast-database-protein</guid>
	<pubDate>Tue, 05 Oct 2021 00:06:08 -0500</pubDate>
	<link>https://bioinformaticsonline.com/snippets/view/43426/command-line-to-download-blast-database-protein</link>
	<title><![CDATA[Command line to download blast database / protein]]></title>
	<description><![CDATA[<code>#download all available nr - protein database as a single file 

#Database location - NCBI where all databases are available
ftp://ftp.ncbi.nlm.nih.gov/blast/db/
https://ftp.ncbi.nlm.nih.gov/blast/db/

# Database detail / description 
nr.*tar.gz | Non-redundant protein sequences from GenPept, Swissprot, PIR, PDF, PDB, and NCBI RefSeq

#First run this to download
wget &#039;ftp://ftp.ncbi.nlm.nih.gov/blast/db/nr.*.tar.gz&#039;

#cat them into one
cat nr.*.tar.gz | tar -zxvi -f - -C .</code>]]></description>
	<dc:creator>Abhi</dc:creator>
</item>
<item>
	<guid isPermaLink="true">https://bioinformaticsonline.com/snippets/view/27802/perl-script-to-generate-a-random-psuedo-dna-sequence</guid>
	<pubDate>Mon, 13 Jun 2016 08:49:13 -0500</pubDate>
	<link>https://bioinformaticsonline.com/snippets/view/27802/perl-script-to-generate-a-random-psuedo-dna-sequence</link>
	<title><![CDATA[Perl script to generate a random psuedo DNA sequence !]]></title>
	<description><![CDATA[<code>#!/usr/bin/perl

print &quot;Enter a number of nucleotides: \n&quot;;
chomp ($N = &lt;STDIN&gt;);
@b=qw/A T G C/;print &quot;&gt;Genome\n&quot;;while($l&lt;$N){print @b[int(rand(4))];$l++;};
print &quot;\n&quot;</code>]]></description>
	<dc:creator>Abhi</dc:creator>
</item>
<item>
	<guid isPermaLink="true">https://bioinformaticsonline.com/snippets/view/27422/generating-a-random-string-with-perl</guid>
	<pubDate>Fri, 20 May 2016 05:13:20 -0500</pubDate>
	<link>https://bioinformaticsonline.com/snippets/view/27422/generating-a-random-string-with-perl</link>
	<title><![CDATA[Generating a random string with Perl]]></title>
	<description><![CDATA[<code>#!/usr/bin/perl

# This function generates random strings of a given length
sub generate_random_string
{
	my $length_of_randomstring=shift;# the length of 
			 # the random string to generate

	my @chars=(&#039;a&#039;..&#039;z&#039;,&#039;A&#039;..&#039;Z&#039;,&#039;0&#039;..&#039;9&#039;,&#039;_&#039;);
	my $random_string;
	foreach (1..$length_of_randomstring) 
	{
		# rand @chars will generate a random 
		# number between 0 and scalar @chars
		$random_string.=$chars[rand @chars];
	}
	return $random_string;
}

#Generate the random string
my $random_string=&amp;generate_random_string(11);

print &quot;Random string: &quot;.$random_string.&quot;\n&quot;;
print &quot;Length: &quot;.length($random_string).&quot;\n&quot;;</code>]]></description>
	<dc:creator>Abhi</dc:creator>
</item>
<item>
	<guid isPermaLink="true">https://bioinformaticsonline.com/snippets/view/27400/string-matching-with-perl</guid>
	<pubDate>Wed, 18 May 2016 08:37:27 -0500</pubDate>
	<link>https://bioinformaticsonline.com/snippets/view/27400/string-matching-with-perl</link>
	<title><![CDATA[String matching with Perl]]></title>
	<description><![CDATA[<code>#!/usr/bin/perl


# make three strings of nucleotides
$dna1 = “AAAAAAAAAAAAAAATGAAAAAAAAAAAAAAAA”;
$dna2 = “AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA”;

$dna3 = “ATGAAAAAAAAAATGAAAAAAAAAAAATGAAAA”;
$pattern = “ATG”;


# match pattern to dna1
$m = $dna1 =~ m/$pattern/g;

print “Was the ATG pattern found in dna1 : $m \n”;


# match pattern in dna2

$m2 = $dna2 =~ m/$pattern/g;

print “Was the ATG pattern found in dna2 : $m2 \n”;


# find the position of the pattern match in dna1

$pos = index($dna1, $pattern);

print “The match position of ATG in dna1 is : $pos \n”;


# replace the ATG sites with CCC

$dna3 =~ s/ATG/CCC/g;

print “Replaced dna3 with CCC is : $dna3 \n”;</code>]]></description>
	<dc:creator>Abhi</dc:creator>
</item>

</channel>
</rss>