Learn R Programming

polyester (version 1.8.3)

count_transcripts: determine how many transcripts are annotated in a FASTA or GTF file

Description

determine how many transcripts are annotated in a FASTA or GTF file

Usage

count_transcripts(f, fasta = TRUE, identifier = "transcript_id", attrsep = "; ")

Arguments

f
character, path to a file in FASTA or GTF format
fasta
TRUE if f is a fasta file; FALSE if f is a GTF file
identifier
if f is a GTF file, how are transcripts identified in the attributes field (9th column) of the file? Default transcript_id.
attrsep
if f is a GTF file, how are attributes separated in the attributes field (9th column) of the file? Default "; ".

Value

Number of transcripts annotated in f

Examples

Run this code
fastapath = system.file("extdata", "chr22.fa", package="polyester")
count_transcripts(fastapath) #918

Run the code above in your browser using DataLab