STREAM
??STREAM (Single-cell Trajectories Reconstruction, Exploration And Mapping) is an interactive pipeline capable of disentangling and visualizing complex branching trajectories from both single-cell transcriptomic and epigenomic data.
??STREAM is now published in Nature Communications! Please cite our paper H Chen, L Albergante, JY Hsu, CA Lareau, GL Bosco, J Guan, S Zhou, AN Gorban, DE Bauer, MJ Aryee, DM Langenau, A Zinovyev, JD Buenrostro, GC Yuan, L Pinello. Single-cell trajectories reconstruction, exploration and mapping of omics data with STREAM. Nature Communications, volume 10, Article number: 1903 (2019).if you find STREAM helpful for your research.
Installation with Bioconda
#For single cell RNA-seq analysis:
conda create -n stream python=3.6 stream jupyter
conda activate myenv
#For single cell ATAC-seq analysis:
conda create -n myenv python=3.6 stream stream_atac jupyter
conda activate myenv
??該工具不僅能使用單細(xì)胞轉(zhuǎn)錄組的表達(dá)數(shù)據(jù)進(jìn)行擬時間(軌跡)分析,而且還可以使用單細(xì)胞ATAC的擬時間分析( k-mers and motifs),這為單細(xì)胞轉(zhuǎn)錄組和單細(xì)胞ATAC聯(lián)合分析提供了一種方法吹埠。
輸入文件
??單細(xì)胞轉(zhuǎn)錄組輸入文件:主要包括表達(dá)矩陣悍汛、細(xì)胞類型文件暮刃、細(xì)胞類型標(biāo)注顏色文件娃善。
??其中表達(dá)矩陣的列為樣品名稱,行為基因名稱购裙,細(xì)胞類型文件為樣品對應(yīng)的細(xì)胞類型链嘀,此文件的行數(shù)與表達(dá)矩陣的列數(shù)需要對應(yīng)萌狂,細(xì)胞類型標(biāo)注顏色文件只需要與細(xì)胞類型文件所有的細(xì)胞類型對應(yīng)即可。
此文件主要為畫單個基因在軌跡上面的分布情況怀泊。
使用
??簡單的使用命令:
stream -m data_Nestorowa.tsv.gz -l cell_label.tsv.gz -c cell_label_color.tsv.gz
stream -m data_Nestorowa.tsv.gz -l cell_label.tsv.gz -c cell_label_color.tsv.gz -g gene_list.tsv.gz -p
stream -m data_Nestorowa.tsv.gz -l cell_label.tsv.gz -c cell_label_color.tsv.gz --DE --TG --LG -p
??上述三個命令茫藏,其中第一個命令主要是軌跡分析,第二個命令是使用第一個命令生成的中間文件進(jìn)行后續(xù)分析(-p 參數(shù)代表不在重復(fù)進(jìn)行計算軌跡分析)霹琼,主要是畫單個基因在軌跡上的分布圖务傲,第三個命令是做不同分支點的比較凉当,含有三種差異分析,具體可見官方說明售葡。
報錯
??其實今天主要想記錄的就是報錯以及解決方案(軟件的使用說明和結(jié)果解讀官方就有看杭,不需要再重復(fù)贅述),在實際使用過程中挟伙,出現(xiàn)了如下報錯:
??我使用不同的集群楼雹、不同數(shù)據(jù)進(jìn)行測試,結(jié)果發(fā)現(xiàn)有的數(shù)據(jù)會有如此報錯尖阔,有的沒有烘豹,同一個數(shù)據(jù),我截取前100個細(xì)胞進(jìn)行分析诺祸,不報錯,但是一多的話祭芦,又報錯筷笨,這說明肯定不是數(shù)據(jù)格式的問題,實在是找不到問題龟劲,后面就在GitHub的stream官網(wǎng)上面詢問胃夏,最終找到了問題原因。
??報錯的原因是由于我使用的數(shù)據(jù)昌跌,其結(jié)果沒有分支點仰禀,而軟件默認(rèn)分析的過程中,會有一步對分支點進(jìn)行優(yōu)化蚕愤,如果分支點都沒有答恶,談何優(yōu)化,因此報錯萍诱。報錯的解決方案:
??a:如果沒有分支點悬嗓,則可以通過調(diào)整參數(shù)--n_clusters(by default it's 10, you can increase it to 20)增加分支點,我用我的數(shù)據(jù)裕坊,--n_clusters參數(shù)一直調(diào)整到100的時候才沒有報錯包竹。
??b:設(shè)置參數(shù) --disable_EPG_optimize,不進(jìn)行優(yōu)化籍凝,就可以避免報錯周瞎。
??最后建議如果沒有分支點的話,可以設(shè)置不用優(yōu)化的參數(shù):--disable_EPG_optimize饵蒂,不然調(diào)整--n_clusters可能需要把估計分成更多聚類声诸,沒有必要,而且增加后續(xù)分析難度苹享。
2019年7月1日
參考資料
后記
??如果分支點較多的話双絮,可以調(diào)整參數(shù)epg_alpha減少分支浴麻,如果有的點比較離群或者里分支點較遠(yuǎn),也可以通過調(diào)整參數(shù)epg_trimmingradius改變相關(guān)情況
??具體調(diào)整參數(shù)說明如下:
check parameters
st.elastic_principal_graph?
Tips:
??Increase the parameter 'epg_alpha' will help control spurious branches(by default epg_alpha=0.02)
??e.g. st.elastic_principal_graph(adata,epg_alpha=0.03)
??Add 'epg_trimmingradius' will help get rid of noisy points (by defalut epg_trimmingradius=Inf)
??e.g. st.elastic_principal_graph(adata,epg_trimmingradius=0.1)
2019年7月24日