How Do I create a BED file from an hard masked fasta?
2
0
Entering edit mode
5.5 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
genome sequencing • 2.7k views
ADD COMMENT
0
Entering edit mode

the twoBitInfo command from kentUtils (available here http://hgdownload.soe.ucsc.edu/admin/exe/linux.x86_64/) has an option -nBed to get a bed file of N stretches. You will need to convert the fasta to twobit by another command twoBitToFa also available at the same site.

ADD REPLY
2
0
Entering edit mode

Many thanks for these links. Your solution with flex work well.

ADD REPLY
1
Entering edit mode

enter image description here

ADD REPLY
0
Entering edit mode
17 days ago
hewm2008 ▴ 50

This tools : https://github.com/BGI-shenzhen/Reseqtools by this : iTools Fatools findN -InPut in.fa -OutPut N_Region.bed

ADD COMMENT

Login before adding your answer.

Traffic: 1465 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6