Is there any way to write my mutation dataframe to vcf file?
1
0
Entering edit mode
vinod.acear ▴ 50
@vinodacear-8884
Last seen 4.3 years ago
India

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"

writevcf vcfr mutationalpattern deconstructSigs synbreed • 2.6k views
ADD COMMENT
0
Entering edit mode
shepherl 4.1k
@lshep
Last seen 10 hours ago
United States

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 COMMENT

Login before adding your answer.

Traffic: 604 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