VCF to CSV Conversion What is this work about? This work is part of a research project that studies genetic variants in patients using Next-Generation Sequencing (NGS) technology. NGS produces large amounts of genetic data that are stored in a special file format called VCF (Variant Call Format). These VCF files contain information about genetic mutations or variants found in each patient's DNA sample. What problem does this solve? VCF files are not easy to read or analyse directly using standard tools like Microsoft Excel. To make the data easier to work with, this script automatically converts VCF files into CSV (Comma-Separated Values) format — a simple spreadsheet format that can be opened and analysed in Excel or any statistical software. How does the script work? (Step by step) Step 1 — Install tools: The script first checks whether two required R packages (vcfR and data. table) are already installed on the computer. If they are not, it installs them automatically. Step 2 — Read VCF files: It reads each VCF file from a specified folder on the computer (in this case, the folder containing the variant annotation data from the ICMR project). Step 3 — Extract the data: It pulls out all the important information from each VCF file — including details like chromosome position, reference and alternate alleles, quality scores, and genotype information for each sample. Step 4 — Save as CSV: Each VCF file is then saved as a corresponding CSV file in a new subfolder called "CSVOutput" inside the same folder. Step 5 — Batch processing: The script processes all VCF files in the folder automatically, one by one, without needing to open each file manually. Why is this useful for the research? Converting VCF files to CSV makes it much easier for researchers to filter, sort, and analyse genetic variant data using familiar tools. It saves significant time compared to manually handling each file and ensures that no data is lost or misread during the process. This is especially important when working with large NGS datasets from multiple patient samples, as is the case in this ICMR-funded project. Tools and Software Used Programming Language: R (a free, open-source statistical computing language) Package — vcfR: Used to read and parse VCF files Package — data. table: Used to efficiently write large data files as CSV Funding This work is funded by the Indian Council of Medical Research (ICMR), Government of India, under the Research Project entitled "A Liquid Biopsy Panel as a Non-invasive Alternative to Liver Biopsy for NAFLD: A Cross-sectional Study", to Dr. Usha Sachidananda Adiga. Reference No.: 5/4/8-15/CD/USA/2022-NCD-II.
Adiga et al. (Sat,) studied this question.