Description Usage Arguments Value See Also Examples
View source: R/complex_functions.R
This function creates a mutational catalogue from a data frame. It is a
wrapper function for create_mutation_catalogue_from_VR
: it
first creates a VRanges object from the data frame by
makeVRangesFromDataFrame
and then passes this object on to the
above mentioned custom function.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | create_mutation_catalogue_from_df(
this_df,
this_refGenome_Seqinfo = NULL,
this_seqnames.field = "X.CHROM",
this_start.field = "POS",
this_end.field = "POS",
this_PID.field = "PID",
this_subgroup.field = "subgroup",
this_refGenome,
this_wordLength,
this_verbose = 1,
this_rownames = c(),
this_adapt_rownames = 1
)
|
this_df |
A data frame constructed from a vcf-like file of a whole cohort. The first columns are those of a standard vcf file, followed by an arbitrary number of custom or used defined columns. One of these can carry a PID (patient or sample identifyier) and one can carry subgroup information. |
this_refGenome_Seqinfo |
A seqInfo object, referring to the reference
genome used. Argument passed on to |
this_seqnames.field |
Indicates the name of the column in which the chromosome is encoded |
this_start.field |
Indicates the name of the column in which the start coordinate is encoded |
this_end.field |
Indicates the name of the column in which the end coordinate is encoded |
this_PID.field |
Indicates the name of the column in which the PID (patient or sample identifier) is encoded |
this_subgroup.field |
Indicates the name of the column in which the subgroup information is encoded |
this_refGenome |
The reference genome handed over to
|
this_wordLength |
The size of the motifs to be extracted by
|
this_verbose |
Verbose if |
this_rownames |
Optional parameter to specify rownames of the mutational
catalogue |
this_adapt_rownames |
Rownames of the output |
A list with entries matrix
and frame
obtained from
create_mutation_catalogue_from_VR
:
matrix
: The mutational catalogue V
frame
:
Additional and meta information on rownames (features), colnames (PIDs) and
subgroup attribution.
create_mutation_catalogue_from_VR
1 2 3 4 5 6 7 8 9 10 11 | library(BSgenome.Hsapiens.UCSC.hg19)
data(lymphoma_test)
word_length <- 3
temp_list <- create_mutation_catalogue_from_df(
lymphoma_test_df,this_seqnames.field = "CHROM",
this_start.field = "POS",this_end.field = "POS",
this_PID.field = "PID",this_subgroup.field = "SUBGROUP",
this_refGenome = BSgenome.Hsapiens.UCSC.hg19,
this_wordLength = word_length)
dim(temp_list$matrix)
head(temp_list$matrix)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.