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

Unite function output is methylBase object with 1 row #278

Open
fafaris39 opened this issue Mar 29, 2023 · 1 comment
Open

Unite function output is methylBase object with 1 row #278

fafaris39 opened this issue Mar 29, 2023 · 1 comment

Comments

@fafaris39
Copy link

fafaris39 commented Mar 29, 2023

Hello !
I am using unite() function to merge samples but it produced a methylBase object with 1 row, i don't understand where is the problem?!

`
library("methylKit")

file.list = list("/test1-TechRep_1-BioRep_2018.deduplicated.CX_report.txt",
"/test2-TechRep_1-BioRep_2019.deduplicated.CX_report.txt",
"/ctrl1-TechRep_1-BioRep_2018.deduplicated.CX_report.txt",
"/ctrl2-TechRep_1-BioRep_2019.deduplicated.CX_report.txt")

readingReports=methRead(file.list,
sample.id=list("test1","test2","ctrl1","ctrl2"),
assembly="bismark",
treatment=c(1,1,0,0),
context="CpG",
mincov = 10,
pipeline= "bismarkCytosineReport",
dbtype = "tabix",
dbdir = "methylDB"
)

meth=methylKit::unite(readingReports, destrand=FALSE )
head(meth)`

The head of each sample:
`
head ctrl2-TechRep_1-BioRep_2019.deduplicated.CX_report.txt
NC_041792.1 1 + 0 0 CHH CTA
NC_041792.1 5 + 0 0 CHH CCC
NC_041792.1 6 + 0 0 CHH CCT
NC_041792.1 7 + 0 0 CHH CTA
NC_041792.1 12 + 0 0 CHH CCC

head ctrl1-TechRep_1-BioRep_2018.deduplicated.CX_report.txt
NC_041792.1 1 + 0 0 CHH CTA
NC_041792.1 5 + 0 0 CHH CCC
NC_041792.1 6 + 0 0 CHH CCT
NC_041792.1 7 + 0 0 CHH CTA
NC_041792.1 12 + 0 0 CHH CCC

head test1-TechRep_1-BioRep_2018.deduplicated.CX_report.txt
NC_041792.1 1 + 0 0 CHH CTA
NC_041792.1 5 + 0 0 CHH CCC
NC_041792.1 6 + 0 0 CHH CCT
NC_041792.1 7 + 0 0 CHH CTA
NC_041792.1 12 + 0 0 CHH CCC

head test2-TechRep_1-BioRep_2019.deduplicated.CX_report.txt
NC_041792.1 1 + 0 0 CHH CTA
NC_041792.1 5 + 0 0 CHH CCC
NC_041792.1 6 + 0 0 CHH CCT
NC_041792.1 7 + 0 0 CHH CTA
NC_041792.1 12 + 0 0 CHH CCC
`
this is what i got in meth object

`
head(meth)
methylBase object with 1 rows
chr start end strand coverage1 numCs1 numTs1 coverage2 numCs2 numTs2 coverage3 numCs3 numTs3 coverage4 numCs4 numTs4
1 NC_041792.1 16095130 16095130 + 14 0 14 10 0 10 17 2 15 13 0 13

sample.ids: test1 test2 ctrl1 ctrl2
destranded FALSE
assembly: bismark
context: CpG
treament: 1 1 0 0
resolution: base
`

@alexg9010
Copy link
Collaborator

Hi,

A simple reason for the low number of retained CpGs after merging could be that your coverage is too low.
Have you checked how many CpGs are retained in each sample? It is possible that the coverage threshold (mincov) of 10 is too high or that one of your samples has low coverage.

Best,
Alex

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants