Question: Is there any way to write my mutation dataframe to vcf file?
0
gravatar for vinod.acear
14 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 14 months ago by shepherl ♦♦ 1.4k • written 14 months ago by vinod.acear40
Answer: Is there any way to write my mutation dataframe to vcf file?
0
gravatar for shepherl
14 months ago by
shepherl ♦♦ 1.4k
United States
shepherl ♦♦ 1.4k 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 14 months ago by shepherl ♦♦ 1.4k
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: 525 users visited in the last hour