get_promoter_from_feature: get fasta sequences of promoters

Description Usage Arguments Value Examples

View source: R/get_fasta_utils.R

Description

Extracts promoter sequences from input bed/gff file

Usage

1
2
3
4
5
6
7
8
get_promoter_from_feature(
  feature_file,
  fasta_file,
  write_outputfasta = FALSE,
  write_promoterbed = FALSE,
  upstream_bp = 500,
  downstream_bp = 1
)

Arguments

feature_file

Either a path or a connection to either a bed file, file format should be standard UCSC bed format with column: 1. chromosome-id, 2. start, 3. end, 4. name, 5. score, 6. strand OR gene feature file with extention .gff or .gff3 ** Chromosome names should be same as fasta file

fasta_file

Either a path or a connection to reference multi-fasta file, from which subset of sequences for given input list is to be retrieved. In the sequence header: only string before first space and/or first colon (:) will be considered for further processes. **Important consideration when header have long names.

write_outputfasta

Logical, to return promoter sequences as a output multi-fasta file, Default: FALSE

write_promoterbed

Logical, to return promoter regions as a output bed file, Default: FALSE

upstream_bp

numeric, base pairs window upstream of start coordinate, Default: 500

downstream_bp

numeric, base pairs window downstream of start coordinate, Default: 1

Value

sequences of promoters and bed file of the promoter region

Examples

1
2
3
4
5
6
7
8
9
## Not run: 

feature_file_in <- system.file("exdata","Sc_ref_genes.gff", package = "fastaR")
ref_fasta <- system.file("exdata", "Sc_ref_genome.fasta", package = "fastaR")
fastaR::get_promoter_from_feature(feature_file=feature_file_in, fasta_file=ref_fasta,
write_outputfasta= FALSE, write_promoterbed= FALSE, upstream_bp= 1000, downstream_bp= 100)


## End(Not run)

sethiyap/fastaR documentation built on June 16, 2020, 1:41 a.m.