Newer
Older
# coding: utf-8
__author__ = 'Maria BERNARD- Sigenae'
__version__ = '1.0.0'
'''
Mask variant sites in the reference genome
'''
rule maskFasta:
input:
ref = config['fasta_ref'],
vcf = 'Results/vcfFiltration/' + os.path.basename(config['vcf']).replace('.vcf.gz','') + '_SNP_exclude_nonVar.vcf.gz'
output:
ref = 'Results/genomeMasked/' + os.path.splitext(os.path.basename(config['fasta_ref']))[0] + '_masked.fa'
shell:
"""
bedtools maskfasta -fi {input.ref} -bed {input.vcf} -fo {output.ref}
"""