saf_from_gff {Rgff}R Documentation

Creates a SAF file from a GTF/GFF3 features for the given pairs of blocks and features

Description

This function creates a SAF file from a GTF/GFF3 features for the given blocks and features

Usage

saf_from_gff(
  inFile,
  outFile,
  fileType = c("AUTO", "GFF3", "GTF"),
  forceOverwrite = FALSE,
  features = c("gene > exon"),
  sep = ">"
)

Arguments

inFile

Path to the input GFF file

outFile

Path to the output SAF file, if not provided the output path will be the input path with the suffix ".feature1-block1.feature2-block2(...).saf"

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)

features

Vector of pairs of features/blocks, separated by '>' (see sep argument). In the case of features without defined blocks, only the feature is needed (see example)

sep

Separator of each "feature" and "block" provided in the feature argument (default '>')

Value

Path to the generated SAF file

Examples

test_gff3<-system.file("extdata", "AthSmall.gff3", package="Rgff")
## Default usage, extract gene features by exon blocks 
saf_from_gff(test_gff3)
## Define only feature without block to count reads within the whole genomic locus 
saf_from_gff(test_gff3, features=c("gene"))
## Define multiple features for counting readsoverlapping only in exonic regions 
saf_from_gff(test_gff3, features=c("gene > exon", "ncRNA_gene > exon"))

[Package Rgff version 0.1.6 Index]