This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Count all (non N) nucleotides within regions defined in BED file

Is there an easy way with some tool or library to count all (non N) nucleotides within regions defined in BED file?

Of course in combination with the reference genome fasta on which the regions are defined.

This to check that all (non N) nucleotides of the reference fasta are in 1 region of the BED file?

bed fasta

1 answer

You can extract sequences for bed regions using "getfasta" followed by base counting using any of the options provided here

Thank you. I'll use the pyfastx fasta composition to compare the content of the getfasta and original fasta file. Also added that option to the linked question.

Log in to answer this question.