Comments (2)
Follow-up: I have tried the following code to generate them, would you mind checking if this is the desired approach to get the files? Thank you in advance!
if (!require("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install("TxDb.Mmusculus.UCSC.mm10.knownGene")
BiocManager::install("EnsDb.Mmusculus.v79")
library(stringr)
library(magrittr)
library(Matrix)
library(tidyverse)
library(dplyr)
library(GenomeInfoDb)
library(TxDb.Mmusculus.UCSC.mm10.knownGene)
library(EnsDb.Mmusculus.v79)
dir.create("proms_mm10")
gene.coords <- genes(EnsDb.Mmusculus.v79, filter = ~ gene_biotype == "protein_coding")
df <- data.frame(seqnames=seqnames(gene.coords),
starts=start(gene.coords)-1,
ends=end(gene.coords),
names=elementMetadata(gene.coords)$symbol,
scores=".",
strands=strand(gene.coords)
)
dff <- df %>% arrange(seqnames, starts, ends)
dff$seqnames <- paste0("chr", dff$seqnames)
write.table(dff, "proms_mm10/mm10_genes.bed", sep="\t", col.names=F, row.names=F, quote=F)
TSS <- unique(resize(GenomicFeatures::transcripts(TxDb.Hsapiens.UCSC.hg38.knownGene, columns=c("GENEID")),
width = 1, fix = "start"))
TSS <- GenomeInfoDb::keepStandardChromosomes(TSS, pruning.mode = "coarse")
mcols(TSS)$GENEID <-as.numeric(mcols(TSS)$GENEID)
TSS <- TSS[!is.na(TSS$GENEID), ]
mcols(TSS)$GENEID <-as.character(mcols(TSS)$GENEID)
mcols(TSS)$symbol <- AnnotationDbi::mapIds(org.Hs.eg.db,
keys = mcols(TSS)$GENEID,
column = "SYMBOL",
keytype = "ENTREZID",
multiVals = "first")
TSS <- TSS[!is.na(mcols(TSS)$symbol), ]
TSS <- TSS[mcols(TSS)$symbol %in% dff$names, ]
df_TSS <- as.tibble(TSS)
df_TSS <- df_TSS%>% arrange(seqnames, start, end)
df_TSS <- df_TSS[!duplicated(df_TSS$symbol), ]
write.table(df_TSS, "proms_mm10/mm10_tss.bed", sep="\t", col.names=F, row.names=F, quote=F)
gr_promoter <- makeGRangesFromDataFrame(df_TSS, keep.extra.columns=T)
df_promoter <- as.tibble(promoters(gr_promoter, upstream = 3000, downstream = 0))
df_promoter <- df_promoter[, c("seqnames", "start", "end", "symbol", "width", "strand")]
df_promoter$width <- "."
write.table(df_promoter, "proms_mm10/mm10_promoter.bed", sep="\t", col.names=F, row.names=F, quote=F)
from liger.
Hi, the link to the bed files of the mouse species we used is provided in our tutorial here. The link to these files is here.
from liger.
Related Issues (20)
- "shared factor neighborhood" not used anymore as described in the paper? HOT 3
- log transform data first? HOT 1
- Another request for help regarding SCTransform HOT 1
- Generate gene and promoter bed files
- Problems with scaleNotCenter() HOT 2
- Prepare for upcoming Seurat v5 release HOT 1
- Bug in Seurat's wrapper function HOT 1
- cran package archived HOT 6
- NaNs during `SelectGenes()` HOT 1
- Error on makeFeatureMatrix HOT 1
- How to improving similarity between snRNA-seq and snATAC-seq nuclei, by tuning parameters like 'k', 'lambda'? HOT 4
- Dataset specificity plot
- Issue with loading old liger object via convertOldLiger function HOT 3
- Error in `signal_stage()` HOT 4
- invalid type "list" in R_matrix_as_sparse error HOT 3
- no slot name "defaultCluster" for this object of class "liger" HOT 1
- Query on building shared factor neighborhood graph HOT 2
- Error when performing the Wilcoxon test on the peak counts HOT 1
- Error in ImputeKNN
- How can I determine the similarity scores between clusters using Liger's UINMF? HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from liger.