Dear all:
I am seeking any efficient way that sorting set of GRanges objects in the list by increasing order. I know sort method from GenomicRangs do this task, but it is very generic. The case that I faced bit of different, and using sort method won't effective to solve my problems. Does anyone knows how to accomplish this task more efficiently? Many thanks
# example
grs.li <- list(gr1, gr2, gr3, gr4, ...)
# desired output that after sorting
out_1 <- list(gr1, gr2, gr3, gr4) # the very beginning, no need to sort out_2 <- list(gr2, gr1, gr3, gr4) # first sorting out_3 <- list(gr3, gr1, gr2, gr4) # second sorting out_4 <- list(gr4, gr1, gr2, gr3) # third sorting
according to the format of desired format that proposed, how can I get this kind of sorting more efficiently. I mean, carrying out this kind of sort operation is also appreciated. Thanks
Best regards:
JS
I see. You just wanted to permute the elements of a list. This has nothing to do with sorting them by increasing order. There is also nothing specific to GRanges objects here.
I admit my post was confused readers and question was not clearly motivated. I will do my best in my further post. Cheers.
JS