From 2c75ca2e4d10350b92c47c68af517c50a30e2ab8 Mon Sep 17 00:00:00 2001 From: cweng Date: Sun, 12 Nov 2023 22:58:52 -0500 Subject: [PATCH] added back mitoTracing() for Create_mitoTracing --- NAMESPACE | 2 ++ R/BuidTree.R | 35 ++++++++++++++++++++++++++++++++++- man/mitoTracing-class.Rd | 38 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 74 insertions(+), 1 deletion(-) create mode 100644 man/mitoTracing-class.Rd diff --git a/NAMESPACE b/NAMESPACE index 756c698..1f4c9df 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -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) @@ -68,6 +69,7 @@ export(redeemR.read) exportClasses(Datatoplots) exportClasses(DistObjects) exportClasses(TREE) +exportClasses(mitoTracing) exportClasses(redeemR) exportMethods(AddDatatoplot_clustering) exportMethods(AddDist) diff --git a/R/BuidTree.R b/R/BuidTree.R index 7f16023..e644f36 100755 --- a/R/BuidTree.R +++ b/R/BuidTree.R @@ -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 @@ -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 diff --git a/man/mitoTracing-class.Rd b/man/mitoTracing-class.Rd new file mode 100644 index 0000000..c92d213 --- /dev/null +++ b/man/mitoTracing-class.Rd @@ -0,0 +1,38 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/BuidTree.R +\docType{class} +\name{mitoTracing-class} +\alias{mitoTracing-class} +\alias{mitoTracing} +\title{Legacy function: Major mitoTracing class that store clonal-resolved multi-omics} +\description{ +Legacy function: Major mitoTracing class that store clonal-resolved multi-omics +} +\section{Slots}{ + +\describe{ +\item{\code{GTsummary.filtered}}{The Mitochondrial genotype data frame} + +\item{\code{CellMeta}}{Store meta data for each cell type} + +\item{\code{V.fitered.list}}{a list of data frame of variant metrics, VAF, cellN, etc (each for different stringency),} + +\item{\code{UniqueV}}{A character showing the number of usable variant} + +\item{\code{Cts.Mtx}}{A sparse matrix cell-mitoVariants, store the variant count} + +\item{\code{Cts.Mtx.bi}}{A sparse matrix cell-mitoVariants, The variant count has been binarized into 0 and 1} + +\item{\code{Ctx.Mtx.depth}}{A sparse matrix cell-mitoVariants(total counts for each position), store the variant count} + +\item{\code{para}}{A character showing the parameter of this object} + +\item{\code{Seurat}}{Seurat object storing the clonal clustering results} + +\item{\code{DataToplotList}}{The customized class of Datatoplots: A list of dataframe for further plotting} + +\item{\code{DistObjects}}{The customized class that stores the cell-cell distances} + +\item{\code{TREE}}{The customized class that wraps phylogenetic tree} +}} +