Parsing GTF
We have provided several utility scripts to parse GTF files into tab-delimited files, which allows users to easily use table operations (e.g., working as dataframes in R or pandas in Python) to manipulate the data.
The scripts will extract either the gene, transcript, or exon information from the GTF file.
- Gene information:
extract_gene_from_gtf.py - Transcript information:
extract_transcript_from_gtf.py - Exon information:
extract_exon_from_gtf.py
To make use of the scripts, users can run the following command:
python3 extract_gene_from_gtf.py <path_to_gtf_file> <output_file>
The output file will be a tab-delimited file containing gene/transcript/exon attributes.