Split a GRanges object in R
I have created a GRanges object of 250 parsed BAM files. I want to split it into groups of 12, so I can perform a series of functions on each subgroup.
I've tried using the base split function, but it's not working for me on this. It works fine on character vectors.
How do I split an object? GRanges (Bioconductor) is from the GenomicRanges package. I created the object with the ExomeDepth (CRAN) package.
A BAM file (.bam) is the binary version of a SAM file. A SAM file (.sam) is a tab-delimited text file that contains sequence alignment data. These formats are described on the SAM Tools web site: http://samtools.sourceforge.net.
So the object I create has 250 of these BAM files (one per patient sample). I want to split it into groups of 12 BAM Files. I will then compare them against each other as so:
and so on, for all permutations.