predNuCpos {nuCpos} | R Documentation

## R function for prediction of nucleosome positioning

### Description

Like the `predNuPoP` function of the parental package NuPoP does, this function invokes Fortran codes to compute the Viterbi prediction of nucleosome positioning, nucleosome occupancy score and histone binding affinity score. Nucleosomal and linker models built upon the chemical maps are used for the calculation.

When `ActLikePredNuPoP` is `TRUE`, this function acts like the `predNuPoP` function of NuPoP: the function receives the path to a file containing a DNA sequence (specified by `file`) and save a text file containing the prediction results in the working directory. Nucleosome positioning throughout a long chromosome containing ‘N’ can be predicted.

When `ActLikePredNuPoP` is `FALSE` (dafault), this function directly receives a DNA sequence as an R object (`inseq`) and returns the prediction results as a data frame. ‘N’ must not be in the sequence.

### Usage

    predNuCpos(file, inseq, species="mm", smoothHBA=FALSE,
        std=FALSE, ActLikePredNuPoP = FALSE)

### Arguments

`file` | The file path to the FASTA file to be tested. The FASTA must be in a single FASTA format. This will be ignored when `ActLikePredNuPoP = FALSE`.
`inseq` | a character or DNAString object. The length of the character string must be over 1 kb. This will be ignored when `ActLikePredNuPoP = TRUE`.
`species` | a character = mm, sc or sp; "mm" for mouse, "sc" for S. cerevisiae and "sp" for S. pombe.
`smoothHBA` | a logical value indicating whether smoothing of histone binding affinity should be applied as in the `predNuPoP` function of the parental package NuPoP.
`std` | a logical value indicating whether standardization should be applied to the histone binding affinity score.
`ActLikePredNuPoP` | a logical value indicating whether the function acts like the `predNuPoP` function in the parental package NuPoP.

### Value

When the `ActLikePredNuPoP` argument is set as `TRUE`, `predNuCpos` outputs the prediction results into the working directory, in the same format as that generated by the `predNuPoP` function of NuPoP. Thus, it can be handled by the NuPoP functions `readNuPoP` and `plotNuPoP`. The output file is named after the input file with an extension “_Prediction4.txt”. The output file has five columns:

`Position` | position in the input DNA sequence
`P-start` | probability that a nucleosome starts at
`Occup` | nucleosome occupancy score
`N/L` | Viterbi path (1 and 0 for the nucleosome and linker states, repsectively)
`Affinity` | histone binding affinity score

When the `ActLikePredNuPoP` argument is set as `FALSE`, `predNuCpos` outputs the prediction results as a data frame object with five columns, on which the `plotNuPoP` function of NuPoP can be applied:

`pos` | position in the input DNA sequence
`pstart` | probability that a nucleosome starts at
`nucoccup` | nucleosome occupancy score
`viterbi` | Viterbi path (1 and 0 for the nucleosome and linker states, repsectively)
`affinity` | histone binding affinity score

### Examples

    predNuCpos(file = system.file("extdata", "TRP1ARS1x1.fasta",
        package="nuCpos"), species="sc", smoothHBA=FALSE,
        std=FALSE, ActLikePredNuPoP = TRUE)
    library(NuPoP)
    results.TRP1ARS1.1 <- readNuPoP("TRP1ARS1x1.fasta_Prediction4.txt",
        startPos = 1, endPos = 1465)
    results.TRP1ARS1.1[72:76,]
    plotNuPoP(results.TRP1ARS1.1)
    TRP1ARS1 <- paste(scan(file =
        system.file("extdata", "TRP1ARS1x1.fasta", package = "nuCpos"),
        what = character(), skip = 1), sep = "", collapse = "")
    results.TRP1ARS1.2 <-
        predNuCpos(inseq = TRP1ARS1, species = "sc", smoothHBA = FALSE,
        ActLikePredNuPoP = FALSE)
    results.TRP1ARS1.2[72:76,]
    plotNuPoP(results.TRP1ARS1.2)
    ## The DNA sequence TRP1ARS1 is from Fuse et al. (2017).

[Package nuCpos version 1.2.0 Index]