Created
June 5, 2023 17:55
-
-
Save mikelove/141d25e64163121bb70a2823dc2ed89e to your computer and use it in GitHub Desktop.
Code for performing ASE analysis with DESeq2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
design <- ~0 + donor + allele | |
dds <- DESeqDataSetFromMatrix(counts, coldata, design) # counts has the two alleles per donor | |
assays(dds)[["weights"]] <- weights # 1 for hets, 1e-6 for homs | |
sizeFactors(dds) <- rep(1, ncol(dds)) | |
dds <- DESeq(dds, test="LRT", reduced=~0 + donor) | |
res <- results(dds) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment