snp_cds_primers: Look for variants associated with CDS regions instead of...

View source: R/pcr.R

snp_cds_primersR Documentation

Look for variants associated with CDS regions instead of high-density.

Description

The function snp_density_primers looks for regions with many variants. This flips the script and looks first to the set of CDS regions. It also makes heavy use of GRanges and so should prove useful as a reference when looking for range examples.

Usage

snp_cds_primers(
  cds_gr,
  variant_gr,
  bsgenome,
  amplicon_size = 600,
  min_overlap = 200,
  minvar_perbin = 10,
  super_len = 30,
  target_temp = 60,
  min_gc_prop = 0.3,
  max_nmer_run = 4,
  count_occurrences = TRUE,
  occurrence_mismatch = 0
)

Arguments

cds_gr

GRanges of CDS features. It does not have to be CDS, but probably should not be genes.

variant_gr

GRanges of observed variants. I get this by coercing my peculiar variant rownames into a GR.

bsgenome

Genome containing all the contigs mentioned above.

amplicon_size

Desired PCR amplicon for sequencing.

min_overlap

Desired overlap between every genome bin and CDS. Note I didn't say amplicon here because of the way I am making the primers.

minvar_perbin

Discard bins with less than this number of variants inside them.

super_len

I start out with a 'superprimer' which is assumed to be longer than needed for the target Tm. It is this long.

target_temp

Attempt to create primers with this Tm.

min_gc_prop

Warn or discard primers with less than this GC content.

max_nmer_run

Warn or discard primers with runs of a single base this long.

count_occurrences

Count up how many times the primer is found in the genome, hopefully this is always 1. Annoyingly, the vcountDict function does not allow mismatches.

occurrence_mismatch

I cannot use this, but I want to.


elsayed-lab/hpgltools documentation built on May 9, 2024, 5:02 a.m.