Search
Question: motifMatrix input object type, confused VRange and GRange
0
gravatar for solo7773
16 months ago by
solo777310
solo777310 wrote:

motif-functions {SomaticSignatures}

Usage

motifMatrix(vr, group = "sampleNames", normalize = TRUE)
Arguments

vr    
GRanges object [required]

 

But, the example from the manual shows

Examples

data(sca_motifs_tiny)

motifMatrix(sca_motifs_tiny, group = "study")

 

However, sca_motifs is a VRange object. So, what is the right type for motifMatrix? VRange or GRange?

ADD COMMENTlink modified 16 months ago by Julian Gehring1.3k • written 16 months ago by solo777310
1
gravatar for Julian Gehring
16 months ago by
Julian Gehring1.3k
Julian Gehring1.3k wrote:

Both GRanges and VRanges work as inputs for motifMatrix. Since the input to that function is in most workflows the output of the mutationContext function, it often is a VRanges that describes a set of variants. But, any object that inherits from a GRanges  is suitable, if it contains the information of alteration and context.

You can check that both work the same way by trying it out:

data(sca_motifs_tiny)
m1 = motifMatrix(sca_motifs_tiny, group = "study") ## VRanges input
m2 = motifMatrix(as(sca_motifs_tiny, "GRanges"), group = "study") ## GRanges input
identical(m1, m2) ## same output
ADD COMMENTlink modified 16 months ago • written 16 months ago by Julian Gehring1.3k

Thanks Julian. It works right.

ADD REPLYlink written 16 months ago by solo777310
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.2.0
Traffic: 146 users visited in the last hour