Tuesday, 10 April 2012

how to use empty 'which()' results in R?

As the function returns a vector, for the cases in which the function does not find any cases matching the criteria it will return a vector length of zero

> length(which(borders$end == bands[b,'start']))
[1] 0

Friday, 9 March 2012

How to write on the same line in R?

You can achieve this by using the old trick of the carriage return '\r' and the command cat()

for ( i in 1:100){
    cat(c('\r   ',i))
}

Will print on the same line each number from 1 to 100

Thursday, 1 March 2012

How to substitute 'NA' in R for any other desired value


my.table$column[is.na(my.table$column)] <- 0

Wednesday, 29 February 2012

How to enable SSH on Fedora 16

# become super user
su -
# to activate it
systemctl start sshd.service

# to run it at boot
systemctl enable sshd.service

#enable it on the firewall
system-config-firewall

Monday, 20 February 2012

How to rc.local fedora 16?

F16 by default has removed the rc.local file (see the release notes). You just need to create the rc.local file in /etc/rc.d , make it executable and tell the system that is a bash script. See steps below

su -
(root password)


 echo '#!/bin/sh' > /etc/rc.d/rc.local


 chmod +x /etc/rc.d/rc.local


Now you can add your favorite lines to rc.local in order to run commands at start up.


What is FDR in ChIP-seq experiments?

ChIP-seq peak FDR - False Discovery Rate or the ratio between the number of peaks in the control and the experiment when the two are swapped.

-Can this be calculated without a control?
-No, I guess.

source 

Wednesday, 1 February 2012

Voices of eternity




Life has been happening ever since the universe appeared (or before for some other universes) thus civilizations, 'people', ideas, feelings... they all have been here for eons. They have come and they have gone. They will come and they will go.

Today, now, we are one of those sparks in this timeless realm