modkit icon indicating copy to clipboard operation
modkit copied to clipboard

Can the --ignore parameter in pileup/adjust be set to two values?

Open Yang990-sys opened this issue 6 months ago • 1 comments

With the release of the latest model, inosine, m6A, and 2Ome can be called using the same model. At this point, it is difficult to use modkit dmr for one of the modifications. Can we use --ignore A --ignore 17596 or --ignore A, 17596 to extract the results of 2OmeA?

Yang990-sys avatar Jun 06 '25 14:06 Yang990-sys

Hello @Yang990-sys,

Currently you cannot --ignore multiple modifications at once, but you can chain the commands to achieve what you want.


$ modkit adjust-mods ${inbam} stdout --ignore a \
  | modkit adjust-mods stdin ${outbam} --ignore 17596

If you run this through modkit modbam check-tags you should see something like this:

> no errors                                                          
> num PASS records: 50611 (100.00%)
> num records: 50611
> valid record tag headers:
+------------+-------+
| tag_header | count |
+------------+-------+
| A+69426.   | 50576 |
+------------+-------+


> modified bases:
+--------+--------------+----------+------+
| strand | primary_base | mod_code | mode |
+--------+--------------+----------+------+
| +      | A            | 69426    | .    |
+--------+--------------+----------+------+

If you put this BAM through Modkit DMR or similar analysis, you should be able to find the positions that are different with respect to 2'OMe adenine. While this should work, I think a better way to find positions or transcripts that are differentially modified with respect to a single modification of many is to use modkit dmr on the original modBAM then run a specific test on the output. For example, look for changes in 2'OMe fractions that are statistically significant. I imagine these would have high scores, but to filter them from the positions that are different with respect to 2'OMe A. I think there is a use case here you want to run a suite of tests on the DMR output for one modification of many. I'll give this feature some thought and let you know when I have something.

ArtRand avatar Jun 10 '25 15:06 ArtRand

Hi @ArtRand ,

Can you please provide a feature to ignore multiple modifications simultaneously? Chaining the commands for N number of modifications slows down the process by N times.

SuhasSrinivasan avatar Dec 13 '25 19:12 SuhasSrinivasan

@SuhasSrinivasan,

Yes I can try to get this into the next release. One thing to keep in mind, however, is that --ignore is not really the espoused method to discard base modification calls, as evident by the fact that v0.6.0 doesn't allow --ignore in pileup. Could you explain your use case and maybe I can recommend a better solution?

ArtRand avatar Dec 16 '25 00:12 ArtRand