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 -r option, 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 -A option 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 -F option, 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 -V option, check and adjust the starting CDS phase if the original phase leads to a translation with an in-frame stop codon.
  • -B β€” for the -V option, 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 -P and 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. not GT-AG, GC-AG or AT-AC). If your splice sites aren't canon, you're not invited. πŸ’€
  • -J β€” discard any mRNAs that either lack initial START codon or the terminal STOP codon, 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 --tlf option 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 -M option, write duplication info to file <dupinfo>.
  • --cluster-only β€” same as -M/--merge but without discarding any of the "duplicate" transcripts, only create "locus" features.
  • -K β€” for the -M option: also discard as redundant the shorter, fully contained transcripts (intron chains matching a part of the container).
  • -Q β€” for the -M option, 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 -M option, enforce -Q but 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 (when intron 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 -w and -x options, write in the FASTA defline the exon coordinates projected onto the spliced sequence; for the -y option, write transcript attributes in the FASTA defline.
  • -S β€” for the -y option, 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 -o option, output will be GTF instead of GFF3.
  • --bed β€” for the -o option, output BED format instead of GFF3.
  • --tlf β€” for the -o option, 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