A Pillow Diary of an Expatriate Scientist

A sceptic of climate change deniers and anti-science: bits of random thoughts (枕草子, 地平線を超えて)

  • about
  • climate change
  • podcast_video
    • applied mathematics
  • scripting

matplotlib installation problems on MAC.

Posted by Pico on June 11, 2013
Posted in: Uncategorized. Leave a comment

I had two matplotlib troubles with

libfreetype.6.dylib

libpng15.15.dylib

It said these are missing. So I created /opt/local/lib/ and made link to the required files like this

#lib> pwd
/opt/X11/lib
#lib> ls -lrt
total 16
lrwxr-xr-x  1   34 11 Jun 11:11 libfreetype.6.dylib -> /opt/local/lib/libfreetype.6.dylib
lrwxr-xr-x  1   32 11 Jun 11:12 libpng15.15.dylib -> /opt/local/lib/libpng15.15.dylib

Now I get no errors. 🙂

PS

This is the error I got. ======================

>>> import matplotlib.pyplot
Traceback (most recent call last):
File “<stdin>”, line 1, in <module>
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/pyplot.py”, line 26, in
from matplotlib.figure import Figure, figaspect
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/figure.py”, line 32, in
from matplotlib.image import FigureImage
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/image.py”, line 22, in <module>
import matplotlib._png as _png
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/_png.so, 2): Library not loaded: /opt/X11/lib/libpng15.15.dylib
Referenced from: /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/_png.so
Reason: image not found

===============================================

51.220581 4.399722

Rate this:

Share this:

  • Share on Reddit (Opens in new window) Reddit
  • Share on X (Opens in new window) X
  • Print (Opens in new window) Print
Like Loading...

Graduate school advice: kind of (1)

Posted by Pico on January 16, 2013
Posted in: Uncategorized. Leave a comment

Graduate school advice
If you just are graduating or graduated from university then you may just go to graduate school without much of deep thinking. And that is quite normal. But if you like to go back to school after many years of work or absence of it, you need to think about it a bit harder.

With whom do you really want to work with? People like to take ones who know their work. Many applicants do not. I myself misunderstood the job I was interviewed. But that was not because of lack of interest. I eventually got a related job with the same group.
What topic do you really want to study?
What do you want to do with the degree after that?
What do you see yourself in five years?
Is you English good enough? English skill is not essential if you are really good at your topic, mathematics or programming. Otherwise, you can expect people will not easy on your language or research. People may not fire you but you will be put in a position that you have to withdraw yourself from program.

General
1. If you graduated a few years ago, people would care what you have done outside of
school. Unless you have done something close to what you are applying for, you need to
justify your past activities. Justifying is not difficult and you can just say you need
some drastic change or you grow out of past interest: stuffs you had passion with do not
excite you any more, etc.

Recommendation letter
0. Recommendation letters matter most when they came from friends and colleagues trusted.
Otherwise, the letters do not give you any edges, if your CV is not convincing.
1. Some people do not trust recommendation letters people who do not know or outside of
certain regions. Recommendations from Japan likely have less impact unless a recommender
is well known.
2. It is better to get recommendation from people who know you well. Any people who worked
with can write a letter. I’ve written two letters and the PIs who received said the
recommendation was good.
3. Many North Americans, British and Europeans write very negative recommendations. It is
not uncommon to see recommendation letters say they would not take this person or the
person needs significant effort to improve themselves.

51.220581 4.399722

Rate this:

Share this:

  • Share on Reddit (Opens in new window) Reddit
  • Share on X (Opens in new window) X
  • Print (Opens in new window) Print
Like Loading...

Perfect!! —

Posted by Pico on January 13, 2013
Posted in: Uncategorized. Leave a comment

This phrase “pretty, pretty, pretty” sounds nothing but pre-pre-pee.

Ooh, pretty, pretty, pretty

Pretty, pretty please, don’t you ever, ever feel

Like you’re less than, less than perfect

Pretty, pretty please, if you ever, ever feel

Like you’re nothing, you are perfect to me

You are perfect to me

Perfect!!

51.220581 4.399722

Rate this:

Share this:

  • Share on Reddit (Opens in new window) Reddit
  • Share on X (Opens in new window) X
  • Print (Opens in new window) Print
Like Loading...

A new blog for introductory bioinformatics

Posted by Pico on January 10, 2013
Posted in: Uncategorized. Leave a comment

Many people  in my place need to learn bioinformatics but they do not have any back ground so I started a tiny introductory blog called “Antwerp bioinformatics”

http://antwerpbioinfo.blogspot.be/

I will post about some technical titbits useful for bioinformatics. Please check it out even though there is not much going on there so far.

 

 

51.220581 4.399722

Rate this:

Share this:

  • Share on Reddit (Opens in new window) Reddit
  • Share on X (Opens in new window) X
  • Print (Opens in new window) Print
Like Loading...

Japanese Climate change deniers

Posted by Pico on August 19, 2012
Posted in: Uncategorized. Leave a comment

It is pity that most of climate change deniers do not know what  they are talking about: current climate change prediction is based on various observation from ice cores and many other data as well as simulations. The climate-gate is nothing but a hoax which found nothing scientifically relevant to negate the scientific claims they made. Emails leaked from the deniers would be mush more colourful and insightful about their activities.

I just list books which deniers like but essentially miss the points of the current issues.

眠りにつく太陽――地球は寒冷化する(祥伝社新書215): 

正しく知る地球温暖化―誤った地球温暖化論に惑わされないために

These are based on some facts but their extrapolation to the climate change is wrong and misleading.

51.220581 4.399722

Rate this:

Share this:

  • Share on Reddit (Opens in new window) Reddit
  • Share on X (Opens in new window) X
  • Print (Opens in new window) Print
Like Loading...

GATK V2:

Posted by Pico on August 10, 2012
Posted in: Uncategorized. Leave a comment

A new GATK came out and now does indel calling, which was lacking before I think. Its web page is one of the worst to me, since it is hard to find things in it.
But it has one of the best supporting discussion group: a lot of things to learn in there. Pitifully, its VCF does not describe type of indels. So users must classify them. They must change this.

##FILTER=<ID=LowQual,Description=”Low quality”>
##FORMAT=<id=ad,number=.,type=integer,description=”allelic depths=”” for=”” the=”” ref=”” and=”” alt=”” alleles=”” <span=”” class=”hiddenSpellError” pre=”alleles “>in the order listed”>
##FORMAT=<ID=DP,Number=1,Type=Integer,Description=”Approximate read depth (reads with MQ=255 or with bad mates are filtered)”>
##FORMAT=<ID=GQ,Number=1,Type=Integer,Description=”Genotype Quality”>
##FORMAT=<ID=GT,Number=1,Type=String,Description=”Genotype”>
##FORMAT=<id=pl,number=g,type=integer,description=”normalized, <span=”” class=”hiddenSpellError” pre=””>Phred-scaled likelihoods for genotypes as defined in the VCF specification”>
##INFO=<ID=AC,Number=A,Type=Integer,Description=”Allele count in genotypes, for each ALT allele, in the same order as listed”>
##INFO=<ID=AF,Number=A,Type=Float,Description=”Allele Frequency, for each ALT allele, in the same order as listed”>
##INFO=<ID=AN,Number=1,Type=Integer,Description=”Total number of alleles in called genotypes”>
##INFO=<id=baseqranksum,number=1,type=float,description=”z-score from=”” <span=”” class=”hiddenSpellError” pre=”from “>Wilcoxon rank sum test of Alt Vs. Ref base qualities”>
##INFO=<id=dp,number=1,type=integer,description=”approximate read=”” depth;=”” some=”” <span=”” class=”hiddenSpellError” pre=”some “>reads may have been filtered”>
##INFO=<ID=DS,Number=0,Type=Flag,Description=”Were any of the samples downsampled?”>
##INFO=<ID=Dels,Number=1,Type=Float,Description=”Fraction of Reads Containing Spanning Deletions”>
##INFO=<ID=FS,Number=1,Type=Float,Description=”Phred-scaled p-value using Fisher’s exact test to detect strand bias”>
##INFO=<ID=HaplotypeScore,Number=1,Type=Float,Description=”Consistency of the site with at most two segregating haplotypes”>
##INFO=<id=inbreedingcoeff,number=1,type=float,description=”inbreeding coefficient=”” as=”” estimated=”” from=”” the=”” genotype=”” <span=”” class=”hiddenSpellError” pre=”genotype “>likelihoods per-sample when compared against the Hardy-Weinberg expectation”>
##INFO=<id=mleac,number=a,type=integer,description=”maximum likelihood=”” expectation=”” (<span=”” class=”hiddenSpellError” pre=””>MLE) for the allele counts (not necessarily the same as the AC), for each ALT allele, in the same order as listed”>
##INFO=<id=mleaf,number=a,type=float,description=”maximum likelihood=”” expectation=”” (<span=”” class=”hiddenSpellError” pre=””>MLE) for the allele frequency (not necessarily the same as the AF), for each ALT allele, in the same order as listed”>
##INFO=<ID=MQ,Number=1,Type=Float,Description=”RMS Mapping Quality”>
##INFO=<ID=MQ0,Number=1,Type=Integer,Description=”Total Mapping Quality Zero Reads”>
##INFO=<id=mqranksum,number=1,type=float,description=”z-score from=”” <span=”” class=”hiddenSpellError” pre=”From “>Wilcoxon rank sum test of Alt vs. Ref read mapping qualities”>
##INFO=<ID=QD,Number=1,Type=Float,Description=”Variant Confidence/Quality by Depth”>
##INFO=<ID=RPA,Number=.,Type=Integer,Description=”Number of times tandem repeat unit is repeated, for each allele (including reference)”>
##INFO=<id=ru,number=1,type=string,description=”tandem repeat=”” unit=”” (<span=”” class=”hiddenSpellError” pre=””>bases)”>
##INFO=<id=readposranksum,number=1,type=float,description=”z-score from=”” <span=”” class=”hiddenSpellError” pre=”from “>Wilcoxon rank sum test of Alt vs. Ref read position bias”>
##INFO=<ID=SB,Number=1,Type=Float,Description=”Strand Bias”>
##INFO=<ID=STR,Number=0,Type=Flag,Description=”Variant is a short tandem repeat”>

51.220581 4.399722

Rate this:

Share this:

  • Share on Reddit (Opens in new window) Reddit
  • Share on X (Opens in new window) X
  • Print (Opens in new window) Print
Like Loading...

Richard Muller: I was wrong and now I am better than others.

Posted by Pico on August 4, 2012
Posted in: Uncategorized. Leave a comment

Richard Muller was wrong on climate change. Now he changed his mind on it but his arrogance stays on, claiming as if he discovered the climate change when others already knew it long time ago.

 

51.220581 4.399722

Rate this:

Share this:

  • Share on Reddit (Opens in new window) Reddit
  • Share on X (Opens in new window) X
  • Print (Opens in new window) Print
Like Loading...

There is no evidence whatsoever that #GMO technology has been harmful to people. On the other hand electricity, motor vehicles kill everyday

Posted by Pico on August 4, 2012
Posted in: Uncategorized. Leave a comment

“There is no evidence whatsoever that #GMO technology has been harmful to people. On the other hand electricity, motor vehicles kill everyday”

Well, what a stupid comment. The benefit of electricity and cars outweigh their risks to society — surely we can reduce their use but GMO is also surely not helping reducing obesity and diabetes by reducing cost of food. Just don’t try to justify something possibly misunderstood by citing another equally something misleading.

 

51.220581 4.399722

Rate this:

Share this:

  • Share on Reddit (Opens in new window) Reddit
  • Share on X (Opens in new window) X
  • Print (Opens in new window) Print
Like Loading...

Is expatriates’ and ex-expatriates’ advice useful?

Posted by Pico on June 14, 2012
Posted in: Uncategorized. Leave a comment

It is a fad to trashing Japan by Japanese who have been abroad. This is nothing new but some blind believers of “anything but Japan” will disappoint in the fact that all the other developed nations are facing various issues of their own: some times much worse than Japan is. A lot of things can be improved in Japan but people should just realize that the world is changing extremely fast. Instead of instigating endless, fruitless generational war, we should tackle more important issues. There is no heaven on the Earth.

51.220581 4.399722

Rate this:

Share this:

  • Share on Reddit (Opens in new window) Reddit
  • Share on X (Opens in new window) X
  • Print (Opens in new window) Print
Like Loading...

Extracting information from vcf files

Posted by Pico on June 5, 2012
Posted in: Uncategorized. Leave a comment
This is handy way to extract information from vcf files. 
http://www.biostars.org/post/show/994/adding-an-extra-column-to-a-vcf-file/

perl -ane 'print "MYKEY=$1\n" if $F[7]=~/MYKEY=([^;]+)/'

51.220581 4.399722

Rate this:

Share this:

  • Share on Reddit (Opens in new window) Reddit
  • Share on X (Opens in new window) X
  • Print (Opens in new window) Print
Like Loading...

handy perl functions: max, min, std, ave, median and etc

Posted by Pico on May 19, 2012
Posted in: scripts. Leave a comment

If some one needs to know description on these, let me know.


sub filename #cut the file name                                                        
{
  my $name = shift;
  chomp $name;     
  my @x=split '\/',$name; 
  return $x[$#x];
}

sub dirname # get directory name 
{
  my $prog = shift;
  my $cwd = getcwd;
  return $cwd if ($prog !~ /\//);
  $prog =~ s/\/[^\s\/]+$//g;
  return $prog;
}

sub  min_max_med { # get ave, median, sdv, min, max, sum, 
  my @M=@_; 
  my @M1=sort {$a$b}@M;
  my $sum=sumM(@M1);
  my $TOT=$#M+1;
  my $ave=sprintf "%0.2f",$sum/($TOT);
  #print "@M1";
  my ($med,$medv,$endloop,$sdv_sum,$sdv_sum2);
  for (@M1)
  {				#getting median and std
    ++$med;
    if ($med>$TOT*0.5 and $endloop ==0 )
    {
      $medv=$_;
      $endloop=1;       
    }
    $sdv_sum+=($_-$ave)*($_-$ave);
  }
  $sdv_sum2=sprintf "%0.3f",sqrt($sdv_sum/($TOT));
  #min   max                  median std
  shift @M1;
  #print ">>[@M1]  $M1[0], $M1[$#M1],$sum,$ave,$medv,$sdv_sum2\n";
  return ( $ave,$medv,$sdv_sum2, $M1[0], $M1[$#M1],$sum,$TOT);
}
sub  min_max_med2 { # get ave, median, sdv, min, max, sum, 
  my @M=@_; 
  my @M1=sort {$a$b}@M;
  my $sum=sumM(@M1);
  my $TOT=$#M+1;
  my $ave=sprintf "%0.2f",$sum/($TOT);
  #print "@M1";
  my ($med,$medv,$endloop,$sdv_sum,$sdv_sum2);
  for (@M1)
  {				#getting median and std
    ++$med;
    if ($med>$TOT*0.5 and $endloop ==0 )
    {
      $medv=$_;
      $endloop=1;       
    }
    $sdv_sum+=($_-$ave)*($_-$ave);
  }
  $sdv_sum2=sprintf "%0.3f",sqrt($sdv_sum/($TOT));
  #min   max                  median std
  shift @M1;
  #print ">>[@M1]  $M1[0], $M1[$#M1],$sum,$ave,$medv,$sdv_sum2\n";
  return ( $ave,$medv,$sdv_sum2, $M1[0], $M1[$#M1],$TOT); 
}
sub  min_max_med3 {
  my $PLO=shift;#median all chrom
  my @M=@_; 
  my @M1=sort {$a$b}@M;
  my $sum=sumM(@M1);
  my $TOT=$#M+1;
  my $ave=sprintf "%0.2f",$sum/($TOT);
  #print "@M1";
  my ($med,$medv,$endloop,$sdv_sum,$sdv_sum2);
  for (@M1)
  {				#getting median and std
    ++$med;
    if ($med>$TOT*0.5 and $endloop ==0 )
    {
      $medv=$_;
      $endloop=1;       
    }
    $sdv_sum+=($_-$ave)*($_-$ave);
  }
  $sdv_sum2=sprintf "%0.3f",sqrt($sdv_sum/($TOT));
  #min   max                  median std
  shift @M1;
  #print ">>[@M1]  $M1[0], $M1[$#M1],$sum,$ave,$medv,$sdv_sum2\n";
  return sprintf "%0.4f %0.4f %0.4f %0.4f %0.4f %0.0f", $ave*$PLO,$medv*$PLO,$sdv_sum2*$PLO, $M1[0]*$PLO, $M1[$#M1]*$PLO,$TOT;
}


sub sumM {
  my $sum=0;
  for (@_)
  {
    $sum+=$_;
  }
  return $sum;
}

sub chromID {
  my $in=shift;
  my $fai="$in.fai";
  my (%Fai,@chrom);
  open F1,$fai;
  $chrom[0]=0;
  while (my $s=)
  {
    my($chr)=split '\s+',$s;
    push @chrom,$chr;
  }
  return @chrom;
}

sub medianID {
  my @x;
  my $in=shift;
  open F1,$in;
  my %median;
  while (my $s=)
  {
    @x=split '\s+',$s;
    $median{"$x[0] $x[1]"}=$x[3];
  }
  return %median;
}




sub log10 {
my $n = shift;
return log($n)/log(10);
}


sub div{
my ($a,$b)=@_;
if ($b==0){
return -1.0;
}else{
return sprintf "%0.4f",$a*1.0/$b;
}
}

51.220581 4.399722

Rate this:

Share this:

  • Share on Reddit (Opens in new window) Reddit
  • Share on X (Opens in new window) X
  • Print (Opens in new window) Print
Like Loading...

The Titanium Physicists podcast: I’ve never be able to listen till the end

Posted by Pico on May 17, 2012
Posted in: Uncategorized. Leave a comment

Some podcasters try to hard to be funny, ending up with just junky mess. This podcast seems to be designed for just themselves. I tried several episodes but I just switched to some other valuable programs. I am a physicist but this program sounds waste of time.

51.220581 4.399722

Rate this:

Share this:

  • Share on Reddit (Opens in new window) Reddit
  • Share on X (Opens in new window) X
  • Print (Opens in new window) Print
Like Loading...

Posts navigation

← Older Entries
  • Twitter

    Tweets by p_hi1
  • Pages

    • podcast_video
      • applied mathematics
    • about
    • scripting
    • climate change
  • Top Posts

    • Neclear zomibes in Japan (1)
  • Recent Posts

    • matplotlib installation problems on MAC.
    • Graduate school advice: kind of (1)
    • Perfect!! —
    • A new blog for introductory bioinformatics
    • Japanese Climate change deniers
  • Archives

    • June 2013
    • January 2013
    • August 2012
    • June 2012
    • May 2012
    • April 2012
    • March 2012
    • February 2012
    • January 2012
    • December 2011
    • November 2011
    • October 2011
    • September 2011
    • August 2011
    • July 2011
    • June 2011
    • May 2011
    • April 2011
    • March 2011
    • February 2011
    • January 2011
    • December 2010
    • November 2010
    • October 2010
    • September 2010
    • August 2010
    • July 2010
    • June 2010
    • May 2010
    • April 2010
    • March 2010
    • December 2009
    • February 2009
    • January 2009
    • December 2008
    • November 2008
    • October 2008
    • August 2008
    • March 2007
    • February 2007
    • January 2007
    • December 2006
    • November 2006
    • September 2006
  • Boston Climate change Education Genome Graduate school health Immigration Japonaise Language News Ph.D. Physics politics Postdoc Schools Science Uncategorized ことば ポスドク 博士 地球温暖化 大学 日本語 気象変化 海外研究 物理 理系大学院留学 科学 英語 言語
  • book climate change culture Education ESL French Fukushima genome graduate school immigration Language Ph.D. postdoc science ことば アメリカ カナダ ポスドク ヨーロッパ 国家の品格 地球温暖化 大学院対策 大学院留学 日本 気象変化 海外研究 留学 留学対策 科学 英語 英語学習
  • Blogroll

    • A Pillow Diary of an Expatriate Scientist
    • dailykos
    • ENV: RLMiller
    • Science News
    • Sequencing DNAs
    • Topblog
    • wiredscience
  • Education

    • Chronicle H. E.
    • Education in Canada@wiki
    • phds.org
    • University ranking@wiki
  • News

    • news on japan
  • Schools

    • Acadia University
    • BC@Wiki
    • UNB@Wiki
    • University of Waterloo
    • UW@Wiki
  • Science

    • Climate Progress
    • scienceblog
    • scienceblogs
  • Useful links

    • Fight Leukemia-lymphoma
    • Perimeter Institute (Theoretical physics)
    • spaceweather
    • Tropical cyclone
  • Site Meter
Blog at WordPress.com.
A Pillow Diary of an Expatriate Scientist
Blog at WordPress.com.
Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy
  • Subscribe Subscribed
    A Pillow Diary of an Expatriate Scientist

    Have a WordPress.com account? Log in now.

  • A Pillow Diary of an Expatriate Scientist
    View site in Reader
    Manage subscriptionsSign upLog in
    Report this content
    Collapse this bar
Loading Comments...
%d
    Create your own website, free on WordPress.com.Create your own website.
    Start free