Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Genome Interval Arithmetic in R

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md
NotificationsYou must be signed in to change notification settings

rnabioco/valr

Repository files navigation

R-CMD-checkcodecov

valr provides tools to read and manipulate genome intervals and signals,similar to theBEDtoolssuite.

Installation

# Install released version from CRANinstall.packages("valr")
# Install development version from GitHub# install.packages("pak")pak::pak("rnabioco/valr")

valr Example

Functions in valr have similar names to their BEDtools counterparts, andso will be familiar to users coming from the BEDtools suite. Unlikeother tools that wrap BEDtools and write temporary files to disk, valrtools run natively in memory. Similar topybedtools, valrhas a terse syntax:

library(valr)library(dplyr)snps<- read_bed(valr_example("hg19.snps147.chr22.bed.gz"))genes<- read_bed(valr_example("genes.hg19.chr22.bed.gz"))# find snps in intergenic regionsintergenic<- bed_subtract(snps,genes)# find distance from intergenic snps to nearest genenearby<- bed_closest(intergenic,genes)nearby|>  select(starts_with("name"),.overlap,.dist)|>  filter(abs(.dist)<5000)#> # A tibble: 1,047 × 4#>    name.x      name.y   .overlap .dist#>    <chr>       <chr>       <int> <int>#>  1 rs530458610 P704P           0  2579#>  2 rs2261631   P704P           0  -268#>  3 rs570770556 POTEH           0  -913#>  4 rs538163832 POTEH           0  -953#>  5 rs190224195 POTEH           0 -1399#>  6 rs2379966   DQ571479        0  4750#>  7 rs142687051 DQ571479        0  3558#>  8 rs528403095 DQ571479        0  3309#>  9 rs555126291 DQ571479        0  2745#> 10 rs5747567   DQ571479        0 -1778#> # ℹ 1,037 more rows

[8]ページ先頭

©2009-2025 Movatter.jp