Month: November 2012

  • Multiple histograms in a plot using ggplot2 ggplot…

    deafly Multiple histograms in a plot using ggplot2. ggplot(test.melt, aes(x = value, fill = sample)) + geom_histogram(alpha = 0.3, position = ‘identity’, aes(y = ..density..)) + geom_density(alpha = 0.3, position = ‘identity’) Be careful. The default value for the position parameter is different the histogram and density plot. So set the parameter explicitly. Identity: overlap the…

  • To change two vertically split windows to horizontally…

    rencontre trav livry gargan To change two vertically split windows to horizontally split Ctrl-W t Ctrl-W K Horizontally to vertically: Ctrl-W t Ctrl-W H Explanations: Ctrl-W t makes the first (topleft) window current Ctrl-W K moves the current window to full-width at the very top Ctrl-W H moves the current window to full-height at far left http://stackoverflow.com/questions/1269603/to-switch-from-vertical-split-to-horizontal-split-fast-in-vim

  • Find duplicate or unique records in unix sort…

    Find duplicate or unique records in unix sort is essential because uniq find successive identical lines. Unique records cat data.txt | sort | uniq Duplicate records cat data.txt | sort | uniq -d

  • Using gff format in IGV 1 Do not…

    Using gff format in IGV. 1. Do not omit the first line, especially for GFF 3. As IGV supports both of GFF ver 2 and GFF ver 3, the file needs to be distinguished. Do not miss the first line ##gff-version 3 2. Make sure tab is used to separate fields. Even for the first…

  • Index fasta file generating fai file to use…

    Index fasta file – generating fai file – to use with IGV or bedtools. samtools faidx reference.fasta http://genomeview.org/content/preparing-fasta-files

  • Convert all tabs to spaces and vice versa…

    Convert all tabs to spaces and vice versa. You can use the :retab command to convert all existing tabs to spaces. You can do both in one command: :set et|retab You can also convert spaces to tabs: :set noet|retab! http://vim.wikia.com/wiki/Super_retab

  • Vim plugin surround Normal mode ds delete a…

    Vim plugin surround Normal mode ———– ds – delete a surrounding cs – change a surrounding ys – add a surrounding yS – add a surrounding and place the surrounded text on a new line + indent it yss – add a surrounding to the whole line ySs – add a surrounding to the whole…

  • http jeromyanglim blogspot ca 2010 05 abbreviations of…

    http://jeromyanglim.blogspot.ca/2010/05/abbreviations-of-r-commands-explained.html 250+ R commands. Often times R users suffer from difficulties finding what commands are available for a specific process. This lists 250+ R commands in table.