how to read.bismark result bam.file

285 views
Skip to first unread message

yizha...@gmail.com

unread,
Mar 21, 2017, 11:33:45 PM3/21/17
to methylkit_discussion
I analysed my  WGBS data,first I used the Bismark to map the sequence reads to the reference genome, it generated a result file of .bam file. Then , I used Bismark_extaract to call CpG site ,but some file fail to calling .

now I using ,methylKit to read.bismark (processBismarkAln ) , it seem must be sort the bam to sam by chromosme. It displays ,processBismarkAln can read the bam file.But I fail to use the function.

this is my command about processBismarkAln(location=("LZH371L_1.clean_bismark_bt2_pe_sort.bam"),sample.id="LZH371L",assembly="napar",save.folder=getwd(),save.context=c("CpG","CHG","CHH"),read.context=c("CpG","CHG","CHH"))

Is there any error in my command?

another question : I have got the result file about the "CpG.txt ", how to use the result to do the follow analysed , such as the methylation Stats ,and so on.

> getCoverageStats(HLiver_CpG.txt[[1]],plot=TRUE,both.strands=FALSE,labels=TRUE)
Error in getCoverageStats(HLiver_CpG.txt[[1]], plot = TRUE, both.strands = FALSE,  :
  object 'HLiver_CpG.txt' not found
> getCoverageStats(methylRawList.obj[HLiver_CpG.txt],plot=TRUE,both.strands=FALSE,labels=TRUE)
Error in getCoverageStats(methylRawList.obj[HLiver_CpG.txt], plot = TRUE,  :
  object 'methylRawList.obj' not found
> getCoverageStats(object="HLiver_CpG.txt",plot=TRUE,both.strands=FALSE,labels=TRUE)
Error in (function (classes, fdef, mtable)  :
  unable to find an inherited method for function ‘getCoverageStats’ for signature ‘"character

Altuna Akalin

unread,
Mar 22, 2017, 9:46:44 AM3/22/17
to methylkit_...@googlegroups.com
Please look at the examples and the vignette, you are trying to run your functions on the text files

--
You received this message because you are subscribed to the Google Groups "methylkit_discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to methylkit_discussion+unsub...@googlegroups.com.
To post to this group, send email to methylkit_discussion@googlegroups.com.
Visit this group at https://groups.google.com/group/methylkit_discussion.
For more options, visit https://groups.google.com/d/optout.

张毅

unread,
Mar 24, 2017, 3:27:41 AM3/24/17
to methylkit_...@googlegroups.com
oo,another question, I have got the result about the "bismark_methylation_extractor" CpG. context  and non_CpG.context, if i want to use methylkit to analyse , should i write script to convert the result to methylKit need form? Or there is a function to read the result? I don't understand the function about the "methRead " bisamrk、and bismark...,is that function to analyse the result?

2017-03-22 21:46 GMT+08:00 Altuna Akalin <aak...@gmail.com>:
Please look at the examples and the vignette, you are trying to run your functions on the text files
On Wed, Mar 22, 2017 at 4:33 AM, <yizha...@gmail.com> wrote:
I analysed my  WGBS data,first I used the Bismark to map the sequence reads to the reference genome, it generated a result file of .bam file. Then , I used Bismark_extaract to call CpG site ,but some file fail to calling .

now I using ,methylKit to read.bismark (processBismarkAln ) , it seem must be sort the bam to sam by chromosme. It displays ,processBismarkAln can read the bam file.But I fail to use the function.

this is my command about processBismarkAln(location=("LZH371L_1.clean_bismark_bt2_pe_sort.bam"),sample.id="LZH371L",assembly="napar",save.folder=getwd(),save.context=c("CpG","CHG","CHH"),read.context=c("CpG","CHG","CHH"))

Is there any error in my command?

another question : I have got the result file about the "CpG.txt ", how to use the result to do the follow analysed , such as the methylation Stats ,and so on.

> getCoverageStats(HLiver_CpG.txt[[1]],plot=TRUE,both.strands=FALSE,labels=TRUE)
Error in getCoverageStats(HLiver_CpG.txt[[1]], plot = TRUE, both.strands = FALSE,  :
  object 'HLiver_CpG.txt' not found
> getCoverageStats(methylRawList.obj[HLiver_CpG.txt],plot=TRUE,both.strands=FALSE,labels=TRUE)
Error in getCoverageStats(methylRawList.obj[HLiver_CpG.txt], plot = TRUE,  :
  object 'methylRawList.obj' not found
> getCoverageStats(object="HLiver_CpG.txt",plot=TRUE,both.strands=FALSE,labels=TRUE)
Error in (function (classes, fdef, mtable)  :
  unable to find an inherited method for function ‘getCoverageStats’ for signature ‘"character

--
You received this message because you are subscribed to the Google Groups "methylkit_discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to methylkit_discussion+unsubscrib...@googlegroups.com.

To post to this group, send email to methylkit_discussion@googlegroups.com.
Visit this group at https://groups.google.com/group/methylkit_discussion.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "methylkit_discussion" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/methylkit_discussion/JBW6Hj162f8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to methylkit_discussion+unsub...@googlegroups.com.

Altuna Akalin

unread,
Mar 24, 2017, 3:56:33 AM3/24/17
to methylkit_...@googlegroups.com
You have to read the docs of Bismark it can provide tabular output similar to bedgraph.
Those can be read in by methylKit

On Fri, 24 Mar 2017 at 08:27, 张毅 <yizha...@gmail.com> wrote:
oo,another question, I have got the result about the "bismark_methylation_extractor" CpG. context  and non_CpG.context, if i want to use methylkit to analyse , should i write script to convert the result to methylKit need form? Or there is a function to read the result? I don't understand the function about the "methRead " bisamrk、and bismark...,is that function to analyse the result?

2017-03-22 21:46 GMT+08:00 Altuna Akalin <aak...@gmail.com>:
Please look at the examples and the vignette, you are trying to run your functions on the text files
On Wed, Mar 22, 2017 at 4:33 AM, <yizha...@gmail.com> wrote:
I analysed my  WGBS data,first I used the Bismark to map the sequence reads to the reference genome, it generated a result file of .bam file. Then , I used Bismark_extaract to call CpG site ,but some file fail to calling .

now I using ,methylKit to read.bismark (processBismarkAln ) , it seem must be sort the bam to sam by chromosme. It displays ,processBismarkAln can read the bam file.But I fail to use the function.

this is my command about processBismarkAln(location=("LZH371L_1.clean_bismark_bt2_pe_sort.bam"),sample.id="LZH371L",assembly="napar",save.folder=getwd(),save.context=c("CpG","CHG","CHH"),read.context=c("CpG","CHG","CHH"))

Is there any error in my command?

another question : I have got the result file about the "CpG.txt ", how to use the result to do the follow analysed , such as the methylation Stats ,and so on.

> getCoverageStats(HLiver_CpG.txt[[1]],plot=TRUE,both.strands=FALSE,labels=TRUE)
Error in getCoverageStats(HLiver_CpG.txt[[1]], plot = TRUE, both.strands = FALSE,  :
  object 'HLiver_CpG.txt' not found
> getCoverageStats(methylRawList.obj[HLiver_CpG.txt],plot=TRUE,both.strands=FALSE,labels=TRUE)
Error in getCoverageStats(methylRawList.obj[HLiver_CpG.txt], plot = TRUE,  :
  object 'methylRawList.obj' not found
> getCoverageStats(object="HLiver_CpG.txt",plot=TRUE,both.strands=FALSE,labels=TRUE)
Error in (function (classes, fdef, mtable)  :
  unable to find an inherited method for function ‘getCoverageStats’ for signature ‘"character

--
You received this message because you are subscribed to the Google Groups "methylkit_discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to methylkit_discus...@googlegroups.com.
To post to this group, send email to methylkit_...@googlegroups.com.

--
You received this message because you are subscribed to a topic in the Google Groups "methylkit_discussion" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/methylkit_discussion/JBW6Hj162f8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to methylkit_discus...@googlegroups.com.

To post to this group, send email to methylkit_...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "methylkit_discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to methylkit_discus...@googlegroups.com.
To post to this group, send email to methylkit_...@googlegroups.com.
--
Sent from mobile, excuse the brevity
Reply all
Reply to author
Forward
0 new messages