cgplab / pames Goto Github PK
View Code? Open in Web Editor NEWTool to estimate purity of tumor samples exploiting DNA Methylation data
License: GNU General Public License v3.0
Tool to estimate purity of tumor samples exploiting DNA Methylation data
License: GNU General Public License v3.0
Several functions are not reported or not sufficiently documented
Thanks for writing this piece of software! I just used it and it's great. I built support for the EPIC platform in the select_informative_sites() function and was wondering if you'd be interested in a pull request?
It was built from the IlluminaHumanMethylationEPICanno.ilm10b2.hg19 annotations.
I noticed that PAMES sites in PAMESdata collection (450k sites) are indicated as indexes rather than probe names. That might cause troubles with compute_purity()
if those sites are used with a Beta table that is not exactly as expected by the function (indexes matching the proper probe).
Ex. if a Beta table is smaller or larger, indexes will use the wrong sites. I hope this makes sense to you, what scared me the most is that when this problem happens PAMES returns no error at all, but of course, the purity estimation at that point is wrong (using wrong sites).
Please let me know if I can help by any means, this is not urgent but I think you might want to address that in the future.
I got the following error upon installation:
Error in parse(outFile) :
/tmp/Rtmp8db2Ye/devtools35d7e1dc713/cgplab-PAMES-ad65cdc/R/compute_AUC.R:35:1: unexpected '>'
34: return(auc)
35: >
^
ERROR: unable to collate and parse R files for package ‘PAMES’
When running PAMES::get_purity(beta) it seems to require normal samples beta values and the AUC-file. Is it possible to run it using only beta-values from the tumor sample?
Best,
Hi, is there a vignette for the tool? I wonder how to convert idat-files and use it as input for the purity estimation.
Best,
With the example data, error occurred as follows "Error: assert_that: length of assertion is not 1" when I run compute_purity(bs_tumor_toy_matrix, bs_toy_regions).
And the bs_toy_regions give a result of
$hyper
integer(0)
$hypo
integer(0)
Please help me, thanks a lot.
When trying to run the sample data (to figure out how to run this with eRRBS data), I come accross this issue:
reduced <- reduce_to_islands(bs_control_toy_data, bs_toy_sites)
[2018-01-12 17:35:16] Reducing beta values...
Error in cpg_sites_matrix[x, , drop = F] : subscript out of bounds
head(bs_control_toy_data)
control_1 control_2 control_3 control_4 control_5 control_6
chr1_10470 NA NA NA NA NA NA
chr1_10472 NA NA NA NA NA NA
chr1_10485 NA NA NA NA NA NA
chr1_10497 0.85 0.90 0.73 0.71 0.77 0.81
chr1_10525 0.91 0.92 0.95 0.93 0.95 0.84
head(bs_toy_sites)
chr pos
1 chr1 10470
2 chr1 10472
3 chr1 10485
4 chr1 10497
5 chr1 10525
When computing the reduced version of Beta tables for target region set (like in the BS case), if a specific region has no mapping probes at all in the original beta table, that region is discarded from the output. This might happen if a targetted assay does not cover at all some CGIs. In practice, this seems to cause reduce_to_regions()
to generate outputs of different length, and this becomes a problem since compute_purity()
uses indexes to retrieve the informative CGI.
## part of compute_purity() function which can give some troubles:
beta_values <- rbind(tumor_table[list_of_sites[["hyper"]],
], max_purity - tumor_table[list_of_sites[["hypo"]],
])
The workaround can be simple, like adding missing rows as NA
, but we might want to fix this.
Alternatively, calling regions by CGI_id instead of index could be a solution as well.
Here a reproducible example. In case this makes sense to you let me know if I can help.
library(PAMES)
library(PAMESdata)
cgi_list = cpg_islands
sites = PAMES::bs_toy_sites
mat = PAMES::bs_toy_matrix
informative_cgi = PAMESdata::BRCA_islands
cgi_reduced = reduce_to_regions(beta_table = mat, cpg_sites = sites, cpg_regions = cgi_list, min_CpGs = 3)
dim(cgi_reduced)
compute_purity(cgi_reduced, informative_cgi)
##[2019-05-21 10:04:50] # Compute purity #
## Error in tumor_table[list_of_sites[["hyper"]], ] :
## subscript out of bounds
##
Best
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.