Defines functions vcf2lfmm

Documented in vcf2lfmm

vcf2lfmm <- function(    input.file,
            output.file = NULL,
            force = TRUE) 
    # test arguments and init
    # input file
        stop("'input.file' argument is missing.")
    else if (!is.character(input.file))
        stop("'input.file' argument has to be of type character.")
    # check the extension
    test_extension(input.file, "vcf");
    # output file    
    if (!missing(output.file) && !is.character(output.file))
        stop("'output.file' argument has to be of type character.")
    else if (missing(output.file))
        output.file = setExtension(input.file, ".geno")
        # skip
        if (!force && file.exists(input.file) && file.exists(output.file)) {
#                print(cat("'", output.file, "' already exists!", sep=""))

    # conversion
    tmp.file = vcf2geno(input.file);
    output.file = geno2lfmm(tmp.file);

    # create output 

Try the LEA package in your browser

Any scripts or data that you put into this service are public.

LEA documentation built on Nov. 8, 2020, 8:19 p.m.