makeGraphDf - Build a data.frame from a ChangeoClone and an igraph object containing a clonal lineage
makeGraphDf creates a data.frame from a ChangeoClone and an
graph object containing a B cell lineage tree and associated sequence data.
The data.frame contains the original fields and additions such as each sequence’s parent in the
lineage tree, the lineage germline, and additional rows for inferred sequences.
makeGraphDf( curCloneGraph, curCloneObj, objSeqId = "sequence_id", objSeq = "sequence" )
- an igraph
graphobject for the lineage tree generated by buildPhylipLineage. Note that the field containing the nucleotide sequence in the object must be named
- ChangeoClone object used to generate the lineage.
- name of the sequence identifier field in
- name of the nucleotide sequence field in
data.frame with sequence and lineage information, including the
the parent nucleotide sequence in the lineage tree(
an internal parent identifier (
parent), and additional rows for germline
sequence and inferred intermediate sequences.
Values in the
sequence_id field are renamed to numeric values,
prefixed with the clonal grouping identifier and labeled as either
"Germline" if they are not an observed sequence. For example, for a lineage
clone_id = 34 the new identifiers would be of the form:
Note that the original sequence identifier is preserved in the
and the original parent sequence identifier is retained in
# Load and subset example data data(ExampleDb, package = "alakazam") data(ExampleTrees, package = "alakazam") graph <- ExampleTrees[] db <- subset(ExampleDb, clone_id == graph$clone) clone <- alakazam::makeChangeoClone(db) # Extend data with lineage information df <- makeGraphDf(graph, clone)