2012年8月27日星期一

SAM stat


SAMStatmonitoring biases in next generation sequencing data



Qualimap: evaluating next generation sequencing alignment data


Qualimapevaluating next generation sequencing alignment data



Qualimap is a platform-independent application written in Java and R that provides both a GraphicalUser Inteface (GUIand a command-line interface to facilitate the quality control of alignment sequencing data.

Qualimap examines sequencing alignment data inSAM/BAM files according to the features of themapped reads and provides an overall view of thedata that helps to the detect biases in the sequencingand/or mapping of the data and eases decision-making for further analysis.


  • Fast analysis accross the reference of genomecoverage and nucleotide distribution;
  • Easy to interpret summary of the main properties of the alignment data;
  • Analysis of the reads mapped inside/outside of the regions provided in GFF format;
  • Insert size mean and median value calculation and plotting statistical distribution;
  • Analysis of the adequasy of the sequencing depth in RNA-seq experiments;
  • Clustering of epigenomic profiles.


sending a email/text with R

1. Sending a Text in R

1
2
3
4
install.packages("mail",repos="http://cran.case.edu/")
library(mail)
sendmail("5555555555@txt.att.net",
         subject="Notification from R",message="MCMC Finished", password="rmail")


2. sending mail from Batch file

finding subset of best predictors for regression in R


Finding the Best Subset of a GAM using Tabu Search and Visualizing It in R



2012年8月24日星期五

genome sequencing reveals complex speciation in the Drosophila simulans clade


Genome sequencing reveals complex speciation in the Drosophila simulans clade

zotero - a cross-platform reference manager

http://www.zotero.org/

Coud be used to replace ENDnote.

calculation in linux Shell


$ mao=$((4+5))

$ echo $mao
9

$ echo expr 4 + 5
expr 4 + 5

$ expr 4 + 5
9

$ $((4+5))
-bash: 9: command not found

$ mao2=expr 4 + 5
-bash: 4: command not found

$ mao2=(expr 4 + 5)
$ echo $mao2
expr

if, for, while, case in linux shell

1. if condition

if condition which is used for decision making in shell script, If given condition is true then command1 is executed.
Syntax:

 if condition
 then
  command1 if condition is true or if exit status
  of condition is 0 (zero)
  ...
  ...
 fi


2. test command or [ expr ]
test command or [ expr ] is used to see if an expression is true, and if it is true it return zero(0), otherwise returns nonzero for false.
Syntax: 
test expression OR expression ]

Mathematical Operator in  Shell Script MeaningNormal Arithmetical/ Mathematical StatementsBut in Shell
   For test statement with if commandFor [ expr ] statement with if command
-eqis equal to5 == 6if test 5 -eq 6if [ 5 -eq 6 ]
-neis not equal to5 != 6if test 5 -ne 6if [ 5 -ne 6 ]
-ltis less than5 < 6if test 5 -lt 6if [ 5 -lt 6 ]
-leis less than or equal to5 <= 6if test 5 -le 6if [ 5 -le 6 ]
-gtis greater than5 > 6if test 5 -gt 6if [ 5 -gt 6 ]
-geis greater than or equal to5 >= 6if test 5 -ge 6if [ 5 -ge 6 ]



For string Comparisons use
OperatorMeaning
string1 = string2string1 is equal to string2
string1 != string2string1 is NOT equal to string2
string1string1 is NOT NULL or not defined 
-n string1string1 is NOT NULL and does exist
-z string1string1 is NULL and does exist
Shell also test for file and directory types
TestMeaning
-s file   Non empty file
-f file   Is File exist or normal file and not a directory 
-d dir    Is Directory exist and not a file
-w file  Is writeable file
-r file   Is read-only file
-x file   Is file is executable
Logical Operators
Logical operators are used to combine two or more condition at a time
Operator           Meaning
! expressionLogical NOT
expression1  -a  expression2Logical AND
expression1  -o  expression2Logical OR


3. if...else...fi
If given condition is true then command1 is executed otherwise command2 is executed.
Syntax:
           if condition
           then
                       condition is zero (true - 0)
                       execute all commands up to else statement

           else
                       if condition is not true then
                       execute all commands up to fi
           fi


4. Multilevel if-then-else
Syntax:
           if condition
           then
                       condition is zero (true - 0)
                       execute all commands up to elif statement
           elif condition1 
           then
                       condition1 is zero (true - 0)
                       execute all commands up to elif statement  
           elif condition2
           then
                       condition2 is zero (true - 0)
                       execute all commands up to elif statement          
           else
                       None of the above condtion,condtion1,condtion2 are true (i.e. 
                       all of the above nonzero or false)
                       execute all commands up to fi
           fi



5. for Loop
Syntax:
            for { variable name } in { list }
            do
                     execute one for each item in the list until the list is
                     not finished (And repeat all statement between do and done)
            done

6. while loop

Syntax:
           while [ condition ]
           do
                 command1
                 command2
                 command3
                 ..
                 ....
            done


7. The case Statement
The case statement is good alternative to Multilevel if-then-else-fi statement. It enable you to match several values against one variable. Its easier to read and write.
Syntax:
           case  $variable-name  in
                pattern1)   command
                                ...
                                ..
                                command;;
                pattern2)   command
                                ...
                                ..
                                command;;
                patternN)   command
                                ...
                                ..
                                command;;
                *)             command
                                ...
                                ..
                                command;;
           esac


linux for loop - exercises

http://www.freeos.com/guides/lsst/ch08.html#q20

2012年8月23日星期四

Linux Command Related with Process




For this purposeUse this CommandExamples*
To see currently running process ps$ ps
To stop any process by PID i.e. to kill processkill    {PID}$ kill  1012
To stop processes by name i.e. to kill processkillall   {Process-name}$ killall httpd
To get information about all running processps -ag$ ps -ag
To stop all process except your shellkill 0$ kill 0
For background processing (With &, use to put particular command and program in background)linux-command  &$ ls / -R | wc -l &
To display the owner of the processes along with the processes  ps aux$ ps aux
To see if a particular process is running or not. For this purpose you have to use ps command in combination with the grep command ps ax | grep  process-U-want-to see
For e.g. you want to see whether Apache web server process is running or not then give command$ ps ax | grep httpd
To see currently running processes and other information like memory and CPU usage with real time updates.top
See the output of top command.

$ top


Note 
that to exit from top command press q.
To display a tree of processespstree$ pstree

http://www.freeos.com/guides/lsst/ch02sec20.html

sending email with Linux command line - mail and mutt


The Linux command line can be very powerful once you know how to use itYou can parse data,monitor processesand do a lot of other useful and cool things using itThere often comes a needto generate a report and mail it outIt could be as simple a requirement as a notification that thedays backup went through fineor did notIll help you get started with sending mails from theLinux command line and in shell scriptsWe will also cover sending attachments from thecommand line. We will begin with the “mail” command.

MAIL

First run a quick test to make sure the “sendmail” application is installed and working correctly.Execute the following commandreplacing “you@youremailid.com” with your e-mail address.
mail -s “Hello world” you@youremailid.com
Hit the return key and you will come to a new lineEnter the text “This is a test from my server”.Follow up the text by hitting the return key againThen hit the key combination of Control+D to continue. The command prompt will ask you if you want to mark a copy of the mail to any otheraddresshit Control+D again. Check your mailbox. This command will send out a mail to the email id mentioned with the subject, “Hello world”.
To add content to the body of the mail while running the command you can use the followingoptionsIf you want to add text on your own:
echo “This will go into the body of the mail.” | mail -s “Hello worldyou@youremailid.com
And if you want mail to read the content from a file:
mail -s “Hello world” you@youremailid.com < /home/calvin/application.log
Some other useful options in the mail command are:
-s subject (The subject of the mail)
-c email-address (Mark a copy to this “email-address”, or CC)
-b email-address (Mark a blind carbon copy to this “email-address”, or BCC)
Heres how you might use these options:
echo “Welcome to the world of Calvin n Hobbes” | mail -s “Hello world” calvin@cnh.com -c hobbes@cnh.com -b susie.derkins@cnh.com

MUTT

One of major drawbacks of using the mail command is that it does not support the sending of attachments. mutt, on the other hand, does support it. I’ve found this feature particularly useful for scripts that generate non-textual reports or backups which are relatively small in size which I’d like to backup elsewhere. Of course, mutt allows you to do a lot more than just send attachments. It is a much more complete command line mail client than the “mail” command. Right now we’ll just explore the basic stuff we might need often. Here’s how you would attach a file to a mail:
echo “Sending an attachment.” | mutt -a backup.zip -s “attachment” calvin@cnh.com
This command will send a mail to calvin@cnh.com with the subject (-s) “attachment”, the body text “Sending an attachment.”, containing the attachment (-a) backup.zip. Like with the mail command you can use the “-c” option to mark a copy to another mail id.

SENDING MAIL FROM A SHELL SCRIPT

Now, with the basics covered you can send mails from your shell scripts. Here’s a simple shell script that gives you a reading of the usage of space on your partitions and mails the data to you.
#!/bin/bash
df -h | mail -s “disk space report” calvin@cnh.com
Save these lines in a file on your Linux server and run it. You should receive a mail containing the results of the command. If, however, you need to send more data than just this you will need to write the data to a text file and enter it into the mail body while composing the mail. Here’s and example of a shell script that gets the disk usage as well as the memory usage, writes the data into a temporary file, and then enters it all into the body of the mail being sent out:
#!/bin/bash
df -h > /tmp/mail_report.log
free -m >> /tmp/mail_report.log
mail -s “disk and RAM report” calvin@cnh.com < /tmp/mail_report.log
Now here’s a more complicated problem. You have to take a backup of a few files and mail then out. First the directory to be mailed out is archived. Then it is sent as an email attachment using mutt. Here’s a script to do just that:
#!/bin/bash
tar -zcf /tmp/backup.tar.gz /home/calvin/files
echo | mutt -a /tmp/backup.tar.gz -s “daily backup of data” calvin@cnh.com
The echo at the start of the last line adds a blank into the body of the mail being set out.
This should get you started with sending mails form the Linux command line and from shellscriptsRead up the “man page” for both mail and mutt for more options.

three quotes used in linux shell

http://www.freeos.com/guides/lsst/ch02sec08.html

Quotes
Name
Meaning
"Double Quotes"Double Quotes" - Anything enclose in double quotes removed meaning of that characters (except \ and $).
'Single quotes'Single quotes' - Enclosed in single quotes remains unchanged.
`Back quote
`Back quote` - To execute command

Shell Built in Variables

http://www.freeos.com/guides/lsst/misc.htm#variexceans

Shell Built in VariablesMeaning
$#Number of command line arguments. Useful to test no. of command line args in shell script.
$*All arguments to shell
$@Same as above
$-Option supplied to shell
$$PID of shell
$!PID of last started background process (started with &)


Also note that you can't assigne the new value to command line arguments i.e positional parameters. So following all statements in shell script are invalid:
$1 = 5
$2 = "My Name"



fileter file by columns - grep


# what I want to do is: filter test file by ID file based their general columns.

jmao@upa:~$ cat ID
CA10
CA13
CA15

jmao@upa:~$ cat test
15 CA11 0 0 1 0 2 2 -9 -9 1 2 -9 -9 1 1 1 2 1
2 CA13 0 0 1 0 2 2 -9 -9 1 1 -9 -9 -9 -9 1 1 1
25 CA10 0 0 1 0 2 2 -9 -9 1 2 -9 -9 1 1 1 1 1
15 CA15 0 0 1 0 2 2 -9 -9 1 2 -9 -9 1 1 1 2 1
2 CA14 0 0 1 0 2 2 -9 -9 1 1 -9 -9 -9 -9 1 1 1
25 CA18 0 0 1 0 2 2 -9 -9 1 2 -9 -9 1 1 1 1 1

# using the Unix command, grep, we got our job done.
# be careful for -f and -F for grep command.

jmao@upa:~$ grep -Ff ID test
2 CA13 0 0 1 0 2 2 -9 -9 1 1 -9 -9 -9 -9 1 1 1
25 CA10 0 0 1 0 2 2 -9 -9 1 2 -9 -9 1 1 1 1 1
15 CA15 0 0 1 0 2 2 -9 -9 1 2 -9 -9 1 1 1 2 1
jmao@upa:~$ grep -f ID test
2 CA13 0 0 1 0 2 2 -9 -9 1 1 -9 -9 -9 -9 1 1 1
25 CA10 0 0 1 0 2 2 -9 -9 1 2 -9 -9 1 1 1 1 1
15 CA15 0 0 1 0 2 2 -9 -9 1 2 -9 -9 1 1 1 2 1

2012年8月20日星期一

VPN systems in MPG, Tuebingen


The campus is running two Cisco VPN systems. One is IpSec, and this is
not working for you. Mirko said that on Snow Leopard Macs the name
resolution doesn’t work.

But there is a separate Cisco AnyConnect VPN that you can use.

You just have to go to this address with your browser:

And log in there with your regular login. Then you can push a button to
install the separate VPN client.

useful links for forest pathology and fungal

TitleCategoryDescription
Mushroom expert A web site that helps you identify common mushrooms, including some tree pathogens
Wood decay fungi A very useful site to identify the most common decay fungi
Fungal Tree of Life Site describing the project to generate a fungal tree of life. Also a good reference for fungal biology
Common tree diseases of British Columbia Essentially, the book on-line; very useful
Forest Pathology Web SIte Useful link with basic information on forest pathology

PLoS Computational Biology: Education


Education Articles 

A Quick Guide to Software Licensing for the Scientist-Programmer

Andrew Morin, Jennifer Urban, Piotr Sliz
PLoS Computational Biology:
Published 26 Jul 2012 | info:doi/10.1371/journal.pcbi.1002598

Visualization and Analysis of 3D Microscopic Images

Fuhui Long, Jianlong Zhou, Hanchuan Peng
PLoS Computational Biology:
Published 14 Jun 2012 | info:doi/10.1371/journal.pcbi.1002519

Simulation of Molecular Data under Diverse Evolutionary Scenarios

Miguel Arenas
PLoS Computational Biology:
Published 31 May 2012 | info:doi/10.1371/journal.pcbi.1002495

2012年8月17日星期五

Study designs column from Nature Reviews Genetics

http://www.nature.com/nrg/series/studydesigns/index.html


2012

September 2012 Volume 13 No 9

The continuing value of twin studies in the omics era

Jenny van Dongen, P. Eline Slagboom, Harmen H. M. Draisma, Nicholas G. Martin & Dorret I. Boomsma
doi:10.1038/nrg3243
August 2012 Volume 13 No 8

Studying and modelling dynamic biological processes using time-series gene expression data

Ziv Bar-Joseph, Anthony Gitter & Itamar Simon
doi:10.1038/nrg3244
May 2012 Volume 13 No 5

Molecular phylogenetics: principles and practice

Ziheng Yang & Bruce Rannala
doi:10.1038/nrg3186
May 2012 Volume 13 No 5

Harnessing genomics and genome biology to understand malaria biology

Sarah K. Volkman, Daniel E. Neafsey, Stephen F. Schaffner, Daniel J. Park & Dyann F. Wirth
doi:10.1038/nrg3187
May 2012 Volume 13 No 5

A beginner's guide to eukaryotic genome annotation

Mark Yandell and Daniel Ence
doi:10.1038/nrg3186
February 2012 Volume 13 No 2

Computer simulations: tools for population and evolutionary genetics

Sean Hoban, Giorgio Bertorelle & Oscar E. Gaggiotti
doi:10.1038/nrg3130
January 2012 Volume 13 No 1

Experimental and analytical tools for studying the human microbiome

Justin Kuczynski, Christian L. Lauber, William A. Walters, Laura Wegener Parfrey, José C. Clemente, Dirk Gevers & Rob Knight
doi:10.1038/nrg3129
top

2011

December 2011 Volume 12 No 12

Software for systems biologyfrom tools to integrated platforms

Samik Ghosh, Yukiko Matsuoka, Yoshiyuki Asai, Kun-Yi Hsin & Hiroaki Kitano
doi:10.1038/nrg3096
November 2011 Volume 12 No 11

Molecular spandrelstests of adaptation at the genetic level

Rowan D. H. Barrett & Hopi E. Hoekstra
doi:10.1038/nrg3015
November 2011 Volume 12 No 11

Exome sequencing as a tool for Mendelian disease gene discovery

Michael JBamshadSarah BNgAbigail WBighamHolly KTaborMary JEmond,Deborah ANickerson & Jay Shendure
doi:10.1038/nrg3031
October 2011 Volume 12 No 10

Next-generation transcriptome assembly

Jeffrey A. Martin & Zhong Wang
doi:10.1038/nrg3068
October 2011 Volume 12 No 10

Haplotype phasing: existing methods and new developments

Sharon R. Browning & Brian L. Browning
doi:10.1038/nrg3054
August 2011 Volume 12 No 8

New approaches to disease mapping in admixed populations

Michael FSeldinBogdan Pasaniuc & Alkes LPrice
doi:10.1038/nrg3002
August 2011 Volume 12 No 8

Epigenome-wide association studies for common human diseases

Vardhman KRakyanThomas ADownDavid JBalding & Stephan Beck
doi:10.1038/nrg3000
July 2011 Volume 12 No 7

Genome-wide genetic marker discovery and genotyping using next-generation sequencing

John W. Davey, Paul A. Hohenlohe, Paul D. Etter, Jason Q. Boone, Julian M. Catchen & Mark L. Blaxter
doi:10.1038/nrg3012
June 2011 Volume 12 No 6

Genotype and SNP calling from next-generation sequencing data

Rasmus NielsenJoshua SPaulAnders Albrechtsen & Yun SSong
doi:10.1038/nrg2986