This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Use bismark files to run methylKit

Can anyone provide me with some bam or sam bismark files to run methylKit on it?

I want to execute processBismarkAln()

bismark r

1 answer

There are test datasets in the methylKit package : https://www.rdocumentation.org/packages/methylKit/versions/0.99.2/topics/processBismarkAln

my.file=system.file("extdata", "test.fastq_bismark.sorted.min.sam", 
                              package = "methylKit")
obj=processBismarkAln(my.file,"test",assembly="hg18",save.folder=NULL,
                 save.context="CpG",read.context="CpG")

Thanks. How can I use it?

I do not understand your question, I provided the code to test processBismarkAln with a sam test file

but where are these files?

In methylKit package, in the extdata folder as I provided an example of sam file with my code :

my.file=system.file("extdata", "test.fastq_bismark.sorted.min.sam", 
                              package = "methylKit")

Complete list of all test datasets available for this package can be shown with :

list.files(system.file("extdata",package="methylKit"))
 [1] "bismark_coverage_CpG.bed"                 "bismark_cytosineReport.txt"              
 [3] "control1.myCpG.txt"                       "control2.myCpG.txt"                      
 [5] "cpgi.hg18.bed.txt"                        "ctrl.bismark_paired_end.sorted.bam"      
 [7] "ctrl.bismark_paired_end.sorted.wh.sam"    "ctrl1.txt.bgz"                           
 [9] "ctrl2.txt.bgz"                            "generic1.CpG.txt"                        
[11] "refseq.hg18.bed.txt"                      "test.bismark_single_end.sorted.bam"      
[13] "test.bismark_single_end.sorted.wh.sam"    "test.fastq_bismark.sorted.min.sam"       
[15] "test.fastq_bismark.unsorted_chr.min.sam"  "test.fastq_bismark.unsorted.min.sam"     
[17] "test1_test2_ctrl1_ctrl2_diffMeth.txt.bgz" "test1_test2_ctrl1_ctrl2.txt.bgz"         
[19] "test1.myCpG.txt"                          "test1.txt.bgz"                           
[21] "test2.myCpG.txt"                          "test2.txt.bgz"            

ok. I tried and get this error: enter image description here

This is not an error message

ok, but my question is when I try to run my own file, it gives me an error:

Trying to process:
test.sorted.bam
Using htslib.
Error: Unexpected cigar: M

Why I get this error?

Log in to answer this question.