create_profile {seqCAT} | R Documentation |
Create an SNV profile from data in a VCF file.
create_profile(vcf_file, sample, output_file, min_depth = 10, filter = TRUE, python = FALSE)
vcf_file |
The VCF file from which the profile will be created (path). |
sample |
The sample in the VCF for which a profile will be created (character). |
output_file |
The output file with the SNV profile (path). |
min_depth |
Remove variants below this sequencing depth (integer). |
filter |
Remove variants not passing filtering criteria (boolean). |
python |
Extract variants using Python instead of R (boolean). |
This function creates a SNV profile from a given VCF file by extracting the variants that pass the filtering criterias. It can either be performed using R, or by the create_profile.py function included (which requires that Python is installed, along with the PyVCF package). Profile creation is performed to facilitate and accelerate the cell authentication procedures, which is especially relevant when more than one pairwise comparison will be performed on the same sample.
Does not return any data object, but outputs results to output_file (to save computational time from having to repeatedly create profiles).
# Path to the test VCF file vcf_file = system.file("extdata", "test.vcf.gz", package = "seqCAT") # Create SNV profiles ## Not run: create_profile(vcf_file, "sample1", "profile1.txt") create_profile(vcf_file, "sample1", "profile1.txt", min_depth = 15) create_profile(vcf_file, "sample1", "profile1.txt", python = TRUE) ## End(Not run)