a package with randomization/permutation tests for genomic analyses

please would you let me know, is there a package in R/python/C that has implemented randomization/permutation tests for joint genomic analyses

(an example of joint genomic analyses -- when jointly considering both GENE EXPRESSION and PROTEIN BINDING along the DNA).

The context of my question is the following :

let's consider 1000 UP_REGULATED genes with increased PROTEIN X and with a HISTONE MARK Y :

in order to show that PROTEIN X is related to HISTONE MARK Y for 1000 UP-REGULATED genes, what "controls" would you use for the comparison :

-- 1000 RANDOM GENES (and multiple randomization tests)

-- 1000 UP-REG GENES with NO PROTEIN X, NO HISTONE MARK Y

-- 1000 UP-REG GENES with PROTEIN X, and NO HISTONE MARK Y

-- 1000 UP-REG GENES with NO PROTEIN X, and with HISTONE MARK Y

-- 1000 NOT-UP-REG GENES with NO PROTEIN X, NO HISTONE MARK Y

-- 1000 NOT-UP-REG GENES with PROTEIN X, and NO HISTONE MARK Y

-- 1000 NOT-UP-REG GENES with NO PROTEIN X, and with HISTONE MARK Y

-- anything else ?

any suggestions are very welcome. thanks a lot,

bogdan

ps : 've posted a similar question on BioC website : https://support.bioconductor.org/p/128828/

I would simply look at co-variance across the entire dataset and examine values >0.8 in the first instance rather than select 1000 genes.

With your approach sampling 1000 genes can be criticised for selective sampling and the way to get around this is to perform replicates, with (bootstraps) or without replacement. You could produce e.g. 1000 replicates of 1000 genes and perform co-variance on each replicate to examine Y = X.

Python has a specific permutation/combinations module call itertools, which is different to random resampling and doesn't need replicates

from itertools import combinations
X = [1,2,3]
Y = [1,2,3]
print (list(combinations(iterable, 1000) + X + Y))


The standard way is to sample is,

from random import sample
mygenes = [1, 2, 3, 4, 5]

print(sample(mygenes,3))


Output

[2, 4, 5]


There is nuance and further funcationality ... I cannot remember is "sample" is with or without replacement (its quite a big deal)

• thanks a lot, Mike ! very helpful ! wondering if possible to recommend any package in R has the functions for bootstrapping, or similar functions as in itertools. thanks a lot ! Mar 6 '20 at 5:01
• Hi @bogdan, I don't use R so can't recommend anything.
– M__
Mar 7 '20 at 15:34