This is a (very unofficial) minimal R package to load data from
ANGSD into R. So far it just
loads ANGSD's pestPG
file into a
GenomicRanges
GRanges
object (or, optionally a data.frame
). Eventually, I'll probably add
other convenience functions to work with ANGSD data.
Clone this repository:
$ git clone git@github.com:vsbuffalo/angsdr.git
and install with:
$ R CMD INSTALL angsdr
Data from a pestPG file can be loaded with:
library(angsdr)
d <- readPestPG("inst/extdata/test.pestPG")
The function overlapWidths
can be used to annotate a ANGSD GRanges
object
with the proportion of a window that overlaps a feature, given by another
GRanges
object. For example:
library(rtracklayer)
gtf <- import("your_species.gtf")
coding <- gtf[gtf$source == "protein_coding"]
reduced_coding <- reduce(coding, ignore.strand=TRUE)
d$coding <- overlapWidths(d, reduced_coding)
Please feel free to fork and participate in this package's development! If you'd like features added, open an issue on Github.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.