get_bias_seq: Retrieve nucleotides at RPF ends

View source: R/helper.R

get_bias_seqR Documentation

Retrieve nucleotides at RPF ends

Description

A function to pull the nucleotides at the ends of a ribosome-protected fragment, defined by ribosome position and size.

Usage

get_bias_seq(
  dat,
  transcript_seq,
  bias_region,
  bias_length = 3,
  read_type = "monosome"
)

Arguments

dat

data frame containing columns 'transcript', 'd5', 'd3', 'utr5_length', and codon indices.

transcript_seq

character; output from 'load_fasta'

bias_region

character; one of ‘f5' or 'f3' corresponding to 5’ or 3' bias sequence

bias_length

integer; number of nucleotides to include in bias sequence

read_type

character; one of 'monosome' or 'disome'

Details

If 'read_type' is 'monosome', then A site codon indices should be named 'cod_idx' in 'dat'. If 'read_type' is 'disome', then A site codon indices should be named 'cod_idx_lagging' and 'cod_idx_leading' in 'dat'.

Value

A character vector corresponding to rows of 'dat'


amandamok/choros documentation built on March 15, 2023, 7:57 p.m.