空间转录组学习——数据探索
本篇博客记录空间转录组数据的初步学习,使用数据为华大stereopy(https://stereopy.readthedocs.io/en/latest/index.html)中的Example数据,通过华大云盘下载。
数据概览
在华大云盘下载好数据,数据如下所示:
1、genes.gtf
gtf: gene transfer format,主要用于对基因的注释,对染色体上的基因进行标注。
通常包括9列内容(用Tab键隔开):
属性 | 解释 |
---|---|
seqname | 序列名称,格式为染色体ID或者contig ID |
source | 注释来源,通常是预测软件名或公共数据库 |
type | 注释信息的类型,如gene,transcript,exon,CDS,UTR,start_codon,stop_codon,Selenocysteine |
start | 开始位点 |
end | 结束位点 |
score | 表示对该类型存在性及其坐标的可信度,非必须,可用.代替 |
strand | 链的正向与负向,用±号表示 |
frame | 密码子偏移,0、1、2 |
attributes | 必须有:gene_id value: 表示转录本在基因组上的基因座的唯一的ID。用空格分开,如果值为空,则表示没有对应的基因。预测的转录本的唯一ID。transcript_id value:transcript_id与value值用空格分开,空表示没有转录本。 |
genes.gtf文件中,数据如下所示。
#!genome-build GRCm38.p6
#!genome-version GRCm38
#!genome-date 2012-01
#!genome-build-accession NCBI:GCA_000001635.8
#!genebuild-last-updated 2018-03
1 ensembl_havana gene 3205901 3671498 . - . gene_id "ENSMUSG00000051951"; gene_version "5"; gene_name "Xkr4"; gene_source "ensembl_havana"; gene_biotype "protein_coding"
1 havana transcript 3205901 3216344 . - . gene_id "ENSMUSG00000051951"; gene_version "5"; transcript_id "ENSMUST00000162897"; transcript_version "1"; gene_name "Xkr4"; gene_source "ensembl_havana"; gene_biotype "protein_coding"; transcript_name "Xkr4-203"; transcript_source "havana"; transcript_biotype "processed_transcript"; transcript_support_level "1"
1 havana exon 3213609 3216344 . - . gene_id "ENSMUSG00000051951"; gene_version "5"; transcript_id "ENSMUST00000162897"; transcript_version "1"; exon_number "1"; gene_name "Xkr4"; gene_source "ensembl_havana"; gene_biotype "protein_coding"; transcript_name "Xkr4-203"; transcript_source "havana"; transcript_biotype "processed_transcript"; exon_id "ENSMUSE00000858910"; exon_version "1"; transcript_support_level "1"
2、SS200000135TL_D1.cellbin.gem
GEM文件包括GeneID、x、y、count
x, y表示基因在组织结构中的空间位置,count表示基因表达数量。
SS200000135TL_D1.cellbin.gem文件部分数据如下所示:
#FileFormat=GEMv0.1
#SortedBy=None
#BinSize=1
#STOmicsChip=SS200000135TL_D1
#OffsetX=0
#OffsetY=0
geneID x y MIDCount ExonCount CellID
Gm42418 7566 19775 1 1 56203
Camk1d 7566 19777 1 0 56203
Gabra1 7567 19777 1 1 56203
Cmss1 7469 19720 1 0 56202
Purb 7469 19720 1 1 56202
Ptgds 7470 19720 1 1 56202
3、SS200000135TL_D1.tissue.gef
文件组织详见 https://www.processon.com/view/link/610cc49c7d9c087bbd1ab7ab#map
数据预处理
Quality control
n_genes_by_counts: the number of genes expressed in the count matrix
total_counts: the total counts per cell
pct_counts_mt: the percentage of counts in mitochondrial genes
小提琴图(qc distribution)
绘制连续型数据的方法,可以认为是箱形图和和密度图的结合体。
1、中位数:小提琴图上的一个白点
2、四分位数范围:小提琴中心的黑线条
3、较低、较高的相邻值:第一四分位数-1.5IQR、第三四分位数+1.5IQR,位于之外的值可视为离群值。
4、小提琴图中较宽的部分代表观测值取值的概率较高,较窄的部分则对应较低的概率。
参考自:https://zhuanlan.zhihu.com/p/376055263