Skip to content

Add_DepthMatrix no longer works #17

@mfansler

Description

@mfansler

After updating to the latest version from v1.0.0, I can no longer get the Add_DepthMatrix to work on code that previously ran fine. I think there are actually a couple issues here:

redeemR/R/BuidTree.R

Lines 531 to 537 in c9de785

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")

First, it now needs the argument to be provided, which wasn't previously the case:

Error in Add_DepthMatrix(.) : 
  argument "QualifiedTotalCts" is missing, with no default

The apparent default argument in the signature is to pass "", but then it tests for length(QualifiedTotalCts) == 0, which is not true, which leads to erroring out on the colnames assignment:

Error in `colnames<-`(`*tmp*`, value = c("Cell", "Pos", "T", "LS", "S",  : 
  attempt to set 'colnames' on an object with less than two dimensions

I think the only actual argument that makes it work - outside manually loading the table - is QualifiedTotalCts=NULL. That is rather counterintuitive.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions