Learn R Programming

LncFinder (version 1.1.5)

compute_GC: Calculate GC content

Description

This function can GC content of the input sequences.

Usage

compute_GC(
  Sequences,
  label = NULL,
  on.ORF = FALSE,
  auto.full = FALSE,
  parallel.cores = 2
)

Value

A dataframe.

Arguments

Sequences

A FASTA file loaded by function read.fasta of seqinr-package.

label

Optional. String. Indicate the label of the sequences such as "NonCoding", "Coding".

on.ORF

Logical. If TRUE, GC content will be calculated on the longest ORF region.

auto.full

Logical. When on.ORF = TRUE but no ORF can be found, if auto.full = TRUE, GC content will be calculated on full sequences automatically; if auto.full is FALSE, the sequences that have no ORF will be discarded. Ignored when on.ORF = FALSE. (Default: FALSE)

parallel.cores

Integer. The number of cores for parallel computation. By default the number of cores is 2. Users can set as -1 to run this function with all cores.

Author

HAN Siyu

Details

This function can basically compute GC content of DNA sequences: GC content = (nc + ng) / (na + nc + ng + nt). The function will ignored the ambiguous bases.

See Also

GC (package "seqinr-package")

Examples

Run this code
if (FALSE) {
data(demo_DNA.seq)
Seqs <- demo_DNA.seq

gcContent <- compute_GC(Seqs, label = "NonCoding",on.ORF = TRUE,
                        auto.full = TRUE, parallel.cores = 2)
}

Run the code above in your browser using DataLab