Many thanks for these links. Your solution with flex work well.
• 0 views
•
link
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
duplicate : Identifying long stretches of Ns ; Annotating/Finding "NNNNNN" scaffold gaps in genome assembly
This tools : https://github.com/BGI-shenzhen/Reseqtools by this : iTools Fatools findN -InPut in.fa -OutPut N_Region.bed
Log in to answer this question.
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.