国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

cfDNAPro|cfDNA片段數(shù)據(jù)生物學(xué)表征及可視化的R包

這篇具有很好參考價值的文章主要介紹了cfDNAPro|cfDNA片段數(shù)據(jù)生物學(xué)表征及可視化的R包。希望對大家有所幫助。如果存在錯誤或未考慮完全的地方,請大家不吝賜教,您也可以點擊"舉報違法"按鈕提交疑問。

前言

cfDNA(無細(xì)胞DNA,游離DNA,Circulating free DNA or Cell free DNA)是指在血液循環(huán)中存在的DNA片段。這些DNA片段不屬于任何細(xì)胞,因此被稱為“無細(xì)胞”或“游離”的。cfDNA來源廣泛,可以來自正常細(xì)胞和病變細(xì)胞(如腫瘤細(xì)胞)的死亡和分解過程。cfDNA的長度通常在160-180堿基對左右,這與核小體保護(hù)的DNA片段長度相符。

cfDNA的研究對于非侵入性診斷、疾病監(jiān)測、早期檢測以及了解生理和病理狀態(tài)具有重要意義。特別是在腫瘤學(xué)領(lǐng)域,通過分析循環(huán)腫瘤DNA(ctDNA),即來源于腫瘤細(xì)胞的cfDNA,可以獲取腫瘤的遺傳信息,從而指導(dǎo)癌癥的診斷、治療選擇和治療效果監(jiān)測。

cfDNAPro

cfDNAPro|cfDNA片段數(shù)據(jù)生物學(xué)表征及可視化的R包,R生信,r語言,開發(fā)語言

主要功能:

  • 數(shù)據(jù)表征: 計算片段大小分布的整體、中位數(shù)和眾數(shù),以及片段大小輪廓中的峰和谷,還有振蕩周期性。
  • 數(shù)據(jù)可視化: 提供了多種函數(shù)來可視化這些數(shù)據(jù),包括整體到單個片段的可視化、度量可視化、模式和摘要可視化等。

demo

1.片段長度可視化

  • 上圖:橫軸表示片段長度,范圍為30bp至500bp。縱軸表示具有特定讀取長度的讀取比例。這里的線并不是平滑曲線,而是連接不同數(shù)據(jù)點的直線。

  • 下圖:首先統(tǒng)計長度小于或等于30bp的讀取數(shù)量(例如N),然后將其歸一化為比例。重復(fù)這一過程,直至處理完所有片段長度(即30bp, 31bp, …, 500bp),然后以線圖的形式呈現(xiàn)。與非累積圖一樣,這里的線也是連接各個數(shù)據(jù)點,而不是平滑曲線。

library(scales)
library(ggpubr)
library(ggplot2)
library(dplyr)


# Define a list for the groups/cohorts.
grp_list<-list("cohort_1"="cohort_1",
               "cohort_2"="cohort_2",
               "cohort_3"="cohort_3",
               "cohort_4"="cohort_4")

# Generating the plots and store them in a list.
result<-sapply(grp_list, function(x){
  result <-callSize(path = data_path) %>% 
    dplyr::filter(group==as.character(x)) %>% 
    plotSingleGroup()
}, simplify = FALSE)
#> setting default outfmt to df.
#> setting default input_type to picard.
#> setting default outfmt to df.
#> setting default input_type to picard.
#> setting default outfmt to df.
#> setting default input_type to picard.
#> setting default outfmt to df.
#> setting default input_type to picard.

# Multiplexing the plots in one figure
suppressWarnings(
  multiplex <-
    ggarrange(result$cohort_1$prop_plot + 
              theme(axis.title.x = element_blank()),
            result$cohort_4$prop_plot + 
              theme(axis.title = element_blank()),
            result$cohort_1$cdf_plot,
            result$cohort_4$cdf_plot + 
              theme(axis.title.y = element_blank()),
            labels = c("Cohort 1 (n=5)", "Cohort 4 (n=4)"),
            label.x = 0.2,
            ncol = 2,
            nrow = 2))

multiplex

cfDNAPro|cfDNA片段數(shù)據(jù)生物學(xué)表征及可視化的R包,R生信,r語言,開發(fā)語言

2.片段長度分布比較

  • callMetrics:計算了每個組的中位片段大小分布
  • 上圖:每個隊列中位數(shù)片段大小分布的比例。y軸顯示讀取比例,x軸顯示片段大小。圖中顯示的線不是平滑的曲線,而是連接不同數(shù)據(jù)點的線
  • 下圖:中位數(shù)累積分布函數(shù)(CDF)的圖形。y軸顯示累積比例,x軸仍然顯示片段大小。這是一個逐步上升的圖形,反映了不同片段大小下讀取的累積分布情況。
# Set an order for those groups (i.e. the levels of factors).
order <- c("cohort_1", "cohort_2", "cohort_3", "cohort_4")
# Generate plots.
compare_grps<-callMetrics(data_path) %>% plotMetrics(order=order)
#> setting default input_type to picard.

# Modify plots.
p1<-compare_grps$median_prop_plot +
  ylim(c(0, 0.028)) +
  theme(axis.title.x = element_blank(),
        axis.title.y = element_text(size=12,face="bold")) +
  theme(legend.position = c(0.7, 0.5),
        legend.text = element_text( size = 11),
        legend.title = element_blank())

p2<-compare_grps$median_cdf_plot +
  scale_y_continuous(labels = scales::number_format(accuracy = 0.001)) +
  theme(axis.title=element_text(size=12,face="bold")) +
  theme(legend.position = c(0.7, 0.5),
        legend.text = element_text( size = 11),
        legend.title = element_blank())

# Finalize plots.
suppressWarnings(
  median_grps<-ggpubr::ggarrange(p1,
                       p2,
                       label.x = 0.3,
                       ncol = 1,
                       nrow = 2
                       ))


median_grps

cfDNAPro|cfDNA片段數(shù)據(jù)生物學(xué)表征及可視化的R包,R生信,r語言,開發(fā)語言

3.可視化DNA片段模態(tài)長度

  • 柱狀圖:這里的模態(tài)片段大小是指在樣本中出現(xiàn)次數(shù)最多的DNA片段長度
# Set an order for your groups, it will affect the group order along x axis!
order <- c("cohort_1", "cohort_2", "cohort_3", "cohort_4")

# Generate mode bin chart.
mode_bin <- callMode(data_path) %>% plotMode(order=order,hline = c(167,111,81))
#> setting default mincount as 0.
#> setting default input_type to picard.

# Show the plot.
suppressWarnings(print(mode_bin))

cfDNAPro|cfDNA片段數(shù)據(jù)生物學(xué)表征及可視化的R包,R生信,r語言,開發(fā)語言

  • 堆疊柱狀圖:可以看到每個組中不同長度片段的分布
# Set an order for your groups, it will affect the group order along x axis.
order <- c("cohort_1", "cohort_2", "cohort_3", "cohort_4")

# Generate mode stacked bar chart. You could specify how to stratify the modes
# using 'mode_partition' arguments. If other modes exist other than you 
# specified, an 'other' group will be added to the plot.

mode_stacked <- 
  callMode(data_path) %>% 
  plotModeSummary(order=order,
                  mode_partition = list(c(166,167)))
#> setting default input_type to picard.

# Modify the plot using ggplot syntax.
mode_stacked <- mode_stacked + theme(legend.position = "top")

# Show the plot.
suppressWarnings(print(mode_stacked))

cfDNAPro|cfDNA片段數(shù)據(jù)生物學(xué)表征及可視化的R包,R生信,r語言,開發(fā)語言

4.片段化振蕩模式比較

  • 間峰距離:通過測量和比較間距距離(峰值之間的距離),比較不同隊列中的10bp周期性振蕩模式
# Set an order for your groups, it will affect the group order.
order <- c("cohort_1", "cohort_2", "cohort_4", "cohort_3")

# Plot and modify inter-peak distances.

  inter_peak_dist<-callPeakDistance(path = data_path,  limit = c(50, 135)) %>%
  plotPeakDistance(order = order) +
  labs(y="Fraction") +
  theme(axis.title =  element_text(size=12,face="bold"),
        legend.title = element_blank(),
        legend.position = c(0.91, 0.5),
        legend.text = element_text(size = 11))
#> setting the mincount to 0.
#>  setting the xlim to c(7,13). 
#>  setting default outfmt to df.
#> Setting default mincount to 0.
#> setting default input_type to picard.


# Show the plot.
suppressWarnings(print(inter_peak_dist))

cfDNAPro|cfDNA片段數(shù)據(jù)生物學(xué)表征及可視化的R包,R生信,r語言,開發(fā)語言

  • 間谷距離:與之前介紹的間峰距離可視化相比,間谷距離的可視化重點在于表示讀取次數(shù)下降的區(qū)域,而不是上升的區(qū)域。這兩個圖表的區(qū)別在于它們關(guān)注的是碎片大小譜的不同特點,一個是峰點(即頻率的局部最高點),另一個是谷點(即頻率的局部最低點)。
# Set an order for your groups, it will affect the group order.
order <- c("cohort_1", "cohort_2", "cohort_4", "cohort_3")
# Plot and modify inter-peak distances.
inter_valley_dist<-callValleyDistance(path = data_path,  
                                      limit = c(50, 135)) %>%
  plotValleyDistance(order = order) +
  labs(y="Fraction") +
  theme(axis.title =  element_text(size=12,face="bold"),
        legend.title = element_blank(),
        legend.position = c(0.91, 0.5),
        legend.text = element_text(size = 11))
#> setting the mincount to 0. 
#>  setting the xlim to c(7,13). 
#>  setting default outfmt to df.
#> setting the mincount to 0.
#> setting default input_type to picard.

# Show the plot.
suppressWarnings(print(inter_valley_dist))

cfDNAPro|cfDNA片段數(shù)據(jù)生物學(xué)表征及可視化的R包,R生信,r語言,開發(fā)語言

5. ggplot2美化

library(ggplot2)
library(cfDNAPro)
# Set the path to the example sample.
exam_path <- examplePath("step6")
# Calculate peaks and valleys.
peaks <- callPeakDistance(path = exam_path) 
#> setting default limit to c(35,135).
#> setting default outfmt to df.
#> Setting default mincount to 0.
#> setting default input_type to picard.
valleys <- callValleyDistance(path = exam_path) 
#> setting default limit to c(35,135).
#> setting default outfmt to df.
#> setting the mincount to 0.
#> setting default input_type to picard.
# A line plot showing the fragmentation pattern of the example sample.
exam_plot_all <- callSize(path=exam_path) %>% plotSingleGroup(vline = NULL)
#> setting default outfmt to df.
#> setting default input_type to picard.
# Label peaks and valleys with dashed and solid lines.
exam_plot_prop <- exam_plot_all$prop + 
  coord_cartesian(xlim = c(90,135),ylim = c(0,0.0065)) +
  geom_vline(xintercept=peaks$insert_size, colour="red",linetype="dashed") +
  geom_vline(xintercept = valleys$insert_size,colour="blue")

# Show the plot.
suppressWarnings(print(exam_plot_prop))

cfDNAPro|cfDNA片段數(shù)據(jù)生物學(xué)表征及可視化的R包,R生信,r語言,開發(fā)語言

# Label peaks and valleys with dots.
exam_plot_prop_dot<- exam_plot_all$prop + 
  coord_cartesian(xlim = c(90,135),ylim = c(0,0.0065)) +
  geom_point(data= peaks, 
             mapping = aes(x= insert_size, y= prop),
             color="blue",alpha=0.5,size=3) +
  geom_point(data= valleys, 
             mapping = aes(x= insert_size, y= prop),
             color="red",alpha=0.5,size=3) 
# Show the plot.
suppressWarnings(print(exam_plot_prop_dot))

cfDNAPro|cfDNA片段數(shù)據(jù)生物學(xué)表征及可視化的R包,R生信,r語言,開發(fā)語言


想做cfDNA,邁出分析的第一步,數(shù)據(jù)表征。文章來源地址http://www.zghlxwxcb.cn/news/detail-854986.html

到了這里,關(guān)于cfDNAPro|cfDNA片段數(shù)據(jù)生物學(xué)表征及可視化的R包的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來自互聯(lián)網(wǎng)用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務(wù),不擁有所有權(quán),不承擔(dān)相關(guān)法律責(zé)任。如若轉(zhuǎn)載,請注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實不符,請點擊違法舉報進(jìn)行投訴反饋,一經(jīng)查實,立即刪除!

領(lǐng)支付寶紅包贊助服務(wù)器費用

相關(guān)文章

  • 易基因:cfDNA甲基化在器官和組織損傷檢測中的強(qiáng)大力量

    易基因:cfDNA甲基化在器官和組織損傷檢測中的強(qiáng)大力量

    大家好,這里是專注表觀組學(xué)十余年,領(lǐng)跑多組學(xué)科研服務(wù)的易基因。 檢測器官和組織損傷對于早期診斷、治療決策和監(jiān)測疾病進(jìn)展至關(guān)重要。由于DNA甲基化模式可以響應(yīng)組織損傷而改變,甲基化檢測提供了一種有前途的方法,在早篩早診、疾病進(jìn)展監(jiān)測、治療效果和器官移

    2024年01月19日
    瀏覽(22)
  • Mysql分布式集群部署---MySQL集群Cluster將數(shù)據(jù)分成多個片段,每個片段存儲在不同的服務(wù)器上

    Mysql分布式集群部署---MySQL集群Cluster將數(shù)據(jù)分成多個片段,每個片段存儲在不同的服務(wù)器上

    部署MysqlCluster集群環(huán)境 MySQL集群Cluster將數(shù)據(jù)分成多個片段,每個片段存儲在不同的服務(wù)器上。這樣可以將數(shù)據(jù)負(fù)載分散到多個服務(wù)器上,提高系統(tǒng)的性能和可擴(kuò)展性。 MySQL集群Cluster使用多個服務(wù)器來存儲數(shù)據(jù),因此需要確保數(shù)據(jù)在不同的服務(wù)器之間同步。MySQL集群Cluster使用

    2024年02月02日
    瀏覽(19)
  • 區(qū)塊鏈與生物信息數(shù)據(jù)分析:實現(xiàn)生物研究的新方法

    生物信息學(xué)是一門研究生物數(shù)據(jù)的科學(xué),其主要關(guān)注生物數(shù)據(jù)的收集、存儲、處理、分析和挖掘。隨著生物科學(xué)領(lǐng)域的快速發(fā)展,生物信息學(xué)也在不斷發(fā)展,為生物研究提供了更多的數(shù)據(jù)和工具。然而,生物信息學(xué)數(shù)據(jù)的規(guī)模非常龐大,分布在多個數(shù)據(jù)庫和平臺上,這使得數(shù)

    2024年04月16日
    瀏覽(29)
  • 生物數(shù)據(jù)下載

    生物數(shù)據(jù)下載

    目錄 1. 獲取數(shù)據(jù)下載的地址?? 2. 生物數(shù)據(jù)常用的下載站點 1、核酸數(shù)據(jù)庫 2、非編碼RNA數(shù)據(jù)庫 (1).非編碼小RNA數(shù)據(jù)庫 (2).長非編碼RNA數(shù)據(jù)庫: (3).非編碼RNA家族數(shù)據(jù)庫 (4).非編碼RNA序列數(shù)據(jù)庫 3、蛋白質(zhì)數(shù)據(jù)庫 (1).蛋白質(zhì)信息 (2).蛋白序列數(shù)據(jù)庫 (3).蛋白質(zhì)結(jié)

    2024年02月11日
    瀏覽(14)
  • 多任務(wù)學(xué)習(xí)用于多模態(tài)生物數(shù)據(jù)分析

    多任務(wù)學(xué)習(xí)用于多模態(tài)生物數(shù)據(jù)分析

    目前的生物技術(shù)可以同時測量來自同一細(xì)胞的多種模態(tài)數(shù)據(jù)(例如RNA、DNA可及性和蛋白質(zhì))。這需要結(jié)合不同的分析任務(wù)(如多模態(tài)整合和跨模態(tài)分析)來全面理解這些數(shù)據(jù),推斷基因調(diào)控如何驅(qū)動生物多樣性。然而,目前的分析方法被設(shè)計為執(zhí)行單個任務(wù),并且大部分僅提

    2024年02月08日
    瀏覽(18)
  • 【每日算法 && 數(shù)據(jù)結(jié)構(gòu)(C++)】—— 03 | 合并兩個有序數(shù)組(解題思路、流程圖、代碼片段)

    【每日算法 && 數(shù)據(jù)結(jié)構(gòu)(C++)】—— 03 | 合并兩個有序數(shù)組(解題思路、流程圖、代碼片段)

    An inch of time is an inch of gold, but you can’t buy that inch of time with an inch of gold. An inch of time is an inch of gold, but you can\\\'t buy that inch of time with an inch of gold 給你兩個有序數(shù)組,請將兩個數(shù)組進(jìn)行合并,并且合并后的數(shù)組也必須有序 這個題目要求將兩個有序數(shù)組合并成一個有序數(shù)組。在數(shù)

    2024年02月11日
    瀏覽(21)
  • 【每日算法 && 數(shù)據(jù)結(jié)構(gòu)(C++)】—— 02 | 數(shù)組的并交集(解題思路、流程圖、代碼片段)

    【每日算法 && 數(shù)據(jù)結(jié)構(gòu)(C++)】—— 02 | 數(shù)組的并交集(解題思路、流程圖、代碼片段)

    When you feel like giving up, remember why you started. 當(dāng)你想放棄時,請記住為什么你開始 給你兩個數(shù)組,請分別求出兩個數(shù)組的交集和并集 在數(shù)學(xué)中,我們可以通過交集和并集來描述兩個集合之間的關(guān)系。 交集(Intersection) :指的是兩個集合中共有的元素組成的集合??梢杂梅?/p>

    2024年02月11日
    瀏覽(20)
  • R語言生物群落(生態(tài))數(shù)據(jù)統(tǒng)計分析與繪圖

    R語言生物群落(生態(tài))數(shù)據(jù)統(tǒng)計分析與繪圖

    詳情點擊鏈接:R語言生物群落(生態(tài))數(shù)據(jù)統(tǒng)計分析與繪圖 前沿 R 語言作的開源、自由、免費等特點使其廣泛應(yīng)用于生物群落數(shù)據(jù)統(tǒng)計分析。生物群落數(shù)據(jù)多樣而復(fù)雜,涉及眾多統(tǒng)計分析方法。 一: R和Rstudio簡介及入門和作圖基礎(chǔ) 1 ) R及Rstudio:背景、軟件及程序包安裝、

    2024年02月02日
    瀏覽(22)
  • 大數(shù)據(jù)在生物信息學(xué)研究中的重要作用

    生物信息學(xué)是一門研究生物學(xué)信息的科學(xué),它結(jié)合生物學(xué)、計算機(jī)科學(xué)、數(shù)學(xué)、統(tǒng)計學(xué)等多學(xué)科知識,涉及到生物序列數(shù)據(jù)的收集、存儲、分析、比較和挖掘等方面。隨著生物科學(xué)領(lǐng)域的快速發(fā)展,生物信息學(xué)在生物科學(xué)研究中發(fā)揮著越來越重要的作用。 大數(shù)據(jù)在生物信息學(xué)

    2024年04月25日
    瀏覽(14)
  • R語言生物群落(生態(tài))數(shù)據(jù)統(tǒng)計分析與繪圖教程

    R語言生物群落(生態(tài))數(shù)據(jù)統(tǒng)計分析與繪圖教程

    詳情點擊鏈接:R語言生物群落(生態(tài))數(shù)據(jù)統(tǒng)計分析與繪圖教程 前沿 ?R 語言作的開源、自由、免費等特點使其廣泛應(yīng)用于生物群落數(shù)據(jù)統(tǒng)計分析。生物群落數(shù)據(jù)多樣而復(fù)雜,涉及眾多統(tǒng)計分析方法。 ? 一: R和Rstudio及入門和作圖基礎(chǔ) 1 ) R及Rstudio:背景、軟件及程序包安

    2024年01月24日
    瀏覽(22)

覺得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包