Archive For October 22, 2015
Lately, i’ve been pulling out rnaseq reads and trying to build contings by hand in a quick and dirty manner by
1 |
samtools view unmapped.bam | grep MYSTRING |
A nifty trick is to use vim to line up your strings on MYSTRING. I did this using the tabularize.vim plugin.
1 |
:Tabularize /TACCAT/r0c1l0 |
This basically says, line up all lines on TACCAT. Everything before…
It’s not always easy to see the source code for functions in R/BioC. For S4 method dispatch, you need to figure out the function signature, then call selectMethod() or getMethod() getMethod = selectMethod For example:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
> pileup standardGeneric for "pileup" defined from package "Rsamtools" function (file, index = file, ..., scanBamParam = ScanBamParam(), pileupParam = PileupParam()) standardGeneric("pileup") <environment: 0x79bf7d8> Methods may be defined for arguments: file Use showMethods("pileup") for currently available ones. > showMethods("pileup") Function: pileup (package Rsamtools) file="BamFile" file="character" > selectMethod("pileup", "BamFile") #shows code for method that takes BamFile as input (see the source code) |
For S3 dispatch, you can call
1 |
methods("function-name") |
to get a list of dispatch methods and then…