since the annotated gene always possesses more than one copy of mRNA, and we need to use a sequence of CDS to represent its gene sequce, so we need to extract the longest mRNA or CDS to perform the following analysis. here the script is suitble for extracting the sequence