castanyes blaves

Random ramblings about some random stuff, and things; but more stuff than things -- all in a mesmerizing and kaleidoscopic soapbox-like flow of words.


laptop-mode -- Ubuntu Drake Flight2 -- Intel Dot.Station

sudo emacs -nw /etc/laptop-mode/laptop-mode.conf







# These settings specify the standby timeout for the screen in X-Windows,

# in seconds.




sudo shutdown -r now

I apparently look like Michel Focault


2006 perspectives in Science (II)

This one is more a wish than a bet:

Cell cloning needs a big advancement to be understood my the mainstream. Or my grandmother. Or both, for what matters.

Another wish:

Big advancements in systems biology. Mainly not from the molecule or the cell up to upper levels, but from the ecosystem down. I'm very confident with this one. Fingers crossed.

2006 perspectives in Science

My bets?

I bet there will be good advances in the massive resequencing field. Solexa is already giving a lot to talk. Other companies will tag along.

This will give a lot of power to ecology. Even if these new techniques won't allow one to control much _what_ is being (re)sequenced, they will provide a humongous amount of data to use comparatively. Comoditizing DNA data gathering for ecological studies would be great.

Ecology is a field that needs an urgent push to become a lot more important in political decisions. It already has a voice. But it hasn't penetrated George Bush's brain yet. Ok, ok, maybe that is too difficult.

RedHat in BusinessWeek

There is a recent article about Open Source in BussinessWeek:

Very interesting, indeed.

Investor analysts are very happy with this years performance of RedHat.

And Wall Street is bullish about next year. "Red Hat is one of the best-positioned stocks in software and should be able to further capitalize on the growing demand for open source," wrote Credit Suisse First Boston analyst Jason Maynard in a post-earnings research note.

It is curious to see these big companies evolving. I just found out that RedHat company value doubles the value of Novell Inc.

which is something one wouldn't expect if only taking into account how much "buzz" each company makes in the press, or in general.

The article also mentions Firefox.

It mentions the endorsement OSS has received from Dell, Hewlett-Packard, or IBM. And the difficult-to-publicise relationship of Sun, and specially Java, with OSS.

Morotola is also very well positioned in the Mobile OSS front.

At the end, the article talks about Venture Capital and OSS. Time will tell who is who in this world.

My bets?

Well, I have none. But I think that:

IBM is like the mother of OSS big companies, or like the benevolent giant.

RedHat is like the sparky David (vs Goliath). The key is how they grow and keep doing great. Google is a good example of growing and not shitting like everybody else.

Sun Microsystems would be trying to be benevolent like IBM, and they have contributed a lot with Star(Open)Office. But they are like a benevolent giant that keeps a card in the pocket.

Novell is like the reformed-AA everybody can count on nowadays. If you need a friend for a chat, call Novell. They have shown a lot of potential for their short OSS travel, and have even more potential hiding.

On the non-OSS field, a two key players will be Apple and MSFT. Apple is more in the middle-OSS field, but not fully OSS. But Apple has something that MSFT is very scared off: "coolness". They basically sell "coolness". That's why nowadays they basically sell iPods and music. And will sell video and cinema related stuff. But as they recently switched to x86, they can compete in the application world with MSFT. Well, that _if_ they manage to make the "Rosetta" or whatever they call it now, work flawlessly. If they manage to make almost every app available for OSX86, as for MSFT, then MSFT will have to push a lot to show muscle. Maybe MSFT will Open-Source the company. Who the hell would beat MSFT if they turn into a RedHat-like company?



Linux distributed shell commands

emacs mule-util tip

To speed up emacs startup a little bit in Ubuntu Breezy, and unless you specially use mule-util (I have no idea what is for), you can:

sudo mv /usr/share/emacs/21.4/lisp/international/mule-util.elc /usr/share/emacs/21.4/lisp/international/mule-util.elc.ori

lsof tcp tip


The lsof utility not only tells you what file every running process has open, it also lets you know what programs have what network ports open. If netstat shows me an open port that I am unfamiliar with, running

lsof -n | grep -i tcp

is my next step to figure out what process has that port open, and what user it's running as.


(not) born in the USA

The recurrent topic of chatting in lunch time "why wont you even

consider to go to the USA?" is back.

M., D. and C. all think that I'm too stubborn to consider that the USA

is not a good place to live right now. It is good to say that this is

all very hypothetical talking, as I:

(a) Don't pretend to go to the USA in the near future.

(b) Anybody pretends for me to go to the USA in the near future.

But after much thinking about this topic, maybe I am having a biased

view of the USA after all. Or maybe not. It is true that I like to

watch "The Daily Show" and the recent "The Colbert Report", and that

the programs are all about criticising the Falcons and such and so on.

But hey, that's exactly what is _happening_ in the USA right now. It

is not like there would be a "The Ericsson Report" in Sweden, where

they would be criticising the government for all the bad things they

would be doing. And I don't mean doubling the taxation for butter or

things like that (I'm sure in Sweden that could be a problem), I mean

the things that have been happening in the USA during the last ~5


So I could say that yes, without having been there, I prefer Sweden to

the USA. And I would prefer Germany to the USA. And I would prefer

Japan to the USA. And I would prefer New Zealand to the USA. And I

would even prefer South Corea to the USA. I wouldn't prefer

Afghanistan to the USA, or Pakistan to the USA. Any country that takes

the United Nations seriously could be a good place to live. Any

country that takes the Kyoto protocol seriously would be a very nice

place to live.

And I'm not saying that every inch, every city or every state in the

USA is the same. I'm sure that the daily live in a mid-sized city in

Texas can be a lot different to the live in Boston or San Francisco,

but you get the idea.

Revolving ideas around dN and dS analysis

After reading this paper:

Comparisons of dN/dS are time dependent for closely related bacterial


Eduardo P.C. Rocha, John Maynard Smith, Laurence D. Hurst, Matthew

T.G. Holdene, Jessica E. Cooper, Noel H. Smith, Edward J. Feild

I have started to have revolving ideas about codeml, evolver, hyphy

and a program of the likes of "seqgen", sprinkled with some of the

features in "rose", some of the features in "simcoal2", and some of

the features in the recently published "cosi":

The thing is that with either PAML or HyPhy there will always be a

reasonable uncertainty about how accurate is the model of dN/dS

branches given by the MLE for the data. It is like the problem with

multiple sequence alignments: one will never* know if the MSA

determined by probcons, muscle, t-coffee or clustal is _the_ MSA that

depicts the true relationship of each and every aminoacid or

nucleotide of a group of individuals or species.

*well, at least until the technology in "Park Jurassic" is

achieved. Actually, better technology that in P.J., as the frogs

tinkerings were really bad in that case.

Some weeks ago I found out that Aaron Darling, of Mauve's fame,

created a whole framework of what one could call "evolving-MSAs", to

recreate realistic cases for which we know the _true_ MSA. We can then

use this _true_ MSAs to check if our alignment program is good or not.

Cosi is more or less a similar framework, but for different goals.

Cosi, sgevolver, seqgen, rose, simcoal2 and similar programs are great

tools to play with in a long flight or any other situation were one is

stuck to a confined place for several hours without much to do. Like

insomnia nights.

Anyway, CASP is another example by which one can improve the ab initio

prediction programs of protein structures by giving to the authors of

those programs truly given structures (crystallographic? - beats me).

Roderic Guigo and some other colleagues in the ab initio gene

prediction world were trying to promote a CASP-like annual event for

the gene prediction use case.

So, back to the dN/dS stuff. One thing that is always difficult to

take for granted is the reconstructed ancestral sequence given by

either PAML, HyPhy (havent tried much) or any MSA-analysis-like

program. It's a place where the problems with dN/dS analysis and those

of MSA collide.

But one thing we can do is to see how good are the reconstructed

sequences for a given sequence (using something on the likes of

seqgen), and compare the true ancestral sequences given by a seqgen

run to the PAML/HyPhy reconstructed sequences under a specific model.

Obviously, simulating sequences and checking how good is the

reconstruction is absolutely idiotic if one is analising real-world

sequences (this is more or less what my PhD advisor told me). But the

thing is that this is for assessing more or less how good this

reconstructions are. Another analogy comes to my mind: it would be

like to see how good a basketball player is when shooting 100 free

shots. Let's say that the player scores 90 of 100. We cant say this

specific player (or phylogenetic program) will be able to score 90, or

say, 70, of every 100 free shots in play-off games (or real

sequences). But it does say that under certain conditions (as much

realistic as possible given the controlled variables) it _does_ score

90 of 100, so for realistic cases (the rest of the uncontrolled

conditions) if will score close to 90, with a certain confidence of


This reconstructed sequences, by the way, are very important when

doing preferred/unpreferred codon analysis.

I guess this ideas are just "revolving" than "evolving" right now...


r-project tip -- add factor to dataframe given ranges

One wants to factorize the entries in a dataframe given some

groupings. E.g:

mydf = data.frame(

a = rnorm(100,10),

b = rnorm(100,10),

c = rgamma(100, 1, scale=1))

group = hist(mydf$c, breaks="FD")


The idea is to create a factor "mydf$d" with levels corresponding to

the ranges in group$breaks.

We incorporate the mydf$d according to where mydf$c falls in the


mydf$d <- cut(mydf$c, breaks = group$breaks, include.lowest = TRUE)

The final df would look like:

a b c d

1 9.361029 11.007316 0.652870680 (0.5,1]

2 11.088950 8.939719 1.039056291 (1,1.5]

3 10.559973 10.918753 1.408191875 (1,1.5]

4 9.780816 10.043780 0.569005734 (0.5,1]

5 9.695545 9.318528 0.122924032 [0,0.5]

6 12.118934 10.599945 0.024634897 [0,0.5]

7 11.731335 10.891874 1.196850362 (1,1.5]

8 9.936451 11.023811 0.091343672 [0,0.5]

9 11.149087 10.859164 5.617211830 (5.5,6]

10 9.899481 8.121008 3.490734537 (3,3.5]


European stock markets continue climbing...

... and they seem to have an excellent near future.

nice simple ssh tip in latest Redhat magazine

# Create a file in the user's home directory named .shosts with at least one entry: username

This file must be read/write for this user only:

# chown username:username ~username/.shosts

# chmod 600 ~username/.shosts

# Edit the /etc/ssh/sshd_config file and add the following options:

HostbasedAuthentication yes

IgnoreRhosts no

# Run the command:

# ssh-keyscan -t dsa clienthostname >> /etc/ssh/ssh_known_hosts

(for dsa encryption)

Restart the SSH server:

# service sshd restart

On the client:

# Edit the /etc/ssh/ssh_config file and under Host *, add the following options:

HostbasedAuthentication yes

EnableSSHKeysign yes


No rush

I have a thesis to finish, optimistically in 10 days, realistically in about 20-30.

The Catalan and Spanish governments have an Estatut to "approve" or "disapprove", optimistically in 10 days, realistically in 20-30... years.

I mean, seriously?

Come on, I promise to finish my thesis report _if_ you get together on a Christmas lunch, shout and cry and shoot some birds, but at the end of the day you make a decision with the Estatut. No rush.

On the other side, funniest joke in weeks in an r-project intro class:

"the mean function has an option called , in which you can use which percentage of outlier points get trimmed from the sample to calculate the mean. It's like deciding how much you want to trim from the Estatut proposal..."

--- J.O. (Dept Statistics - Univ Barcelona)


4G RAM on a Dell Dimension 5000

Oh, not-so-lazy web, if you know how to make a Dimension 5000 recognize the 4th gig slot of RAM, please let me know.

Ubuntu Hoary and Breezy Live seem to have problems with that...


r-project tip - some function

Sample a Few Elements of an Object


Randomly select a few elements of an object, typically a data

frame, matrix, vector, or list. If the object is a data frame or a

matrix, then rows are sampled.


some(x, ...)

## S3 method for class 'data.frame':

some(x, n=10, ...)

## S3 method for class 'matrix':

some(x, n=10, ...)

## Default S3 method:

some(x, n=10, ...)

12/17/2005 sci.stat.consult

By means of the R-project users mailing list I discovered sci.stat.consult in (this was Usenet before, right?).

"Questions about statistics: The R mailing lists are

primarily intended for questions and discussion about

the R software. However, questions about statistical

methodology are sometimes posted. If the question is

well-asked and of interest to someone on the list, it

may elicit an informative up-to-date answer. See also

the Usenet groups sci.stat.consult (applied statistics

and consulting) and sci.stat.math (mathematical stat

and probability).


Anyway, it is a very nice place to wander around, preferably with a cup of tea (or coffee) to occasionally sip.


Google Reader

Google Reader is a great tool to have all those blogs and planets in one place. I love it. And it works great with Firefox.


No more smoking

We, non-smokers, prefer you not to smoke. We want you to join the club of non-smokers.

The mantra:

"You don't need to smoke"

Repeat the mantra.

"You don't need to smoke"

Repeat the mantra unconsciously.

"You don't need to smoke"

Repeat the mantra unconsciously as you breath.

"You don't need to smoke"

Repeat the mantra unconsciously as you breath in and out.

"You don't need to smoke"

Repeat the mantra unconsciously as you breath in and out slowly.

"You don't need to smoke"

Repeat the mantra unconsciously as you breath in and out slowly and smoothly.

"You don't need to smoke"

KDE Bioscience: Platform for bioinformatics analysis workflows.

... to add more rant to the ranting.

Mona Lisa

A computer deciphering the enigmatic smile of Leonardo da Vinci's Mona Lisa concludes she was mainly happy.


R-project tip

echo "capabilities()" | R --slave --vanilla

jpeg png tcltk X11 http/ftp sockets libxml fifo


cledit IEEE754 iconv



Research TV Channel


Searchable mail archives of the three mailing lists in R-project


bash tip non-empty files

find . -maxdepth 1 -type f -name "*.log" \( \! -empty \) -print


X41 Tablet or Q30

I narrowed down my choices to this to models with complimentary doubled-cells batteries:

But yet, I'm still not sure which one to pick. So help me out here,

LazyWeb: which one should I pick?

To give some priorities:

Light: I want to bring this laptop with me a lot and I'm closer to be

30 than 20 years old.

Extended battery life: again, I want to bring this laptop with me a lot.

Totally RAD linux support: it seems that aspect is covered

Keyboard: as good as to type with it all day

Mouse trackpad/clit: as good as not to have to plug a normal mouse to

browse when sorting out your groceries order

You can comment on here or send an email to avilella AT

that-free-mail-account-that-start-with-a-g-and-end-with-a-mail DOT com.


Serendipitously enough

I found out that the different X41 laptops have strickingly different battery lifetimes. And it doesn't seem to correlate with them having either the:

Intel Dothan LV CPU

or the

Intel Dothan ULV CPU

A shortcut to add blog feeds to Google Reader

Save a Bookmark in Firefox with this:*/feed

And everytime you can to add a feed, just open the link, append the RSS feed link to it, and type .

Google Reader will show you the blog and you will find a "subscribe" button to confirm the addition.

... like this one:

... or a Thinkpad

"Portatil ThinkPad X41"

Trying firefox 1.5

sudo mkdir -p /opt/firefox/extensions/

sudo touch /opt/firefox/extensions/

cd ~/.mozilla/firefox/*.default

mkdir ~/Desktop/ffsettings

cp bookmarks.html cert8.db cookies.txt formhistory.dat key3.db signons.txt history.dat mimeTypes.rdf ~/Desktop/ffsettings

sudo cp ~/Desktop/firefox-1.5.tar.gz /opt/

cd /opt

sudo tar xzvf firefox-1.5.tar.gz

sudo rm firefox-1.5.tar.gz

cd /opt/firefox/plugins/

sudo ln -s /usr/lib/mozilla-firefox/plugins/* .

sudo rm libtotem_mozilla.*


mv .mozilla .mozilla.ubuntu

sudo dpkg-divert --divert /usr/bin/firefox.ubuntu --rename /usr/bin/firefox

sudo ln -s /opt/firefox/firefox /usr/bin/firefox


cd ~/Desktop/ffsettings

cp * ~/.mozilla/firefox/*.default

# To ensure that other programs use version 1.5 of firefox and not the

# old 1.07 version, go to Preferences -> Preferred Applications in the

# System menu. For the "Web Browser" tab, choose "Custom" and then

# enter the command:

firefox %s

sudo chown -R avb:avb /opt/firefox

# Tornant a posar la versio anterior de firefox

sudo rm /usr/bin/firefox

sudo dpkg-divert --rename --remove /usr/bin/firefox

# Restore your old profile:


mv .mozilla .mozilla-1.5

mv .mozilla.ubuntu .mozilla

# (optional) Delete the firefox directory

sudo rm -r /opt/firefox

Firefox 1.5 Breezy

Macedonia Deploys 5,000 Ubuntu Desktops in Schools

"The latest GNOME Journal is running a story about the deployment of 5000 Ubuntu desktops in public schools. The Republic of Macedonia is a small country in Southern Europe with a population of around 2 million. Internet penetration is only around 5% and software piracy rate is rampant. Also, the government does not play any major role in the development of the ICT (Information and Communication Technologies) and a private sector is dominated by Microsoft technologies. Given the circumstances, one would not expect any free software related stories to make the headlines. Yet the presence of a small volunteer organization by the name Free Software Macedonia is making a big difference in this small country."


Take your basket and go pick mushrooms

Dress funny and go navigate


War veterans are learning to use the internet at a new cyber cafe.

12/04/2005's Frank Sinatra

More testing on

I very much enjoy Frank Sinatra in Christmas time (must be too much cinema or TV). Well, Dean Martin seems to have a similar "music genome" according to

"Swing influences, a mid-tempo dance style, sultry vocals, romantic lyrircs and a horn ensemble"

The Red Hot Valentines

Via I discovered that "The Red Hot Valentines" have some nice songs in their repertoire.

Not sure their music is _that_ similar to Smash Mouth, though...

Apple's worries about Linux

Apple most recent 10K filing:

Over the past several years, price competition in the market for personal computers and related peripherals has been particularly intense as competitors who sell Windows and Linux based personal computers have aggressively cut prices and lowered their product margins for personal computing products. The Company?s results of operations and financial condition have been, and in the future may continue to be, adversely affected by these and other industry-wide pricing pressures and downward pressures on gross margins.

The Company is currently the only maker of hardware using the Mac OS. The Mac OS has a minority market share in the personal computer market, which is dominated by makers of computers utilizing other competing operating systems, including Windows and Linux.


What does the OLPC project means to me?

"We aim to reach 100m-200m laptops in 2007", Mr Negroponte

said. Global laptop production is expected to total 47m units this



200m laptops for childs in countries like China, India, Brazil,

Argentina, Egypt, Nigeria and Thailand.

What does that mean?

It means the organizations that form and back the OLPC project are

commited to do something great for the education of the child in these

countries, where day-to-day high-quality scholarization is still

something to tackle.

It means that the UN won't be pushing to pour money to a project with

fuzzy lines that vaguely aims to strenghten the capital in the

Ministries of Education of these countries, but to put great learning

tools in the hands of child which have big energies, to learn and

discover by themselves, and little opportunities, to do so.

It also means to me that there will be a lot of computer companies

worried about what does this means to their businesses. I see it this

way: there are world-wide projects that nowadays are trying to

eradicate malaria from our world of developing countries (some of them

financed by foundations which money comes from a specially big

computer company). A lot of companies would be ready to tackle malaria

with their assets, but they don't do that, simply because there is no

money for them to do that. The OLPC project situation is similar.

So please, don't f*** this project up for the sole reason that you


(a) Don't understand what this project means to you

(b) Don't want to understand what this project means to you but you

are stubbornly afraid of things you don't understand

(c) You think you have a good bragging opportunity to guess what will

make this project fail

I personally think that if in 1 year we leave in a world where 200m

chinese, indian, brazillian, argentinian, egyptian, nigerian and

thailandese kids have that tool for them, this world will be much full

of hope that it those tools never reach their hands.


It seems that the patent situation is being taken care of

The Chinese publication People's Daily Online notes that Philips Electronics China Group is joining the Open Invention Network. "Philips Electronics China Group announced Wednesday that the company, together with Sony, IBM, Red Hat and Novell, has decided to join funds to create a joint venture-- the Open Invention Network (OIN), to purchase core patents of Linux operation system and offer them, free of charge, to any institutions or individuals. The effort is meant to aid the advancement of Linux and break the global dominance of Windows by Microsoft."


loadleveler tip: llhold a list of processes

llq | grep NQ | awk '{com=sprintf("llhold -r %s",$1); system(com)}'

A very short screencast - howto use connectors with inkscape

LaTeX books and documents for starters

One can start with:

The Not So Short Introduction to LaTeX2E

Then get a copy of the book:

LaTeX: A document preparation system

by Leslie Lamport

then in doubt about something:


My Pandora Music - Smash Mouth

Right now, I stick to the style I picked up with:

Smash Mouth

Which is Smash Mouth and a bunch of other gangs, only 10% of which I don't dislike...


200409   200412   200501   200502   200503   200504   200505   200506   200507   200508   200509   200510   200511   200512   200601   200602   200603   200604   200605   200606   200607   200608   200609   200610   200611   200612   200701   200702   200703   200704   200705   200707   200708   200709   200710   200711   200712   200801   200802   200803   200804   200805   200806   200807   200808   200809   200810   200811   200812   200901   200902   200903   200904   200905   200906   200907   200908   200909   200912   201001   201002   201003   201004   201007   201009   201011   201102  

This page is powered by Blogger. Isn't yours?

Subscribe to Posts [Atom]