input_seq-methods: Import region / constructing regioned_dna object

input_seqR Documentation

Import region / constructing regioned_dna object

Description

Constructing regioned_dna from DNAStringSet. Optionally input a region data.frame to define restricted amino-acid region for mutation.

Usage

input_seq(object, region = NA, ...)

## S4 method for signature 'character'
input_seq(object, region)

## S4 method for signature 'DNAStringSet'
input_seq(object, region)

## S4 method for signature 'DNAString'
input_seq(object, region)

Arguments

object

Filepath or DNAstringSet. The input sequences is suggested to be in open reading frame(ORF).

region

NA. A data.frame specifying paticular regions (positions in amino acid sequence) that is allowed to be mutated in the sequences. Both 1 / 0 or TRUE / FALSE encoding is OK. Please refer to Examples below for reference.

...

...

Value

A regioned_dna-class object

See Also

get_cu, get_du, get_region, get_dna

Examples

# Creating a input_seq class directly from system file
filepath <- system.file("extdata", "example.fasta", package = "SynMut")
rgd.seq <- input_seq(filepath)

# Optionally input with region dataframe
filepath.fasta <- system.file("extdata", "example.fasta", package = "SynMut")
fp.csv <- system.file("extdata", "target_regions.csv", package = "SynMut")
region <- read.csv(fp.csv)
rgd.seq <- input_seq(filepath.fasta, region)

# Creating from exsisting DNAStringSet object
seq <- Biostrings::DNAStringSet("ATCGATCGA")
rgd.seq <- input_seq(seq)


Koohoko/SynMut documentation built on Jan. 9, 2023, 12:11 p.m.