comparison multilocus_genotype.R @ 10:6c93244a36e2 draft

Uploaded
author greg
date Wed, 05 Dec 2018 11:31:49 -0500
parents 8f2f346a5e1c
children ea2914ddea50
comparison
equal deleted inserted replaced
9:8f2f346a5e1c 10:6c93244a36e2
75 # TODO: probably should not hard-code 2 cores. 75 # TODO: probably should not hard-code 2 cores.
76 gl <- vcfR2genlight(vcf, n.cores=2); 76 gl <- vcfR2genlight(vcf, n.cores=2);
77 gind <- new("genind", (as.matrix(gl))); 77 gind <- new("genind", (as.matrix(gl)));
78 78
79 # Add population information to the genind object. 79 # Add population information to the genind object.
80 poptab <- read.table(opt$input_pop_info, check.names=FALSE, header=F, na.strings=c("", "NA"), stringsAsFactors = FALSE); 80 poptab <- read.table(opt$input_pop_info, check.names=FALSE, header=F, na.strings=c("", "NA"), stringsAsFactors=FALSE, sep="\t");
81 colnames(poptab) <- c("row_id", "affy_id", "user_specimen_id", "region"); 81 colnames(poptab) <- c("row_id", "affy_id", "user_specimen_id", "region");
82 gind@pop <- as.factor(poptab$region); 82 gind@pop <- as.factor(poptab$region);
83 83
84 # Convert genind object to a genclone object. 84 # Convert genind object to a genclone object.
85 obj2 <- as.genclone(gind); 85 obj2 <- as.genclone(gind);