Learn R Programming

Rgff (version 0.1.6)

sort_gff: Sorts a GTF/GFF3 file

Description

This function produces a sorted GFF file from an unsorted GFF file. The default order is by Chromosome, Start, End (reverse) and feature (based on the precedency in feature tree)

Usage

sort_gff(
  inFile,
  outFile,
  fileType = c("AUTO", "GFF3", "GTF"),
  forceOverwrite = FALSE
)

Value

Path to the sorted feature file

Arguments

inFile

Path to the input GFF file

outFile

Path to the output sorted file, if not provided the output will be the input path (without extension) with the suffix sorted.gtf/gff3

fileType

Version of the input file (GTF/GFF3). Default AUTO: determined from the file name.

forceOverwrite

If output file exists, overwrite the existing file. (default FALSE)

Examples

Run this code
test_gff3<-system.file("extdata", "eden.gff3", package="Rgff")
sort_gff(test_gff3)

Run the code above in your browser using DataLab