motifMatrix input object type, confused VRange and GRange
1
0
Entering edit mode
solo7773 ▴ 10
@solo7773-11037
Last seen 7.8 years ago

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?

somaticsignatures • 1.3k views
ADD COMMENT
1
Entering edit mode
Julian Gehring ★ 1.3k
@julian-gehring-5818
Last seen 5.5 years ago

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 COMMENT
0
Entering edit mode

Thanks Julian. It works right.

ADD REPLY

Login before adding your answer.

Traffic: 718 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6