Giter Site home page Giter Site logo

chenweng1991 / redeemr Goto Github PK

View Code? Open in Web Editor NEW
10.0 3.0 4.0 17.99 MB

R package for ReDeeM: single-cell Regulatory multi-omics with Deep Mitochondrial mutation profiling.

Home Page: https://chenweng1991.github.io/redeemR/

License: MIT License

R 3.20% Jupyter Notebook 96.76% Python 0.04%
cell-state clonal-analysis lineage-tracing multi-omics single-cell single-cell-genomics

redeemr's People

Contributors

chenweng1991 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

redeemr's Issues

Some mistakes in redeemR functions

Hi! Chen
Thank you for sharing this repo! But when I 'm following the steps to produce "mitoTracing.sensitive" dataset on line 95,96,97 of the file "vignettes.md"(its position is_'redeemR/vignettes/vignettes.md_). There are some errors about three functions in redeemR package.
Like this:

> `Young1_HPC_mitoTracing.Sensitive<-Make_matrix(Young1_HPC_mitoTracing.Sensitive)`
Error in (function (classes, fdef, mtable)  : 
  unable to find an inherited method for function ‘Make_matrix’ for signature ‘"mitoTracing"’
> Young1_HPC_mitoTracing.Sensitive<-SeuratLSIClustering(Young1_HPC_mitoTracing.Sensitive)
Error in (function (classes, fdef, mtable)  : 
  unable to find an inherited method for function ‘SeuratLSIClustering’ for signature ‘"mitoTracing"’
> Young1_HPC_mitoTracing.Sensitive<-AddDatatoplot_clustering(Young1_HPC_mitoTracing.Sensitive)
Error in (function (classes, fdef, mtable)  : 
  unable to find an inherited method for function ‘AddDatatoplot_clustering’ for signature ‘"mitoTracing"’

And I have tried to use these three functions by putting "redeemR::" in front of each function, I also tried reinstall this R package, but nothing changed.
I still have no useful methods to solve this problem. Any useful advises would be appreciated!
Thank you!

detailed steps to filter mtSNVs

hello there! thanks for making all the packages and notebooks.
I was looking at the mtSNVs in one of the rds files downloaded from here https://doi.org/10.6084/m9.figshare.23290004 and trying to do the same filtering as described in the nature paper. However after my filtering there are ~ 43k mismatches left, a number much higher than what you stated in the paper (~3 or 4k mt mutations). Could you please point me to the actual code or maybe a more specific description about how you processed the mutation calls? thank you very much!

The Cell barcode not matched between Seurat object and redeemR object

The Cell barcode not matched between Seurat object and redeemR object is expected, because:
the Seurat object derived from CellRanger output report RNA barcode, while the redeem reports the ATAC barcode. There is an easy way to translate the barcode from both sides. I provided a function Translate_simple_RNA2ATAC and Translate_simple_ATAC2RNA in the package redeemR. These two function input a vector of cell barcode and from one and translate to the other. The source information is here 10X document The RNA and ATAC barcodes are line-by-line corresponding to each other in the two files provided.

An issue about making mitoTracing object

Hi! Chen, @chenweng1991 ,
My goal is to make a mitoTracing data to creat Phylogenetic tree. Something went wrong when I tried to add "depthMatrix" for my mitoTracing object, The error code is as followed:

Error in h(simpleError(msg, call)) : 
  error in evaluating the argument 'x' in selecting a method for function 'as.matrix': dims [product 1] do not match the length of object [0]

And I tried to find the reason cause this problem, I checked the underlying code of function "Add_DepthMatrix" in "Build Tree.R":

setMethod(f="Add_DepthMatrix",
          signature="redeemR",
         definition=function(object,QualifiedTotalCts=""){
          require(reshape2)
          message("Remember to update for combined object")
          if(length(QualifiedTotalCts)==0){
          QualifiedTotalCts<-read.table(paste(object@attr$path,"/QualifiedTotalCts",sep=""))
          }
          colnames(QualifiedTotalCts)<-c("Cell","Pos","T","LS","S","VS")
          Dic<-gsub("Variants","",colnames([email protected])) %>% substr(.,1,nchar(.)-2) %>% as.integer %>% data.frame(Variants=colnames([email protected]),Pos=.)
          QualifiedTotalCts.subset<-subset(QualifiedTotalCts,Cell %in% row.names([email protected])) %>% merge(.,Dic,by="Pos") %>% .[,c("Cell","Variants",object@para["Threhold"])]
          DepthMatrix<-dcast(QualifiedTotalCts.subset,Cell~Variants) %>% tibble::column_to_rownames("Cell") %>% as.matrix
          if (all(dim([email protected])==dim(DepthMatrix))){
             [email protected]<-DepthMatrix[row.names([email protected]),colnames([email protected])]
          }else{
              print(dim([email protected]))
              print(dim(DepthMatrix))
              print("Check the input QualifiedTotalCts, the dimension cannot match")
          }
          return(object)
          })

I found the mistake is came from "QualifiedTotalCts.subset<-subset(QualifiedTotalCts,Cell %in% row.names([email protected])", My "QualifiedTotalCts" have no intersection with “[email protected]”.

My "QualifiedTotalCts" object and "mitoTracing" object is created by the data from the folder "Young1.T1. BMMC.Consensus.final" you shared on the website:"https://doi.org/10.6084/m9.figshare.24418966.v1"

I have no idea about why these two objects have no intersection. Could you tell me how to fix this problem?
Any advice is welcome. Thank you very much.

Object 'meanCov' not found in Create_redeemR

Hi I'm just following the "getting started" tutorial and get stuck at this very beginning

Error in Create_redeemR(VariantsGTSummary): object 'meanCov' not found
Traceback:

  1. Create_redeemR(VariantsGTSummary)
  2. subset(attr(VariantsGTSummary, "depth")[["Cell.MeanCov"]], meanCov >=
    . qualifiedCellCut)
  3. subset.default(attr(VariantsGTSummary, "depth")[["Cell.MeanCov"]],
    . meanCov >= qualifiedCellCut)

code was just

devtools::install_github("chenweng1991/redeemR")
library(redeemR)
library(ggplot2)
library(dplyr)
dir="Young1.T1.HSC.Consensus.final"
VariantsGTSummary <- redeemR.read(path=dir,thr="S",Processed=T)
example_redeemR<-Create_redeemR(VariantsGTSummary)

the VariantsGTSummary produced have the $Sensitive etc fields, but example_redeemR<-Create_redeemR(VariantsGTSummary$Sensitive) does not work either
seems to be issue with the line CellMeta<-subset(attr(VariantsGTSummary,"depth")[["Cell.MeanCov"]],meanCov>=qualifiedCellCut)
and attr(VariantsGTSummary,"depth") is NULL

Would appreciate some help
thanks in advance

Bioconda build

I was interested in adding this to Bioconda. However, I notice that SCAVENGE has been removed as dependency since the last Release. Are there plans to make another Release soon (e.g. v1.1)? If so, this would be useful so I would not also have to add SCAVENGE to Bioconda.

Distance to use and SeuratLSIClustering() argument "rmvariants"

Hi Chen,

I don't have priors for the recommended weighted Jaccard distance for my tumor sample, so I tried LSI or plain Jaccard distance to build the tree. Based on the results below, which distance metrics would you recommend moving forward with?

Based on LSI distance:
treeplot_with_VN

Based on Jaccard distance:
treeplot_with_VN_jaccard

Also, I saw that in the source code of the SeuratLSIClustering function, there is an argument rmvariants=c("Variants310TC", "Variants3109TC", "Variants5764CT").
Could you please explain why we exclude these variants and if we should use the same list for other tissue types such as tumors?

Thank you,
Li

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.