Posts

Showing posts from November, 2015

BioConductor Error: source("https://bioconductor.org/biocLite.R") biocLite("DEXSeq")Error in file(filename, "r", encoding = encoding) : cannot open the connection In addition: Warning message: In file(filename, "r", encoding = encoding) : unsupported URL scheme

> source("https://bioconductor.org/biocLite.R") biocLite("DEXSeq")Error in file(filename, "r", encoding = encoding) : cannot open the connection In addition: Warning message: In file(filename, "r", encoding = encoding) : unsupported URL scheme I just replace https with http. It worked.  > source("http://bioconductor.org/biocLite.R") Bioconductor version 3.0 (BiocInstaller 1.16.5), ?biocLite for help A new version of Bioconductor is available after installing the most recent version of R; see http://bioconductor.org/install I'm not sure why. But anyway it works. References: https://support.bioconductor.org/p/74540/

Java Tips: A JButton tooltip example

Java/Swing FAQ: How do I set the help text (i.e., help text, balloon text, tooltip text) on a  JButton ? Just call the  setToolTipText  method on the  JButton . Here's a quick JButton tooltip display example: // create a button with tooltip help text JButton button = new JButton("Click Me"); button.setToolTipText("Click this button to make something happen."); References: http://alvinalexander.com/blog/post/jfc-swing/how-set-help-tooltip-balloon-text-jbutton

Java tips: How to solve the problem of "Remote repository contains commits unmerged into the local branch" in NetBeans?

Image
I followed the below instructions to push a Java project in Netbeans 8.0.1 into a Bitbucket repository, but following error popped up: Project > Team > Git > Initialize Project > Right Click > Team > Commit Project > Team > Remote > Push > ... I tried to solve this issue following the procedure in  this post , but no success. The best answer: The message is saying that your local repository is not up to date with the remote repository. You need to pull from the remote repo and merge or discard changes if necessary. Once that is done you should be able to push your commits. I tried this method. It works! Good luck! References: http://stackoverflow.com/questions/26803858/netbeans-8-0-1-remote-repository-contains-commits-unmerged-into-the-local-bran

JAVA tips: How to write logs in text file when using java.util.logging.Logger?

I have a situation in which i want to write all logs created by me to write into a text file. we are using java.util.logging.Logger API for generating the logs. I tried private static Logger logger = Logger . getLogger ( className . class . getName ()); FileHandler fh ; fh = new FileHandler ( "C:/className.log" ); logger . addHandler ( fh ); But still getting my logs on console only.... Kindly help. Thanks in Advance Try this sample. It works for me. public static void main ( String [] args ) { Logger logger = Logger . getLogger ( "MyLog" ); FileHandler fh ; try { // This block configure the logger with handler and formatter fh = new FileHandler ( "C:/temp/test/MyLogFile.log" ); logger . addHandler ( fh ); SimpleFormatter formatter = new SimpleFormatter (); fh . setFormatter ( formatter ); // the following statement is used t

Bioinfor tips: How to deal with a cuffmerge error?

Today when I tried to use cuffmerge, but I encouter a problem shown as below: File "/group/bioinfo/apps/apps/cufflinks-2.2.1/cuffmerge", line 95     except getopt.error, msg:                        ^ SyntaxError: invalid syntax Here is the solution to solve my problem: The reason that cause this problem is because of the version of python. Remeber that cufflinks is written in python. In my case, the version of the default python was Python 3.4.3 :: Anaconda 2.2.0 (64-bit). If I change it to Python 2.7.10 :: Anaconda 2.0.1 (64-bit), cuffmerge worked.

R Codes: Understanding the arguments of heatmap.2 {gplots}

Image
R heatmap Shaojun Xie Thursday, November 19, 2015 This is an example to show you how to draw a heatmap and also show you how each parameter work. library ( gsheet ) a <- gsheet2tbl ( 'https://docs.google.com/spreadsheets/d/1MUPsoYsxHwoQFEjsq_XlTvxAK6uA0QyuboACvMg2pVo/pubhtml' ) b <- unlist ( a [ , 1 ] ) rownames ( a ) <- b a $ id <- NULL library ( gplots ) heatmap.2 ( as.matrix ( a ) ) Arguments “scale” is the chrater string indicating whether to draw ‘none’, ‘row’, ‘column’ or ‘both’ dendrograms. Defaults to ‘both’. However, if Rowv (or Colv) is FALSE or NULL and dendrogram is ‘both’, then a warning is issued and Rowv (or Colv) arguments are honoured. heatmap.2 ( as.matrix ( a ) , scale = "row" ) Argument “col” is colors used for the image. Defaults to heat colors (heat.colors). heatmap.2 ( as.matrix ( a ) , scale = "row" , col = bluered ( 256 ) ) Argument “trace”: character string indicating whether a solid “trace”