make_ext_fasta: Create a fasta file of coding sequences extended nbp on...

make_ext_fastaR Documentation

Create a fasta file of coding sequences extended nbp on either end.

Description

Create a fasta file of coding sequences extended nbp on either end.

Usage

make_ext_fasta(gtf, fasta, outfasta, fpext = 50, tpext = 50)

Arguments

gtf

A GTF file with annotation.

fasta

A genomic Fasta file

outfasta

The name of the fasta file to output

fpext

How many bp to extendt the CDS on the 5' end

tpext

How many bp to extendt the CDS on the 3' end

Details

This creates a fasta file with gencode-style headers. The sequences are created by extending the coding sequences by the specified amount in transcript space, (or past the) end of the transcript if necessary, so that all sequences have the same 'UTRs'.

Value

the name of the file to which the sequences were output

Author(s)

Dermot Harnett, dermot.p.harnett@gmail.com

Examples

gtf <- system.file("extdata", "gcv37.anno.chr22.gtf",
  package = "Ribostan",
  mustWork = TRUE
)
fafile <- system.file("extdata", "chr22.fa.gz",
  package = "Ribostan",
  mustWork = TRUE
)
file.copy(fafile, ".")
system2("gunzip -f chr22.fa.gz")
fafile <- "chr22.fa"
ext_fasta <- make_ext_fasta(gtf, fafile, outfasta = "tmp.fa", fpext = 50, tpext = 50)

zslastman/RiboStan documentation built on June 12, 2024, 1:59 a.m.