Skip to main content
Fig. 3 | Genome Biology

Fig. 3

From: plyranges: a grammar of genomic data transformation

Fig. 3

Idiomatic code examples for plyranges (a) and GenomicRanges (b) illustrating an overlap and aggregate operation that returns the same result. In each example, we have two BED files consisting of SNPs that are genome-wide association study (GWAS) hits and reference exons. Each code block counts for each SNP the number of distinct exons it overlaps. The plyranges code achieves this with an overlap join followed by partitioning and aggregation. Strand is ignored by default here. The GenomicRanges code achieves this using the “Hits” and “List” classes and their methods

Back to article page