Skip to content

Commit

Permalink
added back mitoTracing() for Create_mitoTracing
Browse files Browse the repository at this point in the history
  • Loading branch information
cweng committed Nov 13, 2023
1 parent 10fb034 commit 2c75ca2
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 1 deletion.
2 changes: 2 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ export(Translate_simple_RNA2ATAC)
export(Vfilter_v3)
export(Vfilter_v4)
export(convert_mitotracing_redeemR)
export(mitoTracing)
export(plot_depth)
export(plot_depth_legacy)
export(plot_npSummary)
Expand All @@ -68,6 +69,7 @@ export(redeemR.read)
exportClasses(Datatoplots)
exportClasses(DistObjects)
exportClasses(TREE)
exportClasses(mitoTracing)
exportClasses(redeemR)
exportMethods(AddDatatoplot_clustering)
exportMethods(AddDist)
Expand Down
35 changes: 34 additions & 1 deletion R/BuidTree.R
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,39 @@ redeemR<-setClass(
)
)

#' Legacy function: Major mitoTracing class that store clonal-resolved multi-omics
#'
#' @slot GTsummary.filtered The Mitochondrial genotype data frame
#' @slot CellMeta Store meta data for each cell type
#' @slot V.fitered.list a list of data frame of variant metrics, VAF, cellN, etc (each for different stringency),
#' @slot UniqueV A character showing the number of usable variant
#' @slot Cts.Mtx A sparse matrix cell-mitoVariants, store the variant count
#' @slot Cts.Mtx.bi A sparse matrix cell-mitoVariants, The variant count has been binarized into 0 and 1
#' @slot Ctx.Mtx.depth A sparse matrix cell-mitoVariants(total counts for each position), store the variant count
#' @slot para A character showing the parameter of this object
#' @slot Seurat Seurat object storing the clonal clustering results
#' @slot DataToplotList The customized class of Datatoplots: A list of dataframe for further plotting
#' @slot DistObjects The customized class that stores the cell-cell distances
#' @slot TREE The customized class that wraps phylogenetic tree
#' @import Seurat
#' @export
mitoTracing<-setClass(
"mitoTracing",
slots=c(GTsummary.filtered="data.frame",
CellMeta="data.frame",
V.fitered.list="list",
UniqueV="character",
Cts.Mtx="dgCMatrix",
Cts.Mtx.bi="dgCMatrix",
Ctx.Mtx.depth="matrix",
para="character",
Seurat="Seurat",
DataToplotList="Datatoplots",
DistObjects="DistObjects",
TREE="TREE",
AssignedVariant="list"
)
)

#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
# Class definitions
Expand Down Expand Up @@ -660,7 +693,7 @@ V.fitered.list<-c(V.fitered.list,list(V.filtered))
V.union.unique<-unique(V.union)
names(V.fitered.list)<-labels
GTsummary.all.filtered<-subset(GTsummary.all,Variants %in% V.union.unique & Cell %in% CellMeta.all$Cell)
ob<-redeemR()
ob<-mitoTracing()
ob@GTsummary.filtered<-GTsummary.all.filtered
ob@CellMeta<-CellMeta.all
ob@V.fitered.list=V.fitered.list
Expand Down
38 changes: 38 additions & 0 deletions man/mitoTracing-class.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2c75ca2

Please sign in to comment.