4.4 extractReads

Extract reads overlapping an allele-file

extractReads extracts all reads overlapping an input-allele-file, writing these reads into a new BAM-file.

4.4.1 Parameters

4.4.1.1 Input

--bam Input_bam_file.bam Input bam file
--alleles alleles.txt Allele-File

4.4.2 Output

*_extr.bam BAM file containing extracted reads.

4.4.3 Usage Example

# Simulate a BAM File, write genotypes
atlas simulate --writeTrueGenotypes

# create alleles file from heterozygous positions in genotype-file
echo "Chr Pos Ref Alt" > alleles.txt
gunzip -c ATLAS_simulations_trueGenotypes.vcf.gz | awk '$1!~/#/{if ($5 != ".") {print $1, $2, $4, $5}}' >> alleles.txt

out="extractReads"
atlas --task extractReads --alleles alleles.txt --bam ATLAS_simulations.bam