<commit_before>#angsd-wrapper
=============

Wrapper scripts and documentation to make angsd more usable

*Updated documentation added in wiki.*


Table of Contents:

0. [Usage](#usage)
1. [Overview](#overview)
2. [Configuration file guide](#config)
3. [ANGSD guide](#angsd)

##0. <a name="usage"></a>Usage

    $ bash scripts/ANGSD_SFS.sh scripts/SFS_example.conf

Scripts should be invoked with `bash` and executed from the toplevel directory so the paths are correct. 

##1. <a name="overview"></a>Overview
The scripts contained in this directory have been created to make the ANGSD workflow easier to use. It contains scripts from the [Ross-Ibarra](https://github.com/rossibarra/angsbigd) and [Morrell](https://github.com/MorrellLAB/angsbigd) labs. 

[ANGSD](https://github.com/ANGSD/angsd) is included in this repository as a [git subtree](https://hpc.uni.lu/blog/2014/understanding-git-subtree/). This allows the repository to keep up with the latest changes to ANGSD, and ensures a consistent version of ANGSD. If you need to pull the latest changes to angsd, use the following git command:

    git subtree pull --prefix=angsd --squash angsd master

Note, you will have to run `make` in the angsd directory to make the executables. 

##2. <a name="config"></a>Configuration file guide
###Config syntax 
Configuration files are interpreted by the script as pure bash. As such, they should follow bash syntax to avoid any errors. A full list of variables follows:
###SFS
####Required variables

- `UNIX_USER`: this variable fills in absolute paths for the rest of the config file and script. It should match the name of the user's home directory.
- `ANC_SEQ`: the path to the ancestral sequence file
- `REF_SEQ`: the path to the reference sequence file
- `TAXON`: the name of the data being analyzed. The script will look for files in the data directory with this name. These files include: `${TAXON}_samples.txt` and `${TAXON}_F.txt`. If these files are not present, the script will not work correctly. `${TAXON}_samples.txt` contains a list of paths to BAM files. Check the data folder for an example. `${TAXON}_F.txt` contains inbreeding coefficients for each of these samples. Check the data folder for an example.

####Optional variables

These variables can be included and will override the default values. 
- `DO_SAF` create SFS (default=2)
- `UNIQUE_ONLY` uniquely mapped reads (default=1)
- `MIN_BASEQUAL` minimum base quality (default=20)
- `BAQ` adjust qscores around indels (as SAMtools) (default=1)
- `MIN_IND` minimum number of individuals needed to use site (default=1)
- `GT_LIKELIHOOD` estimate genotype likelihoods (default=2)
- `MIN_MAPQ` minimum base mapping quality to use (default=30)
- `N_CORES` number of cores to use (default=32)
- `DO_MAJORMINOR` estimate major/minor alleles (default=1)
- `DO_MAF` calculate per site frequencies (default=1)
- `REGIONS` chromosome and region to use (default="1:")
- `OVERRIDE` this variable will redo analyses. Set to `false` if you want to skip 
- `SLIDING_WINDOW` this variable, when set to `true` will enable sliding window analysis
- `WIN` window size for sliding window analysis
- `STEP` step size for sliding window analysis
##3. <a name="angsd"></a>ANGSD guide
Coming soon!<commit_msg>updated readme. closes #24<commit_after>#angsd-wrapper
=============

Wrapper scripts and documentation to make angsd easier to use.

### Documentation available on  the [wiki](https://github.com/arundurvasula/angsd-wrapper/wiki).


### Supported methods

- [SFS](https://github.com/arundurvasula/angsd-wrapper/wiki/Site-Frequency-Spectrum)
- [Thetas](https://github.com/arundurvasula/angsd-wrapper/wiki/Thetas)
- [2D SFS](https://github.com/arundurvasula/angsd-wrapper/wiki/2D-Site-Frequency-Spectrum)
- [Fst](https://github.com/arundurvasula/angsd-wrapper/wiki/ngsTools-FST)

### Contributing
Contributions are very welcome! You can help by submitting [issues](https://github.com/arundurvasula/angsd-wrapper/issues) on Github or by forking the repository and making changes yourself.

{'fraction_non_alphanumeric': 0.1092707045735476, 'fraction_numerical': 0.007416563658838072, 'mean_word_length': 4.829971181556196, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 10, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6042505', 'n_tokens_mistral': 1253, 'n_tokens_neox': 1184, 'n_words': 474}