Entering edit mode
                    6.4 years ago
        marcofraca
        
    
        ▴
    
    20
    Hi to everyone,
I would like to create a BED file with the position hard masked in a fasta file.
This is the hard masked fasta:
>seq1 
ACGTNNNNAGTCAGNNNNACGTC
>seq2
NNNNACGCATGNNNACGT
And this is the output bed file that I want:
seq1 5 9
seq1 16 19
seq2 1 4
seq2 12 14
                    
                
                
the
twoBitInfocommand from kentUtils (available here http://hgdownload.soe.ucsc.edu/admin/exe/linux.x86_64/) has an option-nBedto get a bed file of N stretches. You will need to convert the fasta to twobit by another commandtwoBitToFaalso available at the same site.