read_angsd_geno_probs: read an angsd binary genotype probability file

Description Usage Arguments Details

View source: R/read_angsd_geno_probs.R

Description

This reads the probabilities into an array that is 3 x num_ind x num_snps. Things get returned in a list that has includes a vector of sample names and a vector of locus names.

Usage

1
read_angsd_geno_probs(gz_geno_file, bamlist, mafs_file)

Arguments

gz_geno_file

path to the genotype file. This is the binary file of doubles that holds the posterior probabilities for each individuals genotype at each locus, and it has to be gzipped. ie., results.genos.gz

bamlist

path to the file that was the bamlist. It is assumed that the names of the bam files are the names of the samples. All the path information is removed (if it exists) and .bam is removed from the end (if it is there.)

mafs_file

the mafs file that comes out of ANGSD. This is used to get information (especially the chrom and position of each variant). It can be gzipped if desired.

Details

The geno probabilities come out in an array indexed by [genotype, sample, snp].


eriqande/genoscapeRtools documentation built on Dec. 27, 2021, 8:01 a.m.