jianhong / ATACseqQC

ATAC-seq Quality Control

Home Page:https://jianhong.github.io/ATACseqQC/articles/ATACseqQC.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

error in factorFootprints function

nevelsk90 opened this issue · comments

Hi,

Thanks for making the tool.
I am trying to run factorFootprints function and getting the following error:

sigs <- factorFootprints( bamfiles=shiftedBamfile,
                            pfm=Wt1[[1]] , 
                           genome = Mmusculus, 
                         min.score="90%", 
                           upstream=100, downstream=100 )

Error in asMethod(object) : 
  cannot create a GRanges object from a Seqinfo object with NA
  seqlengths

Here is my BAM file which is an output of shiftGAlignmentsList, the data is only for mouse chr19:
https://drive.google.com/open?id=1RM6W1jJt10jrrXtMtqzfj47u4--IlQDB

Question number 2: What are the exact formatting rules for a bindingSites argument of the factorFootprints function? How many columns, in what format etc.??

Thanks in advance and regards
Tim

Hi Tim,

Sorry for the delay reply.

Please add seqlev=paste0("chr", c(1:19, "X", "Y") parameter like this:

sigs <- factorFootprints( bamfiles=shiftedBamfile,
                            pfm=Wt1[[1]] , 
                           genome = Mmusculus, 
                         seqlev = paste0("chr", c(1:19, "X", "Y") ,
                         min.score="90%", 
                           upstream=100, downstream=100 )

I will add error message at the beginning of function to check the seqlevels.

For question 2, it is a GRanges object with score column like this:

GRanges object with 6 ranges and 1 metadata column:
seqnames ranges strand | score
|
[1] chr1 4770056-4770074 + | 0.983513
[2] chr1 13789385-13789403 + | 0.944339
[3] chr1 21276347-21276365 + | 0.956678
[4] chr1 22604492-22604510 + | 0.950428
[5] chr1 24901458-24901476 + | 0.961436
[6] chr1 26902487-26902505 + | 0.943259