Does the following seem like a good method to assign a p-value for segment DUPLICATION or DELETION, to each segment in the dnacopy.seg file?
1. Use PureCN's readCurationFile to read the .rds file into object RDS, then retrieve the log ratios of the marks in RDS$input$log.ratio
2. Compute the adjusted copy ratio of each mark by taking 2^log.ratio, then applying the purity/ploidy adjustment equation to the result, using purity and ploidy from the curation file.
3. Use a Wilcoxon 1-sample test to test whether the resulting copy ratios are significantly greater, or less, than 1.
Sorry, my edit to my question crossed with your response, can you re-read my question and adjust your response?
This works probably well for larger segments, but you assume a constant variance and ignore the fold-change. Using something like voom will incorporate the variance observed in the pool of normals and the variance due to coverage. It might be ok, the log-ratios are cleaned of most noise we can get rid off, but I'm not sure this rank based approach will work in short segments where the p-value would be most useful. A pure tumor vs normal coverage p-value also does not account for purity and ploidy.
Since this is not really a PureCN question, look around, you might also find something in the germline literature or ask in a broader forum like Biostars.