I know you want to help but please check the requirements in original question before you provide answers.
But I want to highlight these sequences (exons only) in the downloaded GenBank file.
Your solution does not satisfy that requirement. It only retrieves the sequence.
Sequence is normally in text format so any annotation (like the highlighting that you refer to) is applied on top/after the fact.
You may be able to use UCSC Table browser which offers an option of downloading genomic sequences with
Exons in upper case, everything else in lower case. That may fit your need of being able to distinguish the exons from the rest of the sequence.Hi genomax,
Thank you for replying. Your suggestion is the most close to what I need. Also, on Ensemble you can download the sequence with exons highlighted in the RTF (Rich Text Format).
https://useast.ensembl.org/Homo_sapiens/Gene/Sequence?g=ENSG00000133703;r=12:25204789-25250936
However, as you and Sej mentioned there is no other way to highlight a sequence in Genbank format.
Thank you for your help!!!
If you are after coding sequences then following would work:
However, like genomax2 mentioned in the comment, it is not possible to 'highlight sequences'.