How to write dataframe after converting vcf file to tidy dataframe with vcfR2tidy function in R

39 Views Asked by At

Goal

Convert vcf file from genome of the plant to data frame.

Code

file.name = vcfR2tidy(myfile, 
                      single_frame = "TRUE", 
                      info_fields = c("AC", "AN", "MQ"),
                      format_fields = c("GT", "PL"))

which runs successfully. However, when I try to write

write. table(vcfsmBO02tidy, 
             file = "vcfsmB001tidy", 
             append = FALSE, 
             quote = FALSE, 
             sep = "\t", 
             row. names = FALSE)

an error occurs:

Error in (function (..., row. names = NULL, check.rows = FALSE, check. names = TRUE, Argumente implizieren unterschiedliche Anzahl zeilen: 485723, 5

~ different number of rows.


Picture of console:

enter image description here

0

There are 0 best solutions below