It appears that you are just asking a question that has nothing to do with Bioconductor tools (just because you are using gene expression data, doesn't mean it's a Bioconductor question). It's also not clear what you want? A list
is a specific thing in R, and a gene list might mean a list
of genes, or maybe you mean something entirely different. But anyway.
## fake data
> rn <- rnorm(1000)
> quantile(rn, seq(0,1,0.2))
0% 20% 40% 60% 80% 100%
-2.6974030 -0.8147699 -0.2391583 0.2748159 0.9112004 3.2960733
> cuts <- cut(rn, quantile(rn, seq(0,1,0.2)), include.lowest = TRUE)
> levels(cuts)
[1] "[-2.7,-0.815]" "(-0.815,-0.239]" "(-0.239,0.275]" "(0.275,0.911]"
[5] "(0.911,3.3]"
> lst <- split(rn, cuts)
> sapply(lst, head)
[-2.7,-0.815] (-0.815,-0.239] (-0.239,0.275] (0.275,0.911] (0.911,3.3]
[1,] -1.8774472 -0.5442199 0.15592221 0.5735599 1.961777
[2,] -0.9500052 -0.4153239 -0.23012671 0.5487853 1.838525
[3,] -1.8244960 -0.5660583 0.09275705 0.8824427 1.557622
[4,] -1.1705903 -0.6712830 0.21497970 0.5910672 2.210673
[5,] -1.1879555 -0.4075969 -0.10534529 0.7041176 1.151611
[6,] -0.9184985 -0.4060458 0.11778675 0.4087296 1.122461
One of those things might be what you are after.
thank you, its good and work. is it possible the output list be with the gene_id? so it shows that each values depend of which gene_id!
The
split
function works on adata.frame
as well as a vector. Please see?split
Thank you, i would so grateful if you help more in this matter.