Skip to contents

This function reads a DNA FASTA file, processes the sequences, and returns consensus sequences as a GRangesList. The function can optionally use multiple cores for parallel processing.

Usage

get_consensus(fasta, cores = 1, genome = "hg38", test_with_n = NULL)

Arguments

fasta

A string specifying the path to the input FASTA file.

cores

An integer specifying the number of cores to use for parallel processing. Default is 1.

genome

A string specifying the genome build. Default is "hg38".

test_with_n

An optional integer specifying the number of sequences to process for testing. If NULL, all sequences are processed. Default is NULL.

Value

A GRangesList containing the consensus sequences with their coordinates and sequence information.

References

This documentation was written by ChatGPT v4o - OpenAI, conversation with the author, 6-5-2024.

Examples

if (FALSE) {
consensus <- get_consensus("path/to/fasta/file.fasta", cores=2, genome="hg19")
}