在Ensembl数据库中下载拟南芥参考基因
TAIR是研究拟南芥的首选数据库,其他数据库中拟南芥的基因组数据都是直接来自TAIR
这里选择Ensembl的原因是,感觉更加方便
植物参考基因组:http://plants.ensembl.org/index.html
- 一些常用的物种列在首页 拟南芥,水稻,玉米等
- 如果想要得物种不在首页可以点击:View full list of all Ensembl Plants species ,可以得到所有物种的列表;
动物参考基因组:http://asia.ensembl.org/index.html
植物参考基因组:http://plants.ensembl.org/index.html
其他真菌细菌等参考基因组:http://ensemblgenomes.org/
点击进入拟南芥参考基因组介绍页面
点击Download DNA sequence (FASTA)
-
一般下载*toplevel.fa.gz文件,为参考基因组完整文件
- 其他sm和rm的意义可看README文件,介绍如下,为repeat区不同mask方法:
'dna_rm'- masked genomic DNA. Interspersed repeatsandlow complexity regions are detectedwiththe RepeatMasker toolandmasked by replacing repeatswith'N's.
'dna_sm'- soft-masked genomic DNA. All repeatsandlow complexity regions have been replaced with lowercased versionsoftheir nucleic base
基因注释gtf文件的下载
在上一步的基础上继续点击三次转到高层目录:可以看到gff和gtf目录,点击进入到自己想要的物种下载对应的文件即可:
注意:fasta格式文件版本与gtf格式文件的版本必须一致。
用Xftp将文件上传到服务器
查看gtf注释文件
GTF文件如下所示:
$less -S Arabidopsis_thaliana.TAIR10.45.gtf.gz
当前所广泛使用的GTF格式为第二版(GTF2),它主要是用来描述基因的注释。GTF格式有两个硬性标准:
- 根据所使用的软件的不同,
feature types
是必须注明的。 - 第9列必须以
gene_id
以及transcript_id
开头
GTF文件的第9列同GFF文件不同,虽然同样是标签与值配对的情况,但标签与值之间以空格分开,且每个特征之后都要有分号;(包括最后一个特征):
gene_id "geneA";transcript_id "geneA.1";database_id "0012";modified_by "Damian";duplicates 0;
解压文件
gzip -d Arabidopsis_thaliana.TAIR10.45.gtf.gz
gzip -d Arabidopsis_thaliana.TAIR10.dna.toplevel.fa.gz
========================================================================
以下内容是为了构建10X单细胞转录组参考文件,普通bulk测序可以不用管下面内容
cellranger 检查并生成指定用于10X pipiline的gtf文件
$cellranger mkgtf Arabidopsis_thaliana.TAIR10.45.gtf Arabidopsis_thaliana.TAIR10.45_new.gtf
/opt/biosoft/cellranger-expression/cellranger-cs/3.1.0/bin
cellranger mkgtf (3.1.0)
Copyright (c) 2019 10x Genomics, Inc. All rights reserved.
-------------------------------------------------------------------------------
Writing new genes GTF file (may take 10 minutes for a 1GB input GTF file)...
...done
为了后面分析流程的需要,在线粒体基因上加上"Mt"标记
可以自己写一个Perl或者Python的小脚本
python add_mt_marker.py Arabidopsis_thaliana.TAIR10.45_new.gtf Arabidopsis_thaliana.TAIR10.45_new2.gtf
mv Arabidopsis_thaliana.TAIR10.45_new2.gtf Arabidopsis_thaliana.TAIR10.45.gtf
less -S Arabidopsis_thaliana.TAIR10.45.gtf
cellranger 检查并生成指定用于10X pipiline的reference
$cellranger mkref --genome TAIR10 --fasta Arabidopsis_thaliana.TAIR10.dna.toplevel.fa --genes Arabidopsis_thaliana.TAIR10.45.gtf
/opt/biosoft/cellranger-expression/cellranger-cs/3.1.0/bin
cellranger mkref (3.1.0)
Copyright (c) 2019 10x Genomics, Inc. All rights reserved.
-------------------------------------------------------------------------------
Creating new reference folder at /share/nas1/Data/Users/luohb/Data/Reference/TAIR/TAIR10
...done
Writing genome FASTA file into reference folder...
...done
Computing hash of genome FASTA file...
...done
Indexing genome FASTA file...
...done
Writing genes GTF file into reference folder...
...done
Computing hash of genes GTF file...
...done
Writing genes index file into reference folder (may take over 10 minutes for a 3Gb genome)...
...done
Writing genome metadata JSON file into reference folder...
...done
Generating STAR genome index (may take over 8 core hours for a 3Gb genome)...
Jan 15 17:59:49 ..... Started STAR run
Jan 15 17:59:49 ... Starting to generate Genome files
Jan 15 17:59:55 ... starting to sort Suffix Array. This may take a long time...
Jan 15 17:59:55 ... sorting Suffix Array chunks and saving them to disk...
Jan 15 18:04:32 ... loading chunks from disk, packing SA...
Jan 15 18:04:50 ... Finished generating suffix array
Jan 15 18:04:50 ... Generating Suffix Array index
Jan 15 18:05:08 ... Completed Suffix Array index
Jan 15 18:05:08 ..... Processing annotations GTF
Jan 15 18:05:16 ..... Inserting junctions into the genome indices
Jan 15 18:09:14 ... writing Genome to disk ...
Jan 15 18:09:15 ... writing Suffix Array to disk ...
Jan 15 18:09:16 ... writing SAindex to disk
Jan 15 18:09:16 ..... Finished successfully
...done.
>>> Reference successfully created! <<<
You can now specify this reference on the command line:
cellranger --transcriptome=/share/nas1/Data/Users/luohb/Data/Reference/TAIR/TAIR10 ...
查看一下新生成的文件夹的内容:
$cd TAIR10/
$ls
fasta genes pickle reference.json star
保存原始的压缩文件,和说明文档。说明文件来源
$cd ..
$cd source/
$vi README.txt
$ls
Arabidopsis_thaliana.TAIR10.45.gtf.gz Arabidopsis_thaliana.TAIR10.dna.toplevel.fa.gz README.txt
搞掂收工~