6.9 saf

Estimating Site Allele Frequencies

Site Allele Frequency files generated using the are saf task can be used as input files to generate SFS (site frequency spectra) with tools such as winsfs. If the goal is to generate folded SFS, --fasta should be the reference genome. If the goal is to generate unfolded SFS, --fasta should contain the ancestral alleles of outgroup data (the ancestral state), which can be generated using the task alleleCounts followed by ancestralAlleles. This task requires the sample-specific genotype likelihoods in glf format, which can be created with the ATLAS task GLF.

6.9.1 Parameters

6.9.1.1 Input

--glf glf_file1.glf.gz,glf_file2.glf. or glfList.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).

6.9.1.2 Specific Parameters

Parameter Description Default
--minSamplesWithData value Keep only sites for which at least the indicated number of samples have data. 1

6.9.2 Output

*_saf.idx SAF index file.
*_saf.gz SAF entry file.
*_saf.pos.gz SAF position file.

6.9.3 Usage Example

# 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 ',' -)

# Create site allele frequencies file
atlas saf --glf $samples --fasta ATLAS_simulations.fasta