6.7 majorMinor
Estimating major and minor alleles
majorMinor infers the major and minor alleles from a population sample and outputs the genotype likelihoods in a vcf file. This task requires the sample-specific genotype likelihoods in glf format, which can be created with the ATLAS task GLF. The resulting vcf file can be used as an input to ANGSD.
The major and minor alleles can be estimated using the method described by Skotte et al. (2012) or using the MLE method. The MLE method estimates the genotype frequencies simultaneously with the two alleles present at a site. The variant quality is the likelihood ratio of a model with variants and a model without variants.
6.7.1 Input
Required inputs :
--glf glf_file1.glf.gz,glf_file2.glf. or --glf glf_file.txt |
Input glf files for every sample of the population. Can be provided on the command line or with an input text file (one file name per line). |
Example input file listing all glf files:
glf_file_1.glf.gz
glf_file_2.glf.gz
glf_file_3.glf.gz
glf_file_4.glf.gz
Optional inputs :
--sampleNames sample_name1,sample_name2 or --sampleNames samples.txt |
Provide alternative sample names. Number of provided sample names needs to match number of GLF files. Default = will deduce sample names from GLF file names. |
--fasta Input.fasta |
Reference genome. If provided, the major will match the reference and the minor will identify the most likely alternative allele. |
Example input file listing the alternative sample names:
sample1
sample2
sample3
sample4
Specific Parameters :
--method method_name |
Estimates major/minor alleles using the indicated method. Two options available Skotte and MLE. Default = MLE. |
--maxF numeric_value |
maximum value of the likelihood function with respect to the parameter theta. Default = 1e-07. |
--filterN |
Will exclude sites where reference is ‘N’. This parameter requires --fasta to be set. |
--noPhredLik |
Only write raw likelihood, which are higher precision. This will limit the number of external programs able to read this vcf (eg. BCFTools requires phred-scaled likelihoods in a vcf input file). Default = both raw likelihoods and phred-scaled likelihoods are written. |
--noLogLik |
Only write likelihood transformed onto the Phred quality score scale. This will save space but lead to loss of precision and thus power. Default = both raw likelihoods and phred-scaled likelihoods are written. |
--minSamplesWithData integer_value |
To keep only sites for which at least the indicated number of samples have data. Default = 1. |
--minMAF numeric_value |
To keep only sites for which minor allele frequency is at the least the indicated number. Default = all sites are kept regardless of minor allele frequency. |
--limitSites integer_value |
To write likelihoods only up to the indicated input position. Default = disabled. |
--noVCFHeader |
Will refrain from printing the header in the output vcf file. Default = disabled. |
Engine parameters that are common to all tasks can be found here.
6.7.2 Output
| *_majorMinor.vcf.gz | One multi-sample VCF-file, containing the likelihoods of the genotypes consisting of the major and minor allele. |
6.7.3 Usage Example
#! /bin/bash
# Set atlas path
atlas=$(dirname "$0")/../build/atlas
# Simulate 5 BAM files in Hardy–Weinberg equilibrium
$atlas simulate --type HW --sampleSize 5
# Create GLF files
for f in *.bam; do
$atlas GLF --bam $f
done
samples=$(ls -1 *.glf.gz | paste -s -d ',' -)
# Estimate major and minor allele
$atlas majorMinor --glf $samples --fasta ATLAS_simulations.fasta