Learn R Programming

SanzCircos (version 0.1.0)

make_circos_df_1: make_circos_df_1

Description

First of a series of data-frame processing functions that take an initial data set, and processes it into a Circos-compatible format.

`make_circos_df_1()` groups sequences by population, isotype, and lineageID, and returns a summary data frame containing lineage start and stop positions, mutation frequencies, and scaled mutation frequencies. Can then be used to establish lineage highlighting, linkage assessment, or mutation plotting. The resulting data frame is finally arranged by population, isotype, mutation freq, and lineageID

Usage

make_circos_df_1(df)

Arguments

df

Data frame to be transformed. Built to read data frames modified from the .db files that IgSeq generates. Must contain columns "population", "isotype", "lineageID", and "mut_freq"

Value

Returns a data frame suitable for circos plotting.

Examples

Run this code
# NOT RUN {
df <- data.frame(population = c(rep("pop1", 10), rep("pop2", 10)),
isotype = c(rep("M", 4), rep("G", 6), rep("M", 6), "G", "G", "A", "A"),
lineageID = c(1, 2, 3, 4, 1, 1, 1, 2, 4, 5, 1, 1, 1, 5, 6, 7, 1, 3, 1, 1),
mut_freq = rnorm(20))

head(df)

circos_df <- make_circos_df_1(df)

head(circos_df)
# }

Run the code above in your browser using DataLab