ChIPpeakAnno
4
0
Entering edit mode
Julie Zhu ★ 4.3k
@julie-zhu-3596
Last seen 13 months ago
United States
Dingxia, If your peak file is in bed format, you could just use the following command to create RangedData. MyPeakList = BED2RangedData(read.table("peak.bed", sep= "\t",header=FALSE)) Best regards, Julie On 8/28/12 5:13 PM, "Dingxia Feng" <fengdxia at="" iastate.edu=""> wrote: > Hello, Lihua, > > I'm interested in your ChIPpeakAnno package, but I'm a pure biologist not good > at R stuff. My peak file is peak.bed. I want use what you mentioned > RfunctionGFF2RangedData to convert it to RangedData, but I don't know how to > do this, I mean I don't know what shall I type after the R prompt. Would you > please do me a favor to show me the code for this? Thanks. > > And I found in your example code, you use data (myPeakList), so do I need to > do more for the converted RangedData to get the peaklist? Or which columns > shall I keep or delet? Thanks again. > > Best wishes.
convert ChIPpeakAnno convert ChIPpeakAnno • 1.3k views
ADD COMMENT
0
Entering edit mode
Julie Zhu ★ 4.3k
@julie-zhu-3596
Last seen 13 months ago
United States
Dingxia, Please use the following command (skip =1 is added). Please keep the thread in the Bioconductor list so that others can contribute and/or benefit. Thanks! MyPeakList = BED2RangedData(read.table("TSpeakList.bed", sep= "\t",header=FALSE, skip=1)) Best regards, Julie On 8/28/12 6:43 PM, "Dingxia Feng" <fengdxia@iastate.edu> wrote: Hi, Lihua, Thanks for the reply. I tried your code, it didn't work for my file. The error messages are like this: > MyPeakList = BED2RangedData(read.table("TSpeakList.bed", sep= "\t",header=FALSE)) Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings, : line 1 did not have 5 elements I guess the problem is the format of my .bed. I got this file after using the mosaic peak caller package. The first lines of this .bed file are like this: track name=mosaicsPeaks description="MOSAiCS peaks" useScore=1 chrI2380023999 MOSAiCS_peak142 chrI158400 158599MOSAiCS_peak126 chrI223000 223399MOSAiCS_peak289 chrI334600 335399MOSAiCS_peak848.5 I also attached this file here, I hope it can help you understand my data structure. If you need more information about my file, please let me know, I'll try my best. Thanks for the help. Best wishes. On Tue, Aug 28, 2012 at 4:27 PM, Zhu, Lihua (Julie) <julie.zhu@umassmed.edu> wrote: Dingxia, If your peak file is in bed format, you could just use the following command to create RangedData. MyPeakList = BED2RangedData(read.table("peak.bed", sep= "\t",header=FALSE)) Best regards, Julie On 8/28/12 5:13 PM, "Dingxia Feng" <fengdxia@iastate.edu> wrote: > Hello, Lihua, > > I'm interested in your ChIPpeakAnno package, but I'm a pure biologist not good > at R stuff. My peak file is peak.bed. I want use what you mentioned > RfunctionGFF2RangedData to convert it to RangedData, but I don't know how to > do this, I mean I don't know what shall I type after the R prompt. Would you > please do me a favor to show me the code for this? Thanks. > > And I found in your example code, you use data (myPeakList), so do I need to > do more for the converted RangedData to get the peaklist? Or which columns > shall I keep or delet? Thanks again. > > Best wishes. [[alternative HTML version deleted]]
ADD COMMENT
0
Entering edit mode
Julie Zhu ★ 4.3k
@julie-zhu-3596
Last seen 13 months ago
United States
Dingxia, Great! Thanks for letting me know! If you do not want to subscribe to the list, you may post the message at http://www.bioconductor.org/help/mailing-list/mailform/ If you want to receive messages posted by others via the mailing list, you may subscribe to the list at https://stat.ethz.ch/mailman/listinfo/bioconductor. Thanks! Best regards, Julie On 8/29/12 11:11 AM, "Dingxia Feng" <fengdxia@iastate.edu> wrote: Thanks very much, Julie. The new code works. Julie, it's my pleasure to keep the thread in the Bioconductor list to benefit other people. But I don't know how to do this, can you show me how? Thanks. Best. On Wed, Aug 29, 2012 at 7:22 AM, Zhu, Lihua (Julie) <julie.zhu@umassmed.edu> wrote: Dingxia, Please use the following command (skip =1 is added). Please keep the thread in the Bioconductor list so that others can contribute and/or benefit. Thanks! MyPeakList = BED2RangedData(read.table("TSpeakList.bed", sep= "\t",header=FALSE, skip=1)) Best regards, Julie On 8/28/12 6:43 PM, "Dingxia Feng" <fengdxia@iastate.edu <http:="" fengdxia@iastate.edu=""> > wrote: Hi, Lihua, Thanks for the reply. I tried your code, it didn't work for my file. The error messages are like this: > MyPeakList = BED2RangedData(read.table("TSpeakList.bed", sep= "\t",header=FALSE)) Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings, : line 1 did not have 5 elements I guess the problem is the format of my .bed. I got this file after using the mosaic peak caller package. The first lines of this .bed file are like this: track name=mosaicsPeaks description="MOSAiCS peaks" useScore=1 chrI2380023999 MOSAiCS_peak142 chrI158400 158599MOSAiCS_peak126 chrI223000 223399MOSAiCS_peak289 chrI334600 335399MOSAiCS_peak848.5 I also attached this file here, I hope it can help you understand my data structure. If you need more information about my file, please let me know, I'll try my best. Thanks for the help. Best wishes. On Tue, Aug 28, 2012 at 4:27 PM, Zhu, Lihua (Julie) <julie.zhu@umassmed.edu <http:="" julie.zhu@umassmed.edu=""> > wrote: Dingxia, If your peak file is in bed format, you could just use the following command to create RangedData. MyPeakList = BED2RangedData(read.table("peak.bed", sep= "\t",header=FALSE)) Best regards, Julie On 8/28/12 5:13 PM, "Dingxia Feng" <fengdxia@iastate.edu <http:="" fengdxia@iastate.edu=""> > wrote: > Hello, Lihua, > > I'm interested in your ChIPpeakAnno package, but I'm a pure biologist not good > at R stuff. My peak file is peak.bed. I want use what you mentioned > RfunctionGFF2RangedData to convert it to RangedData, but I don't know how to > do this, I mean I don't know what shall I type after the R prompt. Would you > please do me a favor to show me the code for this? Thanks. > > And I found in your example code, you use data (myPeakList), so do I need to > do more for the converted RangedData to get the peaklist? Or which columns > shall I keep or delet? Thanks again. > > Best wishes. [[alternative HTML version deleted]]
ADD COMMENT
0
Entering edit mode
Julie Zhu ★ 4.3k
@julie-zhu-3596
Last seen 13 months ago
United States
Dingxia, There is no Annotation dataset in the package you loaded. I would recommend you read the documentation about data function by typing in R ?data and also typing ?annotatePeakInBatch and run a few examples. Best regards, Julie On 8/29/12 4:25 PM, "Dingxia Feng" <fengdxia@iastate.edu> wrote: Hi, Julie, I got jammed again. here is what happed: > library (ChIPpeakAnno) > mart=useMart("WS220",dataset="wormbase_gene") > TSS = getBM(c("gene", "chromosome_name", "chromosome_start", + "chromosome_end", "chromosome_strand"), mart = mart) > TSS = unique(TSS[!is.na <http: is.na=""> (TSS[,3]),]) > Annotation = RangedData(IRanges(start = as.numeric(TSS[, 3]), end = as.numeric(TSS[, + 4]), names = as.character(TSS[, 1])), strand = TSS[, + 5], space = as.character(TSS[, + 2])) > MyPeakList = BED2RangedData(read.table("TSpeakList.bed", sep= "\t",header=FALSE, skip=1)) > data(myPeakList) > data(Annotation) Warning message: In data(Annotation) : data set ‘Annotation’ not found What shall I do to fix this? Thanks. Best. [[alternative HTML version deleted]]
ADD COMMENT
0
Entering edit mode
Julie Zhu ★ 4.3k
@julie-zhu-3596
Last seen 13 months ago
United States
Dingxia, You can use addGeneIDs to add other IDs. Please type ?addGeneIDs in R to see examples. Regarding your question to get sequence, you can pass mart object into the function to do that or forge your own BSgenome data package. Here is the link on how to forge your own BSgenome data package http://www. bioconductor.org/packages/2.10/bioc/vignettes/BSgenome/inst/doc/BSgeno meForge.pdf. If you have questions regarding this, please email the list and the developer. For passing mart object to fetch sequences, please type ?getAllPeakSequence in R to see the documentation. Alternatively, you could also use biomart package. Could you please keep the thread in the list so that others can contribute and/or benefit? Thanks! Best regards, Julie On 8/29/12 10:23 PM, "Dingxia Feng" <fengdxia@iastate.edu> wrote: Hello, julie, Thanks for the help. I can see the histogram and pie chart now. I'll ask you a favor to modify the code a liitle, so I can see the gene public names. Now I can see the Gene WB IDs, but I'd like to have gene public names, because they are more friendly. For example, if I see lin-10 (gene public name), then immediately I know what's this gene for, however, I'll have no idea if I see WBGene00002999 (gene WB ID). Thanks. Best regards. On 8/29/12 10:43 PM, "Dingxia Feng" <fengdxia@iastate.edu> wrote: Hi, Julie, I tried "available.genomes(splitNameParts=FALSE, type=getOption("pkgType"))" , then I found for c.elegans, the available genomes are "BSgenome.Celegans.UCSC.ce2" and "BSgenome.Celegans.UCSC.ce6", not the one I want (ws220=ce10). Does this mean I can't use ChIPpeakAnno to fetch sequences for motif discovery? Thanks. Best. [[alternative HTML version deleted]]
ADD COMMENT

Login before adding your answer.

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