More on paranormal inheritance of allergy

This note should probably start with a smile ;-) as you may already know about my interest in parthogenesis, microchimerism, siRNA transmission and other epigenetic wonders. We already know about preferential transmission of allergy by the allergic mother Continue reading More on paranormal inheritance of allergy

Genetic databases – the tragedy continues

A new review paper about online genetic databases nicely summarizes the current state of the art (including my own efforts). There are only 13 databases Continue reading Genetic databases – the tragedy continues

Repetitio est mater studiorum

but repeats in the human genome are not such impressive. Instead they create a lot of trouble when situated in the close proximity to genes. Think of Huntingtons disease, myotonic dystrophy, fragile X or some ataxias. The human genome sequence paper already had a chapter Continue reading Repetitio est mater studiorum

Geotagging: Fast lane from JPG & NMEA to KMZ

Have you ever ever wondered how these nice photo tracks in Google Earth work?
After spending hours of try & error, here is my recommendation if you can record NMEA stream on your GPS device and JPG on your camera. No hacking, no conversion, no scripts, just a quick & intuitive way by freely available software.
Adjust your camera & GPS to be absolutely synchronous. After data recording copy all your files into a single directory and let Locr GPS Photo propose a GPS position for all photos. Correct positions in the map window if necessary.

locr.png

Then fire up COPIKS Photo Mapper, load photos plus track and export all together as a KMZ file.

copix3.png
You are done!

gooea.png

Living on borrowed time

An excellent new review summarizes our current knowledge about telomeres – the complicated chromosome end machinery that is necessary to prevent unwanted repair while allowing to track for the number of replications. Think of it like a source code control system as CVS, the Concurrent Version System. During a recent research project on life cycle of single point mutations / SNPs I realized Continue reading Living on borrowed time

Blink Plink

I had the chance to install now the new PLINK GWAS software for a further analysis of recently published ORMDL3 asthma data. It seems that PLINK is some software that I was looking for a long time (paper link|download link). There are great and foolproof functions to check the validity of your data. I discovered for example unnoticed stratification in the German case-control sample by first and second component of the MDS analysis Continue reading Blink Plink

Cha cha cha

SPIEGEL online points to a retrospective of former SCIENCE editor Daniel Koshland on the science typologies challenge, chance and charge.
Challenge – putting the pieces together like the discovery of the DNA structure of Watson & Crick.
Charge – solving longstanding ubiquitous problems like gravity laws by Newton, a rare event.
Chance – events like the development of PCR by Mullis.
I could add cha-uvinism (ignoring previous work), cha-os (also called creativity), cha-racter (???), cha-rity (work for nothing), cha-rade (also called congresses), cha-pter (many to write), cha-lk (many lectures), cha-nge (not really), cha-mpion (a few), cha-ir (less), cha-ff (most), cha-rts (hundreds), cha-t and cha-rivari (always), yea,yea.

Saturday night fever

New work in mice published in nature neuroscience now show that ordinary fever is caused by prostaglandin E2 stimulation of EP3 prostaglandin receptors in the median preoptic nucleus of mice. EP4 seem to mediate hypothermic response, leaves you to choose not only ambiyour desired body temperature

I had a dream tonight

I had a dream tonight. I do the final revision of a paper following many months of work and submit it to an internet server. Only 30 minutes later the first science journal agent contacts me offering immediate publication. More and more offers arrive and I finally decide to hand it over to nice publishing company that will pay so much money to continue my research.

I woke up and Continue reading I had a dream tonight

Calendar sharing – 2 way

In a previous post we have create calendar snippets in ics format. PHPicalendar is the ultimate solution to stitch these calendar snippets together to a workgroup view.
I am using the built-in RSS feed to be noticed about any forthcoming events that are not sitting in my own calendar.
There is only one drawback: phpicalendar doesn’t offer any possibility to import back any new meeting into Sunbird or Outlook. By using the following patch of events.php it may, however, send you back an .ics file (that can opens Sunbird automatically if configured correctly) by just clicking on any new event.

events.php

 1:
 2:
 3:
 4:
 5:
 6:
 7:
 8:
 9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
58:
switch ($event['status']){
    case 'CONFIRMED':
        $event['status'] =    $lang['l_status_confirmed'] ; 
        break;
    case 'CANCELLED':
        $event['status'] =    $lang['l_status_cancelled'] ; 
        break;
    case 'TENTATIVE':
        $event['status'] =    $lang['l_status_tentative'] ; 
        break;
}
--------------------------insert start--------------------------
$ics ='BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Microsoft Corporation//Outlook 10.0 MIMEDIR//EN
METHOD:PUBLISH
BEGIN:VEVENT
TRANSP:TRANSPARENT
CATEGORIES:WJST
DTSTART:'. date("Ymd", $event['start_unixtime']) .'T' . date("His", $event['start_unixtime']) . 'Z
LOCATION:' . stripslashes($event['location']) .'
DTEND:'. date("Ymd", $event['end_unixtime']) .'T' . date("His", $event['end_unixtime']) . 'Z
SUMMARY:' . $event['event_text'] . '
UID:462CB5E2-7A1D-11DB-A244-000393AE2CEE-'. rand(1000000000000,9999999999999) . '
SEQUENCE:3
DTSTAMP:20070808T000000Z
END:VEVENT
END:VCALENDAR';
$fp=fopen("tmp.ics","w");
fputs($fp,$ics);
fclose($fp);
--------------------------insert end --------------------------
$page = new Page(BASE.'templates/'.$template.'/event.tpl');

$page->replace_tags(array(
    'charset'        => $charset,
    'cal'             => $event['calname'],
--------------------------patch ------------------------------
    'event_text'         => '<a href=tmp.ics>'. $event['event_text'] .'</a>',
----------------------------------patch ----------------------
    'event_times'         => $event_times,
    'description'         => $event['description'],
    'organizer'         => $organizer,
    'attendee'         => $attendee,
    'status'         => $event['status'],
    'location'         => stripslashes($event['location'])    ,
    'cal_title_full'    => $event['calname'].' '.$lang['l_calendar'],
    'template'        => $template,
    'l_organizer'        => $lang['l_organizer'],
    'l_attendee'        => $lang['l_attendee'],
    'l_status'        => $lang['l_status'],
    'l_location'        => $lang['l_location'] 
    ));

$page->output();

?>

If your calendar ics are really up to date, you may want to change $actual_calname in ical_parser.php to
$actual_calname = getCalendarName($filename) . ‘ (-‘ . round((time() – filemtime($filename) )/100000) . ‘ days old)’;

An alternative to Pearson R^2

There is a nice online example of four datasets that show exactly the same variable mean AND Pearson R^2 although they look quite different!

I show here an alternative R solution for the correlation ratio eta that may help if you are dealing with such data.

anscombe.R

 1:
 2:
 3:
 4:
 5:
 6:
 7:
 8:
 9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
46:
# http://en.wikipedia.org/wiki/Anscombe%27s_quartet

ansc <- as.array(matrix(c(
10.0,8.04,10.0,9.14,10.0,7.46,8.0,6.58,
8.0,6.95,8.0,8.14,8.0,6.77,8.0,5.76,
13.0,7.58,13.0,8.74,13.0,12.74,8.0,7.71,
9.0,8.81,9.0,8.77,9.0,7.11,8.0,8.84,
11.0,8.33,11.0,9.26,11.0,7.81,8.0,8.47,
14.0,9.96,14.0,8.10,14.0,8.84,8.0,7.04,
6.0,7.24,6.0,6.13,6.0,6.08,8.0,5.25,
4.0,4.26,4.0,3.10,4.0,5.39,19.0,12.50,
12.0,10.84,12.0,9.13,12.0,8.15,8.0,5.56,
7.0,4.82,7.0,7.26,7.0,6.42,8.0,7.91,
5.0,5.68,5.0,4.74,5.0,5.73,8.0,6.89
),nrow=11,ncol=8,byrow=TRUE))
colnames(ansc) <- c("x1","y1","x2","y2","x3","y3","x4","y4")

op  <- par(mfrow=c(2,2),las=2,ps=10)
plot(ansc[,1],ansc[,2])
plot(ansc[,3],ansc[,4])
plot(ansc[,5],ansc[,6])
plot(ansc[,7],ansc[,8])
par(op)

cor(ansc[,1],ansc[,2])
cor(ansc[,3],ansc[,4])
cor(ansc[,5],ansc[,6])
cor(ansc[,7],ansc[,8])

# eta2
# http://www.opensubscriber.com/message/r-help@stat.math.ethz.ch/7023887.html
# http://www2.chass.ncsu.edu/garson/pa765/eta.htm

eta2<-function(col1,col2) {
    col2 <- cut(col2,quantile(col2,seq(0,1,by=.25),na.rm=TRUE),include.lowest=TRUE,na.rm=TRUE)
    col.aov <- aov(col1 ~ col2)
    ss <- anova(col.aov)$"Sum Sq"  
    eta2 = ( ss[1]/sum(ss) )^2
    return(eta2)
}

eta2(ansc[,1],ansc[,2])
eta2(ansc[,3],ansc[,4])
eta2(ansc[,5],ansc[,6])
eta2(ansc[,7],ansc[,8])

Sweave – seamless statistics and document automation

The R Munich user group likes Sweave. Here are 3 screenshots how to create a seamless R + Open Office integration (which works also for Word documents if you have installed the ODF converter plugin). First create your document

sweave.R

 1:
 2:
 3:
 4:
 5:
 6:
 7:
 8:
 9:
10:
12:
# the document d:/roffice.odt needs some code like (please remove leading #)
# not interpreted text
# <<MyOutput,echo=TRUE>>=                 
# print(iris[1:10,])
# @
# not interpreted text

install.packages("odfWeave", dependencies=TRUE)  
library(utils)
library(odfWeave)
odfWeave("d:/roffice.odt","d:/roffice_.odt")

the document

sweave01.png

save it, open R and execute

sweave02.png

Your document will then look like

sweave03.png