modkit icon indicating copy to clipboard operation
modkit copied to clipboard

DMR without pileup

Open ArnavBharti opened this issue 1 year ago • 4 comments

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.

ArnavBharti avatar May 16 '24 21:05 ArnavBharti

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

Proy321 avatar May 17 '24 07:05 Proy321

@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 avatar May 20 '24 21:05 ArtRand

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

PRIYANKA-22091995 avatar May 21 '24 07:05 PRIYANKA-22091995

@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.

ArtRand avatar May 21 '24 16:05 ArtRand