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

isoCounts for different isomiR types #23

Open
bounlu opened this issue Dec 5, 2023 · 2 comments
Open

isoCounts for different isomiR types #23

bounlu opened this issue Dec 5, 2023 · 2 comments

Comments

@bounlu
Copy link
Contributor

bounlu commented Dec 5, 2023

When using isoCounts function with different isomiR types set to TRUE, it seems the counts for that type is added to the original counts matrix in the object:

ids_counts_all = isoCounts(isomirs, all = TRUE)
ids_counts_iso3 = isoCounts(isomirs, iso3 = TRUE)
ids_counts_add = isoCounts(isomirs, add = TRUE)
head(counts(ids_counts_all))
                                              S1                               S2
hsa-let-7a-2-3p                                0                                0
hsa-let-7a-3p                               6994                             9025
hsa-let-7a-5p                             154493                           281501
hsa-let-7b-3p                               1191                             1310
hsa-let-7b-5p                             152069                           400808
hsa-let-7c-3p                                 41                               33
head(counts(ids_counts_iso3))
                                                       S1                               S2
hsa-let-7a-2-3p;iso_3p:c                                0                                0
hsa-let-7a-3p                                        4933                             5519
hsa-let-7a-3p;iso_3p:C                               1325                             1232
hsa-let-7a-3p;iso_3p:c                                736                             2274
hsa-let-7a-5p                                       93384                           135759
hsa-let-7a-5p;iso_3p:t                              41837                            58831
head(counts(ids_counts_add))

                                                      S1                               S2
hsa-let-7a-2-3p                                        0                                0
hsa-let-7a-3p                                       2061                             3506
hsa-let-7a-3p;iso_add:T                             4933                             5519
hsa-let-7a-5p                                     154493                           281501
hsa-let-7b-3p                                        398                              332
hsa-let-7b-3p;iso_add:T                              793                              978

Then, when normalizing the counts with isoNorm function, it uses the same matrix above:

ids_norm_add = isoNorm(ids = ids_counts_add, formula = ~ condition)

head(counts(ids_norm_add, norm = TRUE))

                                                      S1                               S2
hsa-let-7a-2-3p                                -3.640493                        -4.800475
hsa-let-7a-3p                                   8.368986                         7.975341
hsa-let-7a-3p;iso_add:T                         9.627903                         8.629847
hsa-let-7a-5p                                  14.596693                        14.302308
hsa-let-7b-3p                                   5.997943                         4.576736
hsa-let-7b-3p;iso_add:T                         6.991593                         6.133953

This means also the miRNA counts are normalized along with the specific type of isomiRs. Is this expected? I would expect only the subset of the corresponding type of isomiRs will be used in the normalization, i.e. iso_add rows in the above example.

@lpantano
Copy link
Owner

lpantano commented Dec 6, 2023

Hi,

The isoCounts is splitting the total miRNAs into the different subtypes.ids_counts_all should be always the biggest numbers when compared with any other way of quantifying the isomiRs. Sometimes, isomiRs with different events at 3 end can correlate, for instance, I think hsa-let-7a-3p;iso_add:T and hsa-let-7a-3p;iso_3p:C (1325) or hsa-let-7a-3p;iso_3p:c(736) are happening independently, since the addition of the counts is equal than hsa-let-7a-3p in the ids_counts_add matrix.

I think that is working as expecting. The normalization is using the while matrix, since the idea is to work with all the sequences that map the miRNAs, just classifying differently. But you can work with the Matrix to subset only what you need and then jump into DESeq2 for normalization.

Let me know if this helps

@bounlu
Copy link
Contributor Author

bounlu commented Dec 6, 2023

Hi,

Thanks for the clarification. I see your point, although I think it's worth to perform DE with the subset of individual types, which may give rise to a different set of DE events. I thought this was the case in the original function:

isoDE(ids = ids_counts_all, formula = ~ condition, iso3 = TRUE)

It would be great if you could add another parameter to consider a specific type of isomiRs during DE analysis like:

isoDE(ids = ids_counts_all, formula = ~ condition, iso3 = TRUE, subset = TRUE)

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