CAGEFightR to get CTSS from CAGE error
0
0
Entering edit mode
July • 0
@july-20750
Last seen 5.5 years ago

Hello ! We are analyzing CAGE data and are trying to apply the cagefightR package. Unfortunately we got the following error message: "Error in asMethod(object) : all the ranges in the object to coerce to GPos must have a width of 1"

Can someone help us understanding where is our error, and how to correct it ?

Here is the code: library(CAGEfightR) library(stringr)

bwpath <- "../elaborateddata/directionalbw" bwplus <- list.files(bwpath, pattern = "pos", full.names = T) bwminus <- list.files(bwpath, pattern = "neg", full.names = T) sampnames <- strextract(bwplus, "[0-9]{3}[(W)(H)]") ix <- !is.na(sampnames) bwplus <- bwplus[ix] bwminus <- bwminus[ix] sampnames <- sampnames[ix] rownames <- str_extract(sampnames, "W|H")

design <- data.frame(row.names = sampnames, Name = sampnames, BigWigPlus = bwplus, BigWigMinus = bwminus)

bwplus <- BigWigFileList(bwplus) bwminus <- BigWigFileList(bwminus) names(bwplus) <- sampnames names(bwminus) <- sampnames

genomeinfo <- SeqinfoForUCSCGenome("mm10")

ctss <- quantifyCTSSs(plusStrand = bwplus, minusStrand = bwminus, genome = genomeinfo, design = design)

(Returns this error message after the last line:

Error in asMethod(object) : all the ranges in the object to coerce to GPos must have a width of 1)

Many thanks in advance.

CAGEFightR CAGE CTSS • 895 views
ADD COMMENT
0
Entering edit mode

This could be an issue with the BigWig-input files. CAGEfightR assumes all ranges in the BigWig is exactly 1, i.e. a single count for each single basepair (traditional CTSS format). This could be checked using something like this: gr <- import(bw_file) table(width(gr))

ADD REPLY

Login before adding your answer.

Traffic: 869 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