The example or result data in the result folder can be downloaded here.

Merge the copy number amplification info of all samples

Calculate the number of fragments with copy number amplification in each cellCreate a data frame to record the copy number information of each eccDNA-related gene in each cell across all samples.

eccDNA_frame <- creat_eccDNA_frame(adapter.result.dir="eccDNAscope_example/result")
eccDNA_frame[1:5,1:3]
##            AK1_AGCTATGGTTTGACCA-1 AK1_CTGCTCAGTTTGTCTT-1 AK1_CCTGCTAAGTGGTGTG-1
## LINC02031                       0                      0                      5
## LINC01854                       6                      0                      0
## LINC02572                       0                      5                      0
## HSPE1-MOB4                      0                      0                      0
## SH3YL1                          0                      0                      0


Generate a Seurat object for eccDNA clone analysis

eccDNA_clone <- creat_eccDNA_clone_obj(eccDNA_frame=eccDNA_frame)
eccDNA_clone
## An object of class Seurat 
## 819 features across 1095 samples within 1 assay 
## Active assay: RNA (819 features, 819 variable features)
##  3 layers present: counts, data, scale.data
##  2 dimensional reductions calculated: pca, umap


eccDNA clone trajectory analysis

clone_result <- creat_eccDNA_clone_trajectory(eccDNA_clone_obj=eccDNA_clone,min.cor = 0.1)
clone_result$p



Extract all sub-paths from the eccDNA clone trajectory plot

all_sub_path <- extract_clone_branch(clone.result=clone_result$result)
all_sub_path
##   [1] "13->6->12->15->4->1->8->10" "13->6->12->15->4->9->5->10"
##   [3] "13->12->15->4->1->8->10"    "13->12->15->4->9->5->10"   
##   [5] "13->6->12->15->4->1->10"    "13->6->12->15->4->9->10"   
##   [7] "13->6->12->15->4->5->10"    "13->6->12->15->4->8->10"   
##   [9] "6->12->15->4->1->8->10"     "6->12->15->4->9->5->10"    
##  [11] "13->6->12->4->1->8->10"     "13->6->12->4->9->5->10"    
##  [13] "13->6->15->4->1->8->10"     "13->6->15->4->9->5->10"    
##  [15] "13->12->15->4->1->10"       "13->12->15->4->9->10"      
##  [17] "13->12->15->4->5->10"       "13->12->15->4->8->10"      
##  [19] "13->6->12->15->4->10"       "12->15->4->1->8->10"       
##  [21] "12->15->4->9->5->10"        "6->12->15->4->1->10"       
##  [23] "6->12->15->4->9->10"        "6->12->15->4->5->10"       
##  [25] "6->12->15->4->8->10"        "13->12->4->1->8->10"       
##  [27] "13->12->4->9->5->10"        "13->6->12->4->1->10"       
##  [29] "13->6->12->4->9->10"        "13->6->12->4->5->10"       
##  [31] "13->6->12->4->8->10"        "13->6->15->4->1->10"       
##  [33] "13->6->15->4->9->10"        "13->6->15->4->5->10"       
##  [35] "13->6->15->4->8->10"        "6->12->4->1->8->10"        
##  [37] "6->12->4->9->5->10"         "6->15->4->1->8->10"        
##  [39] "6->15->4->9->5->10"         "14->3->4->1->8->10"        
##  [41] "14->3->4->9->5->10"         "14->2->4->1->8->10"        
##  [43] "14->2->4->9->5->10"         "7->2->4->1->8->10"         
##  [45] "7->2->4->9->5->10"          "13->12->15->4->10"         
##  [47] "13->6->12->15->10"          "12->15->4->1->10"          
##  [49] "12->15->4->9->10"           "12->15->4->5->10"          
##  [51] "12->15->4->8->10"           "6->12->15->4->10"          
##  [53] "13->12->4->1->10"           "13->12->4->9->10"          
##  [55] "13->12->4->5->10"           "13->12->4->8->10"          
##  [57] "13->6->12->4->10"           "13->6->15->4->10"          
##  [59] "12->4->1->8->10"            "12->4->9->5->10"           
##  [61] "6->12->4->1->10"            "6->12->4->9->10"           
##  [63] "6->12->4->5->10"            "6->12->4->8->10"           
##  [65] "6->15->4->1->10"            "6->15->4->9->10"           
##  [67] "6->15->4->5->10"            "6->15->4->8->10"           
##  [69] "14->3->4->1->10"            "14->3->4->9->10"           
##  [71] "14->3->4->5->10"            "14->3->4->8->10"           
##  [73] "14->3->1->8->10"            "14->4->1->8->10"           
##  [75] "14->4->9->5->10"            "14->2->4->1->10"           
##  [77] "14->2->4->9->10"            "14->2->4->5->10"           
##  [79] "14->2->4->8->10"            "14->2->9->5->10"           
##  [81] "15->4->1->8->10"            "15->4->9->5->10"           
##  [83] "3->4->1->8->10"             "3->4->9->5->10"            
##  [85] "2->4->1->8->10"             "2->4->9->5->10"            
##  [87] "7->2->4->1->10"             "7->2->4->9->10"            
##  [89] "7->2->4->5->10"             "7->2->4->8->10"            
##  [91] "7->2->9->5->10"             "13->12->15->10"            
##  [93] "12->15->4->10"              "6->12->15->10"             
##  [95] "13->12->4->10"              "13->6->12->10"             
##  [97] "13->6->15->10"              "12->4->1->10"              
##  [99] "12->4->9->10"               "12->4->5->10"              
## [101] "12->4->8->10"               "6->12->4->10"              
## [103] "6->15->4->10"               "14->3->4->10"              
## [105] "14->3->1->10"               "14->3->5->10"              
## [107] "14->3->8->10"               "14->4->1->10"              
## [109] "14->4->9->10"               "14->4->5->10"              
## [111] "14->4->8->10"               "14->2->4->10"              
## [113] "14->2->9->10"               "14->2->5->10"              
## [115] "14->9->5->10"               "15->4->1->10"              
## [117] "15->4->9->10"               "15->4->5->10"              
## [119] "15->4->8->10"               "3->4->1->10"               
## [121] "3->4->9->10"                "3->4->5->10"               
## [123] "3->4->8->10"                "3->1->8->10"               
## [125] "4->1->8->10"                "4->9->5->10"               
## [127] "2->4->1->10"                "2->4->9->10"               
## [129] "2->4->5->10"                "2->4->8->10"               
## [131] "2->9->5->10"                "7->2->4->10"               
## [133] "7->2->9->10"                "7->2->5->10"               
## [135] "12->15->10"                 "13->12->10"                
## [137] "12->4->10"                  "6->12->10"                 
## [139] "6->15->10"                  "14->3->10"                 
## [141] "14->4->10"                  "14->2->10"                 
## [143] "14->9->10"                  "14->5->10"                 
## [145] "15->4->10"                  "3->4->10"                  
## [147] "3->1->10"                   "3->5->10"                  
## [149] "3->8->10"                   "4->1->10"                  
## [151] "4->9->10"                   "4->5->10"                  
## [153] "4->8->10"                    2->4->10                 
## [155] "2->9->10"                   "2->5->10"                  
## [157] "7->2->10"                   "1->8->10"                  
## [159] "9->5->10"                   "12->10"                    
## [161] "14->10"                     "15->10"                    
## [163] "3->10"                      "4->10"                     
## [165] "2->10"                      "1->10"                     
## [167] "9->10"                      "5->10"                     
## [169] "8->10"                      "11->0"                     
## [171] "16->0"


Plot a heatmap of genes with significant changes on the clone branches

p <- plot_clone_branch_features(clone_branch=c(2,4,10),
          cluster_eccDNA=clone_result$cluster_eccDNA,
          eccDNA_frame=eccDNA_frame,
          eccDNA_clone=eccDNA_clone,
          ncopy=10 )