I have a GRangesList of exons by geneID that I want to export as a GTF file for some other programs. I have tried the following:
export(unlist(grl), '~/Desktop/exon.gtf')
However, column 3 of the gtf file lists sequence_feature rather than exon and the attributes column lists ID "ENSMUSG..." rather than the typical gene_id "ENSMUSG...". I realize that I can change these pretty easily afterwards with a script, but I was wondering if there is a way to modify the export behavior? Thanks
I have found a way to export a GTF so that the 3rd column no longer lists sequence_feature but instead lists the feature, such as exon or stop_codon. I did this as follows:
and then I exported as normal. Adding a metadata column that has the heading type means that the export function will us that to name column 3 rather than the default sequence_feature.