This is a test version of Biostars. For the public version, visit https://www.biostars.org.
how to create a gff3 file of gap regions in an assembly?

Hi.

I would like to generate a gff3 file of gap regions ('N') in an assembly. Is there a fast way/script to do that?

Thanks Michael

assembly

1 answer

Ultrafast solution

toy fasta file

$ cat fasta.fa 
>1
TGTACGTNNATT
>2
TTTAANNTTTNN
>3
NNTT
TTNN

solution using seqkit

seqkit locate -p N+ fasta.fa --gtf -P

output

1   SeqKit  location    8   9   0   +   .   gene_id "N+"; 
2   SeqKit  location    6   7   0   +   .   gene_id "N+"; 
2   SeqKit  location    11  12  0   +   .   gene_id "N+"; 
3   SeqKit  location    1   2   0   +   .   gene_id "N+"; 
3   SeqKit  location    7   8   0   +   .   gene_id "N+";

Dear Vijay. Thanks for the fast reply! I will give it a try. Michael

Log in to answer this question.