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

DMR without pileup #183

Open
ArnavBharti opened this issue May 16, 2024 · 4 comments
Open

DMR without pileup #183

ArnavBharti opened this issue May 16, 2024 · 4 comments
Labels
question Further information is requested

Comments

@ArnavBharti
Copy link

Hey, I have (summary) BED files and I wanted to know if I necessarily need the bed file from pileup to run dmr. The samples I have is not compatible with modkit pileup.

@Proy321
Copy link

Proy321 commented May 17, 2024

Hello @ArtRand @marcus1487
We have R9 data, so we ran some other tool to find out 6mA methylation events in the data, and we have generated a bed file for the same, so can that be used to find out differentially methylated regions by using modkit dmr. It would be nice if you can provide some insights on the same, as that would be extremely helpful and much appreciated.

Thanks

@ArtRand
Copy link
Contributor

ArtRand commented May 20, 2024

@ArnavBharti,

What makes your modBAM incompatible with modkit pileup?

@Proy321 and @ArnavBharti,

If you format your BED file so that the columns are the same as the bedMethyl table used by pileup and index it with tabix, modkit dmr pair should be able to parse it. The following fields are used in the parser:

  • chrom
  • start
  • end
  • mod code (name)
  • strand
  • count methylated
  • valid coverage
  • count canonical

Everything up to count canonical (column 13) must be the same type/schema.

@ArtRand ArtRand added the question Further information is requested label May 21, 2024
@PRIYANKA-22091995
Copy link

Hello @ArtRand
The bed file which is generated has the following headers:

  1. chrom
  2. chromStart
  3. chromEnd
  4. context
  5. % methylated
  6. strand
  7. depth of coverage

Will it be possible to run modkit dmr with this?

Thanks

@ArtRand
Copy link
Contributor

ArtRand commented May 21, 2024

@PRIYANKA-22091995

You'll have to add or compute the missing values and remove the unnecessary ones. For example, you should know the modification code (or check the SAM spec).

  • Depth of coverage can be used for valid coverage
  • Count methylated can be calculated as count_methylated = int(floor(%methylated * depth of coverage)), then count_canonical = depth_of_coverage - count_methylated.

Just make sure it's in the same order as the output from pileup.

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

No branches or pull requests

4 participants