This is a test version of Biostars. For the public version, visit https://www.biostars.org.
[R] makeVRangesFromGRanges throws coercing "factor" to "NA" error

Dear all,

When I use makeVRangesFromGRanges (R package VariantAnnotation), I got the following error,

Error in as(mcols(gr)[, i], type[i]) : no method or default for coercing "factor" to "NA"

My operations shown below

> library(SomaticSignatures)
> data(ov_tcga, package = "SomaticCancerAlterations")
> ov_tcga_2_vr <- makeVRangesFromGRanges(ov_tcga, ref.field="Reference_Allele", alt.field = "Tumor_Seq_Allele2")

Error in as(mcols(gr)[, i], type[i]) :

no method or default for coercing "factor" to "NA"

Can anybody help me to solve this problem? Thank.

r sequence

1 answer

Can anyone solve this?

Log in to answer this question.