TITLE: Investigation of ancestral alleles in the Bovinae subfamily
AUTHORS: Maulana Naji, Yuri Utsunomiya, Johann Sölkner, Benjamin Rosen, Gábor Mészáros

[DESCRIPTION]
<div class = "text-blocks"><div class = "text-block">In evolutionary theory, divergence and speciation can arise from long periods of reproductive isolation, genetic mutation, selection and environmental adaptation. After divergence, alleles can either persist in their initial state (ancestral allele - AA), co-exist or be replaced by a mutated state (derived alleles -DA). Defining AA and DA at polymorphic sites is useful to test hypotheses regarding molecular evolutionary processes, including estimation of allelic age, formation of linkage disequilibrium patterns and selection signatures. In this study, we aligned whole genome sequences of individuals from the Bovinae subfamily (gaur, yak, bison, wisent, gayal, and cattle) to the cattle reference genome (ARS.UCD-1.2). We then identified sequence variants in three outgroups, i.e. yak, bison and gayal-gaur-banteng. Accommodating independent divergent of each lineage from the initial ancestral state, AA were defined based on fixed alleles on at least two groups resulting in ~32.4 million variants. Using non-overlapping scanning windows of 10 Kb, we counted the AA observed within taurine and zebu cattle. We focused on the extreme points, regions with top 0.1% (high count) and regions without any occurrence of AA (null count). As mutation occurs across autosome independently, high count regions preserved gene functions from ancestral states that are still beneficial in the current condition, while null counts regions were linked to mutated ones. Gene ontology terms were inferred for functionality of referred regions. For both cattle, high count regions were associated to basal lipid metabolism which is essential on surviving of various condition pressures. Mutated regions were associated to productive traits in taurine such as higher metabolism, cell development and behaviors. While for zebu, mutation appeared for adaptation to marginal environment showed mainly by function in immune response domain. Our findings suggest that retaining and losing AA in some genes or regions are varied and made it species-specific with possibility of overlapping as it depends on the selective pressure they had to experience.</div></div>

[STEPS]
?. [Reads alignment and variant calling on individuals separately]
Download Read Sequences in format of SRA FASTQ
?. [Reads alignment and variant calling on individuals separately]
Mapping with BWA-Mem
?. [Reads alignment and variant calling on individuals separately]
Individual Haplotype Calling
?. [Joint analysis of individuals]
Combine GVCFs
?. [Joint analysis of individuals]
Genotype GVCFs
?. [Joint analysis of individuals]
Split VCF
?. [Joint analysis of individuals]
Getting name of individuals in vcf
?. [Joint analysis of individuals]
Reheader VCF files with new individuals name
?. [Principal Component Analysis]
Creating PCA Plot using PLINK
?. [Principal Component Analysis]
Convert VCF file into plink format using VCFTools
?. [Principal Component Analysis]
Pruning Plink file and create mds plot with four components
?. [Principal Component Analysis]
Plotting the output of plink mds us
?. [Phylogenetic analysis]
Creating Phylogenetic Trees
?. [Phylogenetic analysis]
Splitting VCF by chromosome
?. [Phylogenetic analysis]
Reducing redundant variants by LD
?. [Phylogenetic analysis]
Visualize the tree per chromosome wise
Manually visualize the trees using MEGAX https://www.megasoftware.net/ using SNPhylo outputs with intial tree built using maximum parsimony method and bootstrap 200 using maximum likelihood of Jukes Cantor Model
?. [Inferring Ancestral Alleles]
Defining ancestral alleles
We defined ancestral alleles of cattle as alleles fixed in at least two outgroup of bison, yak and gayal-gaur-banteng. In the steps of 12, 13, and 14, R-scripts used several in-house functions written in https://github.com/mas-agis/ances-al . Simply copy and run the functions in the R-environment before running the intended script, we will put description on which function to be loaded on the description.
?. [Inferring Ancestral Alleles]
Getting allele frequency for chromosome 1 to 29
?. [Joint analysis of individuals]
Variant Filtration
?. [Inferring Ancestral Alleles]
Filtering sites with allele frequency of 1 for each group and then combined between bison, yak and gayal-gaur-banteng.
?. [Comparisons to cattle group]
Comparisons ancestral allele in subset of taurus and indicus group
We compared the frequency file of cattle to the ancestral allele file named as "Additional file 2.txt" generated in step 12.2. Example below is only demonstration script for taurine cattle comprising of 23 individuals. For zebu cattle, should be done in similar manner with changing respective parameters.
?. [Comparisons to cattle group]
Getting alele frequency for taurine cattle
?. [Comparisons to cattle group]
Persisting ancestral allele in taurine
?. [Comparisons to cattle group]
Preparing for annovar input
?. [Comparisons to cattle group]
Checking whether regions without AA due to non-existing defined AA or reckoned mutation
?. [Comparisons to cattle group]
Creating manhattan plot based on ancestral allele
?. [Comparisons to cattle group]
Getting average of ancestral allele
?. [Gene annotation using annovar]
Gene annotation using annovar https://doc-openbio.readthedocs.io/projects/annovar/en/latest/ with input from previous step 13.4
?. [Gene annotation using annovar]
Moving input files to annovar directory
?. [Gene annotation using annovar]
Gene annotation with respective regions with high and without ancestral allele
?. [Gene annotation using annovar]
Listing genes without indel and duplication
?. [Gene annotation using annovar]
Filtered out genes found in regions without AA from regions with high AA
?. [Gene Ontology analysis]
Gene Ontology analysis using https://david.ncifcrf.gov/summary.jsp
Running GO analysis by pasting gene names from Sites21Gene.txt in step 14.3 for regions without ancestral allele and Sites19GeneEdit.txt in step 14.4 for regions with high count of ancestral alleles. Our interests were Biological Process (BP) related to GO term.