Error when "collapseByClone" is FALSE in calcDBClonalConsensus

Issue #15 resolved
Ang Cui created an issue

The db_ClonalConsensus variable is not defined unless collapsedByClone is TRUE

# If collapseByClone is TRUE then collapse the db by clones
if(collapseByClone){ 
    uniqueCloneIDs <-  unique(db[,cloneColumn])
    indexOfFirstOccurenceOfClone <- match(uniqueCloneIDs, db[,cloneColumn])
    db_ClonalConsensus <- db[indexOfFirstOccurenceOfClone, ]
    db_ClonalConsensus$CLONAL_CONSENSUS_SEQUENCE <- unlist(list_ClonalConsensus)
}

return(db_ClonalConsensus)

Comments (2)

  1. Ang Cui reporter

    Since the function name is calcDBClonalConsensus, we might as well make it always collapseByClone unless you have other concerns.

  2. Mohamed Uduman

    Fixed this. Ang, we do need the collapseByClone=FALSE flag if you want to retain all the individual sequences but still calculate the CLONAL_CONSENSUS_SEQUENCE.

  3. Log in to comment