Hi,
My question is more naive. I am using ChIPseeker to compare multiple Peak files. How to read them all and store in "files" object.
files <- getSampleFiles()
Let say I have two peak files
/myFolder/peak1.bed
/myFolder/peak2.bed
How to read and calculate tagMatrix for my multiple ChIP-seq files.. I have sam, bam, bed format aligned files as well. How can I come to tagMatrixList from the files that I have to come to this point:
tagMatrixList <- lapply(files, getTagMatrix, windows=promoter)
Could you please show me the beginning codes/steps.
many thanks
thanks
Do these peak files come from different samples (cell lines or subjects) or are they from different TF or histone marks?
Have you tried looking at the ChIPseeker vignette here - it is quite informative
If you give more clarification on the two samples, I am happy to help with starter code
@ apnri; Many Thanks. They are two different ChIPs, one is histone another is TF. Well, my question is actually one and very simple one and more naive one: "how to read my own peak file from hard drive" (not the package peak file) to follow the vignette example analysis. The vignette is enough detailed. Just got confused in one place where it says that "tagMatrix" is precomputed (to save time). I though it is may be reading aligned BED file (in addition to or) instead of peak bed file some where else and making any Tag Matrix. So, may be this is not the case, all is coming from just peak bed file. So, the started code is needed. So, would you show how to "getTagMatrix" for all the Peaks files I have? That is tagMatrixList <- getTagMatrix(peak, windows=promoter) # but for all peaks. I am little naive in R. peak <- readPeakFile(files) # does not work for all peak files at a time. Thanks.
@ apnri: Same cell Line but different TF. So, the started code would be helpful if you please provide So, would you please show how to "getTagMatrix" for all the Peaks files I have? That is tagMatrixList <- getTagMatrix(peak, windows=promoter) # but for all peaks. I am little naive in R. peak <- readPeakFile(files) # does not work for all peak files at a time. Thanks.
I am not sure I follow what the final goal is when you say tagMatrix for all peaks. You can extend the promoter region farther to get the Tag binding profiles to larger regions. What is it that you want to view with these files?
Here a starter for ChIPseeker -- most of it from the vignette linked above.
You should also check this out if that is helpful -- https://github.com/shenlab-sinai/ngsplot
Many Thanks. That is also interesting.
@ apnri:
Thanks. I think I was not clear enough. What I mean is to "Compare Multiple peak file" is the actual goal. (7 ChIP peak data set comparison)
So, for that one has to read all files AT A TIME, not one by one. One by one I can do easily. But how altogether. Like one already shown by Guangchuang Yu:
files <- list(peak1 = "/myFolder/peak1.bed", peak2 = "/myFolder/peak2.bed")
Now, how do you make a single "tagMatrix" object for multiple TF peak file? For example: how to come to following points when you have two TF peak files (peak1.bed, peak2.bed) :
tagMatrixList <- lapply(files, getTagMatrix, windows=promoter)
plotAvgProf(tagMatrixList, xlim=c(-3000, 3000))
In the vignette it said the to do the above, you can load the precomputed system file:
data("tagMatrixList")
I don't want to load system example files. I need my files to be red in "
tagMatrixList <- lapply(files, getTagMatrix, windows=promoter)"
But how do you do that with will all peak TF files that you have (peak1.bed, peak2.bed) at a time?
Thanks again.
I can't see any problem here.
Hi, that works. Thanks
Hi, What is the replacement for "5'-UTR or 3'UTR or CDS or Exons or Introns" for promoter in the following code (hg19)?
promoter <- getPromoters(TxDb=txdb, upstream=3000, downstream=3000)
I mean, instead of "getPromoters" Can I use "get5'UTR" ?
Thanks in advance. Best regards, Jinesh.