Friday, November 25, 2011

How to filter a column in Excel and LibreOffice Calc

If you need, for example, to create a filter that will select all the values from a column that are smaller than 0.05 do the following:

Data > Filter > Standard Filter

Under Field name select the name of your column
Under Condition select <
Enter under Value 0.05

Click More options
Check Copy results to 
Select the field for the results to be copied to

Thursday, November 24, 2011

How to create qqplot in R

These are the simple instructions for creating a QQ-plot in R.

If you obtained a set of p-values from your experiment and want to check if they are different than the uniform distribution of p-values the QQ-plot is the right way to do this.
Save the file as file.txt with each p-value in a separate line.

obs_pvalues <- read.table ("file.txt")
log_obs_pvalues= -log10(obs_pvalues)
log_obs_pvalues <- c(log_obs_pvalues[,1])

If the values are not sorted:

log_obs_pvalues = sort(log_obs_pvalues)

Create uniform distribution of p-values using runif, where N is the number of observed p-values you have in file.txt:
log_uni_pvalues= -log10(uni_pvalues)
log_uni_pvalues = sort(log_uni_pvalues)

Simply do a scatter-plot of the the two variables:

plot (log_uni_pvalues,log_obs_pvalues, xlab=expression(Theoretical~~-log[10](italic(p))), ylab= expression(Observed~~-log[10](italic(p))), main="Title of your QQ-plot")

To draw the 45 degree line:

The resulting graph:

From the following graph we can conclude that experimental p-values are not enriched with lower values than what would be expected according to the uniform distribution of p-values. For example, for the p-value of 0.05 the value -log10 equals ~1.3, so if the distribution of experimental p-values is enriched in significant values, the dots on the graph should go above the 45 degree line for Observed -log10(p)> 1.3.

Wednesday, November 23, 2011

How to recover files deleted from Recycle Bin

Need to recover files deleted from Recycle Bin.

Go to

Download and install EASEUS,

Select Deleted file recovery or Complete recovery (this option will find more files to recover).

Recovery of < 1Gb of files is free.

How to add text to cells in Excel

If you want to add textual prefix or suffix to multiple cells of a row/column/table in Excel use the following formula:

to add suffix to the cell A1


then simply copy the cell (CTRL + C) and paste into all cells that you want to modify. All cells will be given the same suffix.

Friday, November 18, 2011

Easy way to search and copy/paste text in files that are too large to open in standard text editors

In case you have a quite large file that will take ages to load into Gedit or Notepad, and potentially will use all your system resources and block the computer, and you only need only to select one or few lines from this file, do the following:

Install Midnight commander (MC) in Linux,
or Total commander in Windows.

Go to the folder with the file you want to view.
Press F3 to view the file. This step is usually much faster than loading the file in Gedit (Linux) or Notepad (Windows)
Press F7 to search for the text of interest.

Under Linux:
Hold SHIFT and select the text with mouse.
CTRL + INS to copy the text. Or right click and copy.

Under Windows:
Simply select and CTRL + INS or CTRL + C for copying

How to convert a table into single column or row in Excel

In order to convert the table to a single column do the following. The data table has been assigned the name DataTable and the column name is ColumnData. It is sufficient to name only the first cell. Enter the following formula in the first cell of ColumnData and fill down as many rows as there are elements in your table:


This will fill in the values from the DataTable in column-by-column order, working down then across. You can retrieve the values from DataTable in row-by-row order order, working across then down, with the following formula:


The principle is the same: Enter the following formula in the first cell of ColumnData and fill down as many rows as there are elements in your table.

Thursday, November 17, 2011

How to backup Thunderbird email in Windows

Backing up Thunderbird manually in Windows is very simple, all you have to do is to copy their respective profile folders to a desired location, like USB or external hard drive. Then, you’ll have a backup with all your settings and emails saved.

The difficult part is to find the profile folders. Note that they may be located in different places for different Windows versions.

On Windows XP machines the locations for your Thunderbird profiles are:
C:\Documents and Settings\<Windows login/user name>\Application Data\Thunderbird\Profiles\<Profile name>\ 

Backup the contents of this folder.
To restore your email e.g. on another computer, copy the saved contents to the same folder on the new machine.

How to backup Thunderbird email in Linux

Mozilla Thunderbird has all your email and profile settings stored in a directory called:
and the location of the folder is:
/home/you/.thunderbird/ or ~/.thunderbird directory.

All you have to do is backup this directory.

Go to Terminal (CTRL + ALT + T)
You should be located in the folder /home/you/ indicated by ~$ sign
Type cd .thunderbird to enter the folder and explore the subfolders. One of them contains the file with your Inbox mail. Make sure it is there.

Go back to with cd ..
Type cp -avr .thunderbird /media/your USB or hard drive name/

And you are done!

To restore Thunderbird mail and profile
Thunderbird should not be running. Simply copy backup files to your /home/you/.thunderbird/ directory.