Posts

Showing posts from April, 2016

Software Tips: Deconseq

Problem solved: In the README file, they give a database link:  ftp://edwards.sdsu.edu:7009/ deconseq/db/ It seemed that this link doesn't work. It appears the SDSU firewall is blocking the FTP site.  I moved the databases to an HTTP page for the time being. https://edwards.sdsu.edu/~ katelyn/DECONSEQ/

Software Tips: Deconseq

Problem solved: In the README file, they give a database link:  ftp://edwards.sdsu.edu:7009/ deconseq/db/ It seemed that this link doesn't work. It appears the SDSU firewall is blocking the FTP site.  I moved the databases to an HTTP page for the time being. https://edwards.sdsu.edu/~ katelyn/DECONSEQ/

Shell tips: Can a Bash script tell what directory it's stored in?

Question: How do I get the path of the directory in which a  Bash  script is located FROM that Bash script? Answer: DIR = "$( cd " $ ( dirname "${BASH_SOURCE[0]}" ) " && pwd )" is a useful one-liner which will give you the full directory name of the script no matter where it is being called from. This will work as long as the last component of the path used to find the script is not a symlink (directory links are OK). If you want to also resolve any links to the script itself, you need a multi-line solution: SOURCE = "${BASH_SOURCE[0]}" while [ - h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink DIR = "$( cd -P " $ ( dirname "$SOURCE" ) " && pwd )" SOURCE = "$(readlink " $SOURCE ")" [[ $SOURCE != /* ]] && SOURCE = "$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative

Use eyedropper to match colors on your slide

Image
https://goo.gl/z6nTOx Tired of laboriously trying to precisely match the colors of shapes and pictures, to other parts of your PowerPoint presentation to give your slides a cohesive look? Let PowerPoint do the work for you with the new eyedropper. Double-click the shape or other thing you want to match colors for. (Yes, you can select multiples. Press Ctrl and then click the shapes.) Then click any of the color options, such as  Shape Fill  in the  Shapes Style  group , found on the  Format  tab under  Drawing Tools . Using the eyedropper, click the color you want to match and apply to the selected shape or object. As you move your pointer around the different colors, a live preview of the color appears. Hover or pause on a color to see its RGB (Red Green Blue) color coordinates. Click on the color you want. For a more accurate way of getting the exact color you want when many colors are clustered together, select the color by pressing Enter or Space bar instead. T

R tips: Generating figures as excel using R in terms of color

Image
If you are used to use excel to generate figure in your research and you like the default colors, or if you're tired of choosing colors, you can use the one below in R. This is the default color assortment in Excel 2007. In R, you can use it like this: #R code > color <- c(rgb(79,129,189,max = 255), rgb(192,80,77,max = 255), rgb(155,187,89,max = 255), rgb(128,100,162,max=255), rgb(75,172,198,max=255), rgb(247,150,70,max=255), rgb(44,77,117,max=255), rgb(119,44,42,max=255), rgb(95,117,48,max=255), rgb(77,59,98,max=255)) > plot(1:10, 1:10, col=color,pch=20,cex=6)

R tips: Generating figures as excel using R in terms of color

Image
If you are used to use excel to generate figure in your research and you like the default colors, or if you're tired of choosing colors, you can use the one below in R. This is the default color assortment in Excel 2007. In R, you can use it like this: #R code > color <- c(rgb(79,129,189,max = 255), rgb(192,80,77,max = 255), rgb(155,187,89,max = 255), rgb(128,100,162,max=255), rgb(75,172,198,max=255), rgb(247,150,70,max=255), rgb(44,77,117,max=255), rgb(119,44,42,max=255), rgb(95,117,48,max=255), rgb(77,59,98,max=255)) > plot(1:10, 1:10, col=color,pch=20,cex=6)

NGS software tips: SICER for ChIP-seq

Tip: Do NOT need to move SICER anymore. For SICER, if you are going to the original code, you have to copy the source code to your working directory. This is because the PATHTO variable varies when you’re doing different work. To avoid this, you can modify the code to: PATHTO="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" #SICER=$PATHTO/SICER SICER=$PATHTO PYTHONPATH=$SICER/lib export PYTHONPATH Tip: About duplicate reads One step of SICER is to remove duplicate read using remove_redundant_reads.py. “-t 1” is the default cutoff when doing duplicate reads removal. See line 60 of remove_redundant_reads.py . Solved: Error Report.   File "/depot/bioinfo/Projects/Kal/bean_GHvsTC/software/SICER_V1.1/SICER/src/remove_redundant_reads.py", line 84     print chrom, "\tPlus reads:",p_total, "\tRetained plus reads:", p_retained,     ";\tMinus reads:", m_total, "\tRetained

perl: symbol lookup error:

-bash-4.1$  perl /group/bioinfo/apps/apps/diffReps-1.55.4/bin/diffReps.pl perl: symbol lookup error: /home/xie186/perl5/lib/perl5/x86_64-linux-thread-multi/auto/                                                              Math/CDF/CDF.so: undefined symbol: Perl_Gthr_key_ptr I checked the perl version. $ perl -v This is perl 5, version 20, subversion 1 (v5.20.1) built for x86_64-linux-thread-multi Copyright 1987-2014, Larry Wall Perl may be copied only under the terms of either the Artistic License or the GNU General Public License, which may be found in the Perl 5 source kit. Complete documentation for Perl, including FAQ lists, should be found on this system using "man perl" or "perldoc perl".  If you have access to the Internet, point your browser at http://www.perl.org/, the Perl Home Page. -bash-4.1$ /usr/bin/perl -v This is perl, v5.10.1 (*) built for x86_64-linux-thread-multi Copyright 1987-2009, Larry Wall Per

qsub tips: You need to know this about qsub

A PBS  server  treats all associated machines as  nodes  of one big cluster and uses  queues  to allocate their resources. Use the  pbsnodes  and  qstat  commands below to show the configuration in detail. Submit jobs with  qsub . Node info pbsnodes -a # show status of all nodes pbsnodes -a <node> # show status of specified node pbsnodes -l # list inactive nodes pbsnodelist # list status of all nodes (one per line) Queue info qstat -Q # show all queues qstat -Q <queue> # show status of specified queue qstat -f -Q <queue> # show full info for specified queue qstat -q # show all queues (alternative format) qstat -q <queue> # show status of specified queue (alt.) Job submission and monitoring qsub <jobscript> # submit to default queue qsub -q <queue&