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

Select desidered karyotypses for phasing mutations #35

Closed
nicola-calonaci opened this issue Apr 5, 2024 · 4 comments
Closed

Select desidered karyotypses for phasing mutations #35

nicola-calonaci opened this issue Apr 5, 2024 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@nicola-calonaci
Copy link
Collaborator

At the moment the only option for selecting karyotypes in the phasing procedure is a cut-off on the minimum number of mutations. It would be useful for the user to additionally be able to select desired karyotypes.

For instance, I want to focus on diploid homozygous (karyotype "2:0") segments and find the multiplicity of mutations thereof.

@nicola-calonaci nicola-calonaci added the enhancement New feature or request label Apr 5, 2024
@nicola-calonaci nicola-calonaci self-assigned this Apr 5, 2024
@caravagn
Copy link
Collaborator

caravagn commented Apr 5, 2024

Subset by karyotype first and then compute is not a good option? It's a single function call.

@nicola-calonaci
Copy link
Collaborator Author

True but function "subset_by_segment_karyotype" removes the "peaks_analysis" from the CNAqc object. Is that intentional?

@nicola-calonaci
Copy link
Collaborator Author

This is my proposal for a very simple solution:

advanced_phasing = function(x, cutoff_n = 50, karyotypes = NULL)
{
  karyotypes_cutoff = x$n_karyotype[x$n_karyotype >= cutoff_n] %>% names()

  if(is.null(karyotypes)) {
    karyotypes = karyotypes_cutoff
  } else{
    karyotypes = intersect(karyotypes, karyotypes_cutoff)
    }

basically it intersects the selected karyotypes with the ones that pass the cutoff on mutation number.

@caravagn
Copy link
Collaborator

I am sorry but I am not in favour of this because there is already a very neat way of getting the same and this means that this is unnecessary, and therefore unrequired.

x %>% 
   subset_by_segment_karyotype("2:0") %>% 
   advanced_phasing()

Instead, dropping analyses results is done for the same logic: avoiding that we have to manage complicated scenarios.

Example:

  • you have karyotype "2:1" and "1:0", you do peak analysis
  • you subset to"2:1"
  • your peak analysis contains results (in plots, tables etc) for "1:0" data that is no longer inside the object

How do you manage plots? And getters? etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants