modkit icon indicating copy to clipboard operation
modkit copied to clipboard

What is exactly mod_qual?

Open OceaneMion opened this issue 1 year ago • 3 comments

Hi I would like to know the difference between mod_qual and fraction modified ?

What do you mean exactly by mod_qual, I know that fraction modified is basically the number of modified base / total number of cpg modified or not. But what does mod_qual represent is it the quality of prediction ? I don't really understand the difference.

Thanks in avance for your help

OceaneMion avatar May 12 '24 12:05 OceaneMion

Hello @OceaneMion,

Sorry for the slow reply.

Are you referring to the table from modkit extract? As stated in the docs mod_qual is "probability of the base modification in the next column".

ArtRand avatar May 20 '24 15:05 ArtRand

Yes thank you but the value obtain in modkit pileup for the methylation is really different, is it because it is averaging the methylation of each reads at each genomic position ? So that for example if I have reads that overlap at a specific genomic position it will do the mean of methylation for this position right ?

OceaneMion avatar May 21 '24 14:05 OceaneMion

Hello @OceaneMion,

The ouput of pileup is a count of how many reads called each modification (or canonical) at a given genome position. You get a "percent modification" from the pileup meaning %-of reads calling the modification, so if you have 10 reads and 8 call 5mC, you'll see 80%. This is different than mod_qual which is a metric on each specific read at a given position. So for example, take a single read with a mod_qual of 0.95 for mod_code m this means that at that position in the read, the base modification model assigned a 0.95 probability of 5mC. If this value is above the pass threshold (details here) this individual read call will tabulated in the N_mod count in the pileup table.

ArtRand avatar May 21 '24 17:05 ArtRand