Question: Is there any way to write my mutation dataframe to vcf file?
0
gravatar for vinod.acear
18 months ago by
vinod.acear40
India
vinod.acear40 wrote:

I want to save a mutation data avalable in df format to a .vcf file, But not getting any way to do this. Please advise

> head(sample.mut.ref)
  Sample  chr      pos ref alt
1      1 chr1   905907   A   T
2      1 chr1  1192480   C   A
3      1 chr1  1854885   G   C
4      1 chr1  9713992   G   A
5      1 chr1 12908093   C   A
6      1 chr1 17257855   C   T
> typeof(sample.mut.ref)
[1] "list"
> class(sample.mut.ref)
[1] "data.frame"

ADD COMMENTlink modified 18 months ago by shepherl ♦♦ 1.7k • written 18 months ago by vinod.acear40
Answer: Is there any way to write my mutation dataframe to vcf file?
0
gravatar for shepherl
18 months ago by
shepherl ♦♦ 1.7k
United States
shepherl ♦♦ 1.7k wrote:

Unfortunately there is no easy way to do this. Your best bet is to look at the vcf constructors in VariantAnnotation package. You could coerace your data.frame into a vcf object using the constructors and then use the write.vcf function.

ADD COMMENTlink written 18 months ago by shepherl ♦♦ 1.7k
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 16.09
Traffic: 348 users visited in the last hour