Tuesday, May 27, 2014

BLAST INSTALLATION TUTORIAL



Formatting Database for Blast+

===========================

To use any sequence by Blast/Blast+ , we need to format the fasta . Let's do it  for uniprot:

1. download uniprot from the link provided
=============================
ftp://ftp.uniprot.org/pub/databases/uniprot/current_release/knowledgebase/complete/uniprot_sprot.fasta.gz

2. issue the following command for blast+:
=============================
/home/apps/ncbi/blast+/2.2.29/bin/makeblastdb -dbtype prot -in /path/to/uniprot.fasta


To get blast+ commands, if you are familiar with legacy blast, use legacy_blast.pl in the following way:

$ /home/apps/ncbi/blast+/2.2.29/bin/legacy_blast.pl formatdb -i test.fasta -p T --path /home/apps/ncbi/blast+/2.2.29/bin --print_only

/home/apps/ncbi/blast+/2.2.29/bin/makeblastdb -dbtype prot -in test.fasta

Saturday, May 24, 2014

Generate ssh key using ssh-keygen : gnerate both public and private key



http://www.ece.uci.edu/~chou/ssh-key.html


Setting up SSH public/private keys

SSH (Secure Shell) can be set up with public/private key pairs so that you don't have to type the password each time. Because SSH is the transport for other services such as SCP (secure copy), SFTP (secure file transfer), and other services (CVS, etc), this can be very convenient and save you a lot of typing.

SSH Version 2

On the local machine, type the BOLD part. The non-bold part is what you might see as output or prompt.
  • Step 1:
    % ssh-keygen -t dsa
    Generating public/private dsa key pair.
    Enter file in which to save the key (~/.ssh/id_dsa):
    (just type return)
    Enter passphrase (empty for no passphrase):
    (just type return)
    Enter same passphrase again:
    (just type return)
    Your identification has been saved in ~/.ssh/id_dsa
    Your public key has been saved in ~/.ssh/id_dsa.pub
    The key fingerprint is:
    Some really long string
    %
  • Step 2:
    Then, paste the content of the local ~/.ssh/id_dsa.pub file into the file ~/.ssh/authorized_keys on the remote host.
  • RSA instead of DSA
    • If you want something strong, you could try
      % ssh-keygen -t rsa -b 4096
    • Instead of the names id_dsa and id_dsa.pub, it will be id_rsa and id_rsa.pub , etc.
    • The rest of the steps are identical.
That's it!
FAQ:
  • Q: I follow the exact steps, but ssh still ask me for my password!
  • A: Check your remote .ssh directory. It should have only your own read/write/access permission (octal 700)
    % chmod 700 ~/.ssh

Monday, May 12, 2014

Java Plots / graphs using jfreechart jfree chart



http://stackoverflow.com/questions/3587025/jfree-charts-sample-tutorial



http://www.screaming-penguin.com/node/4005
http://www.vogella.de/articles/JFreeChart/article.html
http://adityanivas3.blogspot.com/2008/09/jfree-chart-tutorial.html
http://www.javaworld.com/javaworld/jw-12-2002/jw-1227-opensourceprofile.html
There's even some examples right in the code, such as the one described here:
http://www.jfree.org/jfreechart/api/javadoc/org/jfree/chart/demo/TimeSeriesChartDemo1.html



 // HOW TO CREATE CHART AND SAVE AS PNG
        final XYDataset dataset = createDataset();
        final JFreeChart chart = createChart(dataset);
       
        try {
            File f1 = new File("myline.png");
            ChartUtilities.saveChartAsPNG(f1, chart, 500, 400);
        } catch (Exception e) {
            e.printStackTrace();
        }

Sunday, May 11, 2014

PHP XAMPP APACHE CONTROL START STOP



Open Control panel

sudo  /opt/lampp/share/xampp-control-panel/xampp-control-panel
How to start / stop apache server in xampp

sudo /opt/lampp/lampp start
sudo /opt/lampp/lampp stop

How to change default apache port 80 to another port:

Find the line "Listen 80" in any of these files and change to new port number.

/opt/lampp/etc/httpd.conf
/opt/lampp/etc/original/httpd.
conf

How to install linux iso image


1. Download you iso file.

say myfile.iso

2. Make a directory where it will be mounted

sudo mkdir /mnt/iso

3. Mount the iso file there

sudo mount -t iso9660 -o loop /home/Download/myfile.iso /mnt/iso/
 
 
4. Install it
 
./myfile.iso