Skip to content
r-blanchet edited this page Oct 17, 2022 · 1 revision

Welcome to the BAM_QC wiki!

This tool is meant to compute a few basic metrics over alignment files (BAM or CRAM format). Mean Insert size, percentage of unmapped or OFF-Target reads are computed for each sample. The relatedness for sample couple is also tested. Sample information are then summarized in TSV tables.

Requirements

To run this workflow, conda is required and mamba is strongly recommended. Please note that it has been developed on a linux operating system.

To create the environment to run the workflow, just run the following command: mamba create -n snake_env -c bioconda -c conda-forge snakemake numpy matplotlib

Activate this environment via the command: conda activate snake_env

Testing

A test of the workflow can be performed by running the script .test/get_files.sh to downlaod required files. Note that the reference genome and the sites file from the .test/data_test directory can be used for your own analysis.

Once files have been downloaded, you can run the test through the command snakemake -s workflow/Snakefile.smk -j 5 --use-conda --configfile .test/config.yaml

Parameters

All settings can be modified from the config/config.yaml file. The table underneath describes them.

parameter description default
CRAM_list List of input files (use absolute paths). 1 per line. None (Required)
reference A reference file in FASTA format (can be bgzipped). None (Required)
samples_list List of samples to be processed, 1 per line (Should match the sample names indicated in the alignment files). None (Required)
regions Target regions in bed format None (Required)
sites_som Sites to be used to compute relatedness, in VCF format (see https://github.com/brentp/somalier/releases). None (Required)
prefix Prefix to use for output files. 'alignmentQC'
outdir Path to output directory. '.'
tempdir Path to working directory. An alternative is to use the snakemake --workdir option. '.'

Running the script.

The workflow can be launched using the command snakemake -s workflow/Snakefile.smk -j <n_threads> --use-conda. Default configuration file will be config/config.yaml.

Clone this wiki locally