Package 'DNAcycP2'

Title: DNA Cyclizability Prediction
Description: This package performs prediction of intrinsic cyclizability of of every 50-bp subsequence in a DNA sequence. The input could be a file either in FASTA or text format. The output will be the C-score, the estimated intrinsic cyclizability score for each 50 bp sequences in each entry of the sequence set.
Authors: Ji-Ping Wang [aut, cre]
Maintainer: Ji-Ping Wang <[email protected]>
License: Artistic-2.0
Version: 0.99.7
Built: 2025-03-26 03:37:00 UTC
Source: https://github.com/bioc/DNAcycP2

Help Index


Predict Cyclizability

Description

This predicts cyclizability for a set of sequences.

Usage

cycle(sequences, smooth, save_path_prefix = "")

Arguments

sequences

A list or vector of sequences

smooth

Whether to predict smoothed C0 (DNAcycP2) or original C0 (DNAcycP)

save_path_prefix

Base path for output files. If it is an empty string, the output files will not be saved (default="")

Details

Optionally, saves output files (use argument 'save_path_prefix')

Value

A list of predictions for each input sequence.

Examples

# Example usage of cycle
cycle(c("ACTGCTAGTCACTGCTAGTCACTGCTAGTCACTGCTAGTCACTGCTAGTC"), smooth=TRUE)
# where sequences is a list/vector of sequences

Predict Cyclizability

Description

This predicts cyclizability for all subsequences of length 50bp from a .fasta input file.

Usage

cycle_fasta(
  file_path,
  smooth,
  n_cores = 1,
  chunk_length = 1e+05,
  save_path_prefix = ""
)

Arguments

file_path

.fasta input file path

smooth

Whether to predict smoothed C0 (DNAcycP2) or original C0 (DNAcycP)

n_cores

Number of cores to use for parallel processing (default=1)

chunk_length

Length of sequence that each core will predict on at a given time. (default=100000)

save_path_prefix

Base path for output files. If it is an empty string, the output files will not be saved (default="")

Details

Optionally, saves output files (use argument 'save_path_prefix')

Value

A list of predictions for each ID in the .fasta file.

Each list item has the following columns: position, c_score_norm ( predictions on a normalized scale), and c_score_unnorm (predictions on an unnormalized scale).

Each list item is named "cycle_$id$" corresponding to the fasta id

Examples

# Create a temporary file
temp_file <- tempfile(fileext = ".fasta")
writeLines(">1", temp_file)
writeLines("ACTGCTAGTCACTGCTAGTCACTGCTAGTCACTGCTAGTCACTGCTAGTC", temp_file)

# Example usage of cycle_fasta
cycle_fasta(temp_file, smooth=TRUE)

# Cleanup
unlink(temp_file)