An error while finding pintersect()
0
0
Entering edit mode
@prashantha-hebbar-3526
Last seen 4.3 years ago

Dear all, I have to find percentage of overlap between two genomic range objects (reference and test) and get those coordinates having more than 50% overlap in test genomic range object. I have tried scripts available in forum, but while running pintersect() function i find below error. would you please suggest me how to solve below error?

Error in seqinfo<-(*tmp*, value = <s4 object="" of="" class="" "seqinfo"="">) : could not find symbol "force" in environment of the generic function

Regards, Prashantha

R version 3.4.2 (2017-09-28) -- "Short Summer" Copyright (C) 2017 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details.

Natural language support but running in an English locale

R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R.

REF = structure(list(chr = c("1", "1", "1", "1", "1", "1", "1", "1", + "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1"), + start = c(766101L, 1627918L, 4421060L, 7324468L, 8053732L, + 8182462L, 8182584L, 8182584L, 8206130L, 8804237L, 10369546L, + 10370541L, 10543836L, 10656324L, 12354307L, 12841928L, 12845863L, + 12909237L, 12909965L, 13444908L), end = c(809773L, 1672603L, + 4424115L, 7325408L, 8067990L, 8189854L, 8189285L, 8189285L, + 8209321L, 8812660L, 10377983L, 10377983L, 10545046L, 10657912L, + 12357076L, 12971833L, 12883096L, 12927107L, 12918079L, 13468022L + ), Deft = c(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1)), .Names = c("chr", "start", "end", "Deft" + ), row.names = c(217L, 568L, 1340L, 1691L, 1804L, 1811L, 1812L, + 1813L, 1819L, 1880L, 2017L, 2020L, 2041L, 2049L, 2224L, 2282L, + 2284L, 2332L, 2335L, 2424L), class = "data.frame")

TEST = structure(list(sampleID = c("SID1331", "SID1331", "SID1331", + "SID1331", "SID1331", "SID1331", "SID1331", "SID1331", "SID1331", + "SID1331", "SID1337", "SID1337", "SID1337", "SID1337", "SID1337", + "SID1337", "SID1337", "SID1337", "SID1337", "SID1337", "SID1337" + ), Chromosome = c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 10L, + 10L, 11L, 11L, 11L, 11L, 11L, 12L, 12L, 12L, 12L), Start = c(61735L, + 7541291L, 32664866L, 45935056L, 55449273L, 117769301L, 117892183L, + 167580307L, 172458743L, 172852403L, 129495492L, 129526092L, 198572L, + 112837740L, 112847206L, 132105712L, 132126171L, 150442L, 23261653L, + 23270278L, 28135989L), End = c(7539746L, 32664843L, 45934562L, + 55445562L, 117767918L, 117886211L, 167580003L, 172457651L, 172851634L, + 214938359L, 129525791L, 135506704L, 112837593L, 112846803L, 132104437L, + 132122974L, 134944770L, 23261612L, 23268885L, 28131521L, 52920414L + )), .Names = c("sampleID", "Chromosome", "Start", "End"), row.names = c(1L, + 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 1000L, 1001L, 1002L, 1003L, + 1004L, 1005L, 1006L, 1007L, 1008L, 1009L, 1010L), class = "data.frame") library(GenomicRanges) Loading required package: stats4 Loading required package: BiocGenerics Loading required package: parallel

Attaching package: ‘BiocGenerics’

The following objects are masked from ‘package:parallel’:

clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
clusterExport, clusterMap, parApply, parCapply, parLapply,
parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from ‘package:stats’:

IQR, mad, xtabs

The following objects are masked from ‘package:base’:

anyDuplicated, append, as.data.frame, cbind, colnames, do.call,
duplicated, eval, evalq, Filter, Find, get, grep, grepl, intersect,
is.unsorted, lapply, lengths, Map, mapply, match, mget, order,
paste, pmax, pmax.int, pmin, pmin.int, Position, rank, rbind,
Reduce, rownames, sapply, setdiff, sort, table, tapply, union,
unique, unsplit, which, which.max, which.min

Loading required package: S4Vectors

Attaching package: ‘S4Vectors’

The following objects are masked from ‘package:base’:

colMeans, colSums, expand.grid, rowMeans, rowSums

Loading required package: IRanges Loading required package: GenomeInfoDb

refGR <- makeGRangesFromDataFrame(REF) testGR <- makeGRangesFromDataFrame(TEST) hits <- findOverlaps(refGR, testGR) overlaps <- pintersect(refGR[queryHits(hits)], testGR[subjectHits(hits)]) Error in seqinfo<-(*tmp*, value = <s4 object="" of="" class="" "seqinfo"="">) : could not find symbol "force" in environment of the generic function sessionInfo() R version 3.4.2 (2017-09-28) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 17.10

Matrix products: default BLAS: /usr/lib/x8664-linux-gnu/openblas/libblas.so.3 LAPACK: /usr/lib/x8664-linux-gnu/libopenblasp-r0.2.20.so

locale: [1] LCCTYPE=enUS.UTF-8 LCNUMERIC=C
[3] LC
TIME=arKW.UTF-8 LCCOLLATE=enUS.UTF-8
[5] LC
MONETARY=arKW.UTF-8 LCMESSAGES=enUS.UTF-8
[7] LC
PAPER=arKW.UTF-8 LCNAME=C
[9] LCADDRESS=C LCTELEPHONE=C
[11] LCMEASUREMENT=arKW.UTF-8 LC_IDENTIFICATION=C

attached base packages: [1] parallel stats4 stats graphics grDevices utils datasets [8] methods base

other attached packages: [1] GenomicRanges1.26.4 GenomeInfoDb1.14.0 IRanges2.8.2
[4] S4Vectors
0.12.2 BiocGenerics_0.20.0

loaded via a namespace (and not attached): [1] zlibbioc1.24.0 compiler3.4.2 XVector0.14.1
[4] GenomeInfoDbData
1.0.0 RCurl1.95-4.12 bitops1.0-6
>

GenomicRanges • 633 views
ADD COMMENT
0
Entering edit mode

Your version of R/Bioconductor is a few years old and no longer supported. Please update and see if the problem persists.

ADD REPLY

Login before adding your answer.

Traffic: 866 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6