参考基因组在很多网站都可以下载到
我怎么知道是这个的呢 ,因为这篇文献里面提到
- nohup wget -c ftp://ftp.ensembl.org/pub/release-93/fasta/homo_sapiens/dna/Homo_sapiens.GRCh38.dna.primary_assembly.fa.gz &
-
-
- gunzip Homo_sapiens.GRCh38.dna.primary_assembly.fa.gz
-
-
-
-
- nohup wget -c ftp://ftp.ensembl.org/pub/release-93/gtf/homo_sapiens/Homo_sapiens.GRCh38.93.gtf.gz &
-
- gunzip Homo_sapiens.GRCh38.93.gtf.gz
所以我就在cellranger官网上找到了这个Build Notes for Reference Packages -Software -Single Cell Gene Expression -Official 10x Genomics Support
点进去之后,出现代码
- Mouse reference, mm10 (includes mouse V(D)J genes)
- wget ftp://ftp.ensembl.org/pub/release-93/fasta/mus_musculus/dna/Mus_musculus.GRCm38.dna.primary_assembly.fa.gz
- gunzip Mus_musculus.GRCm38.dna.primary_assembly.fa.gz
-
-
- wget ftp://ftp.ensembl.org/pub/release-93/gtf/mus_musculus/Mus_musculus.GRCm38.93.gtf.gz
- gunzip Mus_musculus.GRCm38.93.gtf.gz
根据代码下载的地址 就可以找到自己要复现的基因组地址了!这里我只需要gtf格式就行啦
Index of /pub/release-93/gtf/mus_musculus (ensembl.org)
手动下载之后
如何处理gtf文件呢?在R语言中读取GTF文件的最好方法 · 大专栏 (dazhuanlan.com)
链接里给了好多方法 哈哈哈
我就用第一个吧 ,开始!
- ####参考基因组id转换gtf文件 https://www.dazhuanlan.com/insafe/topics/975998
- #BiocManager::install("rtracklayer")
- library(rtracklayer)
-
- #https://support.10xgenomics.com/single-cell-gene-expression/software/release-notes/build
- #把Mus_musculus.GRCm38.93.gtf.gz下载下来 为什么下载这个呢?http://ftp.ensembl.org/pub/release-93/gtf/mus_musculus/
- gtf_df=rtracklayer::import('Mus_musculus.GRCm38.93.gtf.gz')
- getwd()
如何给Seurat对象的基因重命名?【基因名转换】2022-07-27 - 简书 (jianshu.com)
- #创建函数 改名字
- RenameGenesSeurat <- function(obj ,
- newnames ) {
- # Replace gene names in different slots of a Seurat object. Run this before integration. Run this before integration.
- # It only changes obj@assays$RNA@counts, @data and @scale.data.
- print("Run this before integration. It only changes obj@assays$RNA@counts, @data and @scale.data.")
- RNA <- obj@assays$RNA
-
- if (nrow(RNA) == length(newnames)) {
- if (length(RNA@counts)) RNA@counts@Dimnames[[1]] <- newnames
- if (length(RNA@