This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Masking Y chromosomes

Hi, I am working on masking chromosome on the Y chromosome. I can see that I need a mask.bed file for input but do not understand how to generate the mask.bed file itself. Is the mask.bed file the coordinates of the chromosome? This is the code I would be using:

  xyalign 
    --PREPARE_REFERENCE 
    --ref reference.fasta   
    --output_dir sample1_output 
    --sample_id sample1 
    --cpus 4 
    --reference_mask mask.bed      
    --x_chromosome chrX 
    --y_chromosome chrY

Any help understanding how to generate the mask.bed would be great! Many thanks.

genome whole generation sequencing wgs bash

1 answer

I have used bedtools maskfasta for similar purposes, but the rationale behind should be the same: if you want to mask a region, then you must define that region. And of course, if you want to mask the entire Y chromosome, then the bed file should contain the Y chromosome coordinates, which you may find in the reference.fasta.fai file if you have your fasta reference already indexed (and if not I would suggest you to do so in order to perform the masking properly).

Log in to answer this question.