Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting context="CpG" in methRead of bismark cytosine report failed to retain only CpG positions #136

Closed
pinetree1 opened this issue Oct 31, 2018 · 4 comments

Comments

@pinetree1
Copy link

Here is a test cytosine report from Bismark:
cat test1.CX_report.txt (tab-separated)
chr1 17365 + 0 0 CHH CTA
chr1 17368 + 0 0 CHH CCT
chr1 17369 + 0 0 CHH CTA
chr1 17372 + 0 0 CHG CAG
chr1 17374 - 1 11 CHG CTG
chr1 17376 - 0 13 CHH CTC
chr1 17377 - 0 13 CHH CCT
chr1 17378 + 0 0 CG CGA
chr1 17379 - 12 2 CG CGC
chr1 17381 + 0 0 CHH CAT

This was the command I used to read the data:
file="test1.CX_report.txt"
methRaw <- methRead(list(file), sample.id=list("test"),
assembly="hg19",
header = FALSE, context="CpG",
pipeline="bismarkCytosineReport",
treatment=c(0),
mincov =1
)

This was supposed to keep only "chr1 17379 - 12 2 CG CGC", but I got all positions with min coverage of 1.

methRaw
methylRawList object with 1 methylRaw objects

methylRaw object with 4 rows

chr start end strand coverage numCs numTs
1 chr1 17374 17374 - 12 1 11
2 chr1 17376 17376 - 13 0 13
3 chr1 17377 17377 - 13 0 13
4 chr1 17379 17379 - 14 12 2

sample.id: test
assembly: hg19
context: CpG
resolution: base

treatment: 0

I tried changing CpG to CG or CHH in context=, results are the same. I am wondering whether there is something wrong with the methRead method, when reading bismark cytosine report?

packageVersion("methylKit")
[1] ‘1.7.5’

Thanks.

@al2na
Copy link
Owner

al2na commented Oct 31, 2018 via email

@alexg9010
Copy link
Collaborator

should be quite easy to add a context filter to .procBismarkCoverage and .procBismarkCytosineReport .

@al2na
Copy link
Owner

al2na commented Dec 8, 2018 via email

@alexg9010
Copy link
Collaborator

we will close this issue for now, as fread does not have a filtering function at this point.
this relates to the feature request: Rdatatable/data.table#583

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

No branches or pull requests

3 participants