Posts

Showing posts from July, 2023

2023/0728_使用10X genomics提供的5k 胰臟癌資料分析 (HDF5格式轉換)

Source: https://www.10xgenomics.com/resources/datasets?query=pancreatic%20&page=1&configure%5BhitsPerPage%5D=50&configure%5BmaxValuesPerFacet%5D=1000 Source: 資料輸入參考/ https://www.youtube.com/watch?v=5HBzgsz8qyk&ab_channel=Bioinformagician #下載 10xgenomics // 5K human pancreatic tumor isolated with chromium nuclei isolation kit #檔案格式 為 HDF5, .5, 用 hdf5r的package才能用 Read10X_h5功能 #也下載SeuratDisk install.packages("hdf5r") library(hdf5r) library(Seurat) library(SeuratDisk) library(dplyr) # 出現一些問題名 Q1# library(patchwork) #資料輸入參考/ https://www.youtube.com/watch?v=5HBzgsz8qyk&ab_channel=Bioinformagician # Load the ataset (資料輸入) (輸入一個 matrix) PDAC.data 就是 meta.data PDAC 用來判斷要選那一個範圍的細胞做分析 VlnPlot(PDAC, features = c("nFeature_RNA", "nCount_RNA", "percent.mt"), ncol = 3) # FeatureScatter is typically used to visualize feature-feature relationships, but can be usedPDA # for anything calculated by the object, i.e. columns in object metada...

2023/0727_使用 Seurat的2700 PBMC資料_了解scRNA-seq 分析流程

Source: https://satijalab.org/seurat/articles/pbmc3k_tutorial.html # Load the PBMC dataset (資料輸入) pbmc.data 200 & nFeature_RNA % group_by(cluster) %>% slice_max(n = 2, order_by = avg_log2FC) #ROC test returns the ‘classification power’ for any individual marker (ranging from 0 - random, to 1 - perfect). cluster0.markers % group_by(cluster) %>% top_n(n = 10, wt = avg_log2FC) -> top10 DoHeatmap(pbmc1, features = top10$gene) + NoLegend() #cluster 命名 new.cluster.ids

2023_0730/ 整合 snRNA-seq的資料, 去除Batch effect /Bioinformagician

Source: https://www.youtube.com/watch?v=HrbeaEJqKcY&ab_channel=Bioinformagician Source: https://mojaveazure.github.io/seurat-object/reference/Seurat-methods.html Title: Integrate single-cell RNA-Seq datasets in R using Seurat (CCA) | Detailed Seurat Workflow Tutorial # script to integrate scRNA-Seq datasets to correct for batch effects # setwd("~/Desktop/demo/single_cell_integrate") 設定程式執行時的檔案目錄 #在這次測試中我的目錄路徑# data/= D:/YCT/scRNAseq/GSE180665integrate_demo/ # load libraries library(Seurat) library(tidyverse) #separate()就是它的功能 library(ggplot2) library(gridExtra) # get data location以及建立 Seurat object # dirs 900 & nFeature_RNA > 500 & mitoPercent

2022_1204_下載FPKM到TPM

基本觀念: 1. .gz的 file 要先轉成 .zip , 才能打開 2. FPKM/or RPKM 要轉成 TPM , 不同資料庫資料才能比較 (如 GTEx vs. TCGA) #TPM的公式, 要 normalized 所有基因的總合, 再 x 1e6 # 3. 含有TPM的表格需要另外存一個.csv檔,之後再建立一個log2 (TPM+1) working sheet, 再 存成 .CSV (逗點分格式檔案) --> 未來開啟使用 EditPat Lite 很快// 因為, 用 excel開非常慢. !!!!! 4. 使用時, 可以把某幾個 gene之間的表現情形, 將自行 TCGA TPM vs. GTEx Portal TPM 的比較結果,與GEPIA2的結果做比較, 知道TPM轉換的效果旦是否一致。 製作 TPM 的過程// 2022/12/04 1. 到 Santa Cruz 資料庫// https://xenabrowser.net/datapages/ 2. 下載 TCGA 含有 FPKM 的資料: https://xenabrowser.net/datapages/?dataset=TCGA-PAAD.htseq_fpkm.tsv&host=https%3A%2F%2Fgdc.xenahubs.net&removeHub=https%3A%2F%2Fxena.treehouse.gi.ucsc.edu%3A443 3. 先將 GZ 格式轉換成 ZIP: https://cloudconvert.com/ 4. 將 ensemble ID 轉換成 gene list: https://www.biotools.fr/human/ensembl_symbol_converter 5. 用 EditPad Lite 開啟確認, 再用 excel 存檔.. 將 log2 (1+FPKM) --> FPKM --> TPM --> log2 (TPM+1) #TPM的公式, 要 normalized 所有基因的總合, 再x 1e6 # 6. 跟 GEPIA2上的 基因表現圖表, 在同樣是 log2(TPM+1)的格式下做比較, 一樣就"大功告成" 7. 把轉好的 exce...