GFFREAD(1)
β¨ NAME β¨
gffread β bestie, it's a GFF/GTF utility π and it's giving format conversions, region filtering, and FASTA sequence extraction all at once. A whole triple threat, honestly.
π¦ SYNOPSIS π¦
gffread <input_gff> [-g <genomic_seqs_fasta> | <dir>][-s
<seq_info.fsize>] [-o <outfile.gff>] [-t <tname>] [-r
[[<strand>]<chr>:]<start>..<end> [-R]] [-CTVNJMKQAFPGUBHZWTOLE] [-w
<exons.fa>] [-x <cds.fa>] [-y <tr_cds.fa>] [-i <maxintron>] [--sort-by
<refseq_list.txt>]
π DESCRIPTION π
okay so β gffread filters and converts GFF3/GTF2 records, extracts the corresponding sequences, and generally does the most. π
By default β that's without -O, bestie β it only processes transcripts and ignores every other feature. Just transcripts. Nothing else. Periodt.
<input_gff> is a GFF file. And here's a cute trick: use '-' for stdin. π«Ά
π OPTIONS π
-iβ discard transcripts having an intron larger than<maxintron>. Big introns? gone. π-lβ discard transcripts shorter than<minlen>bases. Tiny transcripts, we don't know them. π-rβ only show transcripts overlapping coordinate range<start>..<end>(on chromosome/contig<chr>, strand<strand>if provided). It's a vibe check but for coordinates. π-Rβ for the-roption, discard all transcripts that are not fully contained within the given range. No partial overlaps allowed, we're being strict bestie.-Uβ discard single-exon transcripts. Bye π-Cβ coding only: discard mRNAs that have no CDS features.--ncβ non-coding only: discard mRNAs that have CDS features.--ignore-locusβ discard locus features and attributes found in the input. Ignore it, it's not real to us. β¨-Aβ use the description field from<seq_info.fsize>and add it as the value for a'descr'attribute to the GFF record.-sβ<seq_info.fsize>is a tab-delimited file providing this info for each of the mapped sequences:<seq-name><seq-length><seq-description>(useful for the-Aoption with mRNA/EST/protein mappings).
π Sorting π
by default, chromosomes are kept in the order they were found β the original order, no notes. π«Ά
--sort-alphaβ chromosomes (reference sequences) are sorted alphabetically.--sort-byβ sort the reference sequences by the order in which their names are given in the<refseq.lst>file.
π Misc options π
-Fβ attempt to preserve all GFF attributes preservation.--keep-exon-attrsβ for the-Foption, do not attempt to reduce redundant exon/CDS attributes.-Gβ do not keep exon attributes, move them to the transcript feature (for GFF3 output).--keep-genesβ in transcript-only mode (the default), also preserve gene records.--keep-commentsβ for GFF3 input/output, try to preserve comments.-Oβ process other non-transcript GFF records (by default non-transcript records are ignored). The main character switch fr.-Vβ discard any mRNAs with CDS having in-frame stop codons (requires-g).-Hβ for the-Voption, check and adjust the starting CDS phase if the original phase leads to a translation with an in-frame stop codon.-Bβ for the-Voption, single-exon transcripts are also checked on the opposite strand (requires-g).-Pβ add transcript level GFF attributes about the coding status of each transcript, including partialness or in-frame stop codons (requires-g).--add-hasCDSβ add a"hasCDS"attribute with value"true"for transcripts that have CDS features.--adj-stopβ stop codon adjustment: enables-Pand performs automatic adjustment of the CDS stop coordinate if premature or downstream.-Nβ discard multi-exon mRNAs that have any intron with a non-canonical splice site consensus (i.e. notGT-AG,GC-AGorAT-AC). If your splice sites aren't canon, you're not invited. π-Jβ discard any mRNAs that either lack initialSTARTcodon or the terminalSTOPcodon, or have an in-frame stop codon (i.e. only print mRNAs with a complete CDS).--no-pseudoβ filter out records matching the'pseudo'keyword. Fake, so we don't claim it. π--in-bedβ input should be parsed as BED format (automatic if the input filename ends with.bed*).--in-tlfβ input GFF-like one-line-per-transcript format without exon/CDS features (see the--tlfoption below); automatic if the input filename ends with.tlf).
π§ Clustering π§
-M/--mergeβ cluster the input transcripts into loci, discarding"duplicated"transcripts (those with the same exact introns and fully contained or equal boundaries).-d <dupinfo>β for the-Moption, write duplication info to file<dupinfo>.--cluster-onlyβ same as-M/--mergebut without discarding any of the "duplicate" transcripts, only create"locus"features.-Kβ for the-Moption: also discard as redundant the shorter, fully contained transcripts (intron chains matching a part of the container).-Qβ for the-Moption, no longer require boundary containment when assessing redundancy (can be combined with-K); only introns have to match for multi-exon transcripts, and>=80%overlap for single-exon transcripts.-Yβ for the-Moption, enforce-Qbut also discard overlapping single-exon transcripts, even on the opposite strand (can be combined with-K).
π Output options π
--force-exonsβ make sure that the lowest level GFF features are considered"exon"features.--gene2exonβ for single-line genes not parenting any transcripts, add an exon feature spanning the entire gene (treat it as a transcript).-Dβ decode url encoded characters within attributes.-Zβ merge very close exons into a single exon (whenintron size<4).-gβ full path to a multi-fasta file with the genomic sequences for all input mappings, OR a directory with single-fasta files (one per genomic sequence, with file names matching sequence names).-wβ write a fasta file with spliced exons for each GFF transcript.-xβ write a fasta file with spliced CDS for each GFF transcript.-yβ write a protein fasta file with the translation of CDS for each record.-Wβ for the-wand-xoptions, write in the FASTA defline the exon coordinates projected onto the spliced sequence; for the-yoption, write transcript attributes in the FASTA defline.-Sβ for the-yoption, use'*'instead of'.'as stop codon translation.-Lβ Ensembl GTF to GFF3 conversion (implies-F; should be used with-m).-mβ<chr_replace>is a name mapping table for converting reference sequence names, having this 2-column format:<original_ref_ID><new_ref_ID>
WARNING: all GFF records on reference sequences whose original IDs are not found in the 1st column of this table will be discarded! bestie please check your table, this one is not a drill π
-tβ use<trackname>in the 2nd column of each GFF/GTF output line.-oβ print the GFF records to<outfile.gff>(those that passed any given filters). Use-o-to enable printing of to stdout.-Tβ for the-ooption, output will be GTF instead of GFF3.--bedβ for the-ooption, output BED format instead of GFF3.--tlfβ for the-ooption, output"transcript line format"which is like GFF but exons, CDS features and related data are stored as GFF attributes in the transcript feature line, like this:
exoncount=N;exons=<exons>;CDSphase=<N>;CDS=<CDScoords>
<exons> is a comma-delimited list of exon_start-exon_end coordinates; <CDScoords> is CDS_start:CDS_end coordinates or a list like <exons>;
-v,-Eβ expose (warn about) duplicate transcript IDs and other potential problems with the given GFF/GTF records.
π AUTHOR π
This manpage was written by Andreas Tille for the Debian distribution and can be used for any other usage of the program. π«Ά giving credit where credit is due, always.
and that's the whole page bestie β¨ this is gffread version 0.11.2, dated June 2019 β slay, icon, legend, no cap πππ¦πΈ
π¦ where this page comes from
- debian bookworm: gffread 0.12.7-3 Β· MIT
- debian trixie: gffread 0.12.7-8 Β· MIT
- ubuntu jammy: gffread 0.12.7-2build1 Β· MIT
- ubuntu noble: gffread 0.12.7-4build1 Β· MIT
- ubuntu questing: gffread 0.12.7-8
- ubuntu resolute: gffread 0.12.7-8build1 Β· MIT
- ubuntu stonking: gffread 0.12.7-8build1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms