6.3 ancestralAlleles
Writing FASTA-file with ancestral alleles
The task ancestralAlleles identifies the ancestral state of all loci and outputs them in fasta format. The input file for this task is created by the ATLAS task alleleCounts (usually run using a set of outgroup individuals).
Any positions without data or not fulfilling the parameters requirements of --minorCountMaximum and --totalCountMinimum will be set to N in the output fasta file.
An ancestral states fasta created using this task can be used in other ATLAS tasks such as mutationLoad or saf.
6.3.1 Input
Required inputs :
--alleleCounts Input_file_alleleCounts.txt.gz |
A zipped text file containing the MLE allele counts for all positions and populations. |
--fastaIndex Reference_fasta_file.fasta.fai |
Index file for the reference genome file. |
Optional inputs :
None
Specific Parameters :
--minorCountMaximum integer_value |
To set the maximum count of the minor allele allowed while still accepting the major as ancestral. The lower, the more conservative. Default = the maximum count of minor allele is set to 0. All individuals need to be homozygous for the major allele at a position for it to be set to an ancestral state. |
--totalCountMinimum integer_value |
To set the minimum total allele count. This is the miniumum number of alleles (every individual represents two alleles) present to still accept the major as ancestral. The higher, the more conservative. Eg. if the sample size is 5 individuals, --totalCountMinimum 10 would require every individual to have data at a position for it to be set to an ancestral state. Default = minimum total allele count is set to 0. |
--population pop_name |
Population defined in allele counts that will be used used in this task. Default = first population will be used |
- See Filter parameters to apply specific filters for bases, reads and parsing window setting.
Engine parameters that are common to all tasks can be found here.
6.3.2 Output
| *_ancestralAlleles.fasta | A fasta file containing ancestral alleles. |
| *_ancestralAlleles.fasta.fai | Index file for the fasta file containing ancestral alleles. |
6.3.3 Usage Example
#! /bin/bash
# Set atlas path
atlas=$(dirname "$0")/../build/atlas
# Simulate 5 samples in Hardy–Weinberg Equilibrium and write vcf file
$atlas simulate --vcf --type HW --sampleSize 5
# Create allele-count file with alleles
$atlas alleleCounts --vcf ATLAS_simulations.vcf.gz --outFormat withAlleles
# Create fasta-file with ancetral alleles using the calculated allele counts
$atlas ancestralAlleles --alleleCounts ATLAS_simulations_alleleCounts.txt.gz