10X空間轉(zhuǎn)錄組數(shù)據(jù)分析之CNV軌跡層級(jí)

作者,Evil Genius

今天我們要完成一項(xiàng)工程,那就是CNV層級(jí)軌跡,如下圖:

首先來(lái)看一下什么是CNV譜系

拷貝數(shù)變異(CNVs)在細(xì)胞增殖過(guò)程中在基因組中積累,提供了系統(tǒng)發(fā)育譜系的特征。通過(guò)轉(zhuǎn)錄組數(shù)據(jù)上使用intercnv生成CNV譜,能夠以空間和時(shí)間分辨率跟蹤克隆系統(tǒng)發(fā)育。
文章空間轉(zhuǎn)錄組數(shù)據(jù)分析之CNV burden和CNV聚類(python版本)已經(jīng)做了基礎(chǔ)的CNV分析和聚類,這個(gè)是前提。
CNV譜系如下:

我們來(lái)完成這項(xiàng)工程,示例數(shù)據(jù)大家自行下載,大家都是生信資深人員了,中間過(guò)程就不啰嗦了。
from IPython.display import display, HTML, Image
display(HTML("<style>.container { width:95% !important; }</style>"))

%load_ext autoreload
%autoreload 2

import warnings
warnings.filterwarnings("ignore")

import os
import copy

import numpy as np
import pandas as pd
import scanpy as sc
import scanpy.external as sce
from anndata import AnnData

import matplotlib
from matplotlib import cm
import matplotlib.pyplot as plt
import matplotlib.patheffects as path_effects

import sys
sys.path.append("../../lib")
from stpalette import palette_WM4007_rna, palette_WM4237_rna
from plots import plotSpatialAll, plotSpatialEdge, euclidean_p1
from cheatmap import sMED, cdist, cplot
from utils import loadAdImage, filterCNV

model = 'WM4007'
palette_rna = palette_WM4007_rna if model=='WM4007' else palette_WM4237_rna

preprocessedStDataPath = 'd:/from HPCC 11 28 2022/results_NF1-nod-t2t-k35/%s/' % model
dataPath = '../../data/'
ids = sorted(np.loadtxt(dataPath + 'ids_%s_ST.txt' % model, dtype=str))
sids = [id[7:12] for id in ids]
from scipy.spatial.distance import cdist, pdist, squareform

ad_all = sc.read(dataPath + 'ad_all_human_clustered_st_%s.h5ad' % model)
ad_all = ad_all[ad_all.obs['human_ratio']>=0.25]
filter_spots_index = ad_all.obs.index.copy()
讀取空間數(shù)據(jù)
還有 87% 的精彩內(nèi)容
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。
禁止轉(zhuǎn)載,如需轉(zhuǎn)載請(qǐng)通過(guò)簡(jiǎn)信或評(píng)論聯(lián)系作者。
支付 ¥200.00 繼續(xù)閱讀

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容