This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Extracting all the genes without introns for a species

Hi All,

I was wondering if there is a quick way to extract all the genes without introns for a species from the gff file?

Thanks, RT

introns

What do you mean by a gene without introns? mRNA (spliced transcript)? What you want to achieve when threre are isoforms? Extract each isoform independently or create a chimere by merging all possible isoforms in one single feature?

1 answer

you're looking for transcripts having count(exon)==1. So it's something like:

wget -O - -q "https://ftp.ebi.ac.uk/pub/databases/gencode/Gencode_human/release_42/gencode.v42.annotation.gff3.gz" |\
gunzip -c |\
awk '($3=="exon")' |\
cut -f 9 |\
tr ";" "\n" |\
grep '^transcript_id=' |\
cut -f2 -d '=' |\
sort |\
uniq -u

Log in to answer this question.