caravagnalab / CNAqc

CNAqc - Copy Number Alteration (CNA) Quality Check package
GNU General Public License v3.0
17 stars 8 forks source link

Warning message after changing `min_absolute_karyotype_mutations` #36

Closed mkyriak closed 4 months ago

mkyriak commented 7 months ago

Hello,

Thank you for the tool. Finally, there is a way to start from SNVs, CNAs and purity and perform QC and check for clonality!

I tried to run analyze_peaks command by changing the min_absolute_karyotype_mutations parameter since I want to perform the analysis on targeted sequencing data and not on WGS.

This is an instance of the commands I tried (after running init).

samplePurityTolerance <- auto_tolerance(0.6, 40, fpr=0.1)

sample_analysis <- analyze_peaks(sample_analysis, karyotypes = c("1:0", "1:1", "2:0", "2:1"), purity_error = samplePurityTolerance$epsilon_range, min_absolute_karyotype_mutations=20)

However, when I enter a number that is smaller than the total number of SNVs that I detect in my sample, I get the following error:

Warning messages:
1: In `[<-.data.frame`(`*tmp*`, ri, , value = list(Purity = 0.02,  :
  provided 2 variables to replace 1 variables
2: In `[<-.data.frame`(`*tmp*`, ri, , value = list(Purity = 0.014,  :
  provided 2 variables to replace 1 variables
3: In `[<-.data.frame`(`*tmp*`, ri, , value = list(Purity = 0.009,  :
  provided 2 variables to replace 1 variables

I am not sure what is going on here, could you please help me figure it out?

Thank you in advance!

Maria

caravagn commented 6 months ago

Hi, warnings are not errors. Did it compute anything?

mkyriak commented 6 months ago

Hello @caravagn, I am sorry I missed the notification. No, it didn't compute anything.

My samples are very heterogeneous and I was trying to play around with min_absolute_karyotype_mutations but every time I was entering a number smaller than the total number of SNVs, it was giving me this error. Though I am not sure how this impacts the calculation.

Thank you!

caravagn commented 6 months ago

@AliceAntonello can you raise a stop() error when this happens?

AliceAntonello commented 6 months ago

Sure

caravagn commented 4 months ago

@AliceAntonello if you pushed the fix can u close this?

AliceAntonello commented 4 months ago

I tried to reproduce the problem but I didn't receive any error and the computations went smoothly. Also, a check on the minimum number of mutations per karyotype is already in place.