input_seq-methods: Import region / constructing regioned_dna object

Description Usage Arguments Value See Also Examples

Description

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

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
# 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)

SynMut documentation built on Nov. 8, 2020, 8:01 p.m.