Description Arguments Fields Methods Author(s) See Also Examples
A ReferenceClass container for a single sample of alignments narrowed to a target region. Typically CrisprRun objects will not be accessed directly, but if necessary via a CrisprSet class which contains a list of CrisprRun objects. Note that the CrispRVariants plotting functions don't work on CrisprRun objects.
bam |
a GAlignments object containing (narrowed) alignments to the target region. Filtering of the bam should generally be done before initialising a CrisprRun object |
target |
The target location, a GRanges object |
genome.ranges |
A GRangesList of genomic coordinates for the cigar operations. If bam is a standard GAlignments object, this is equivalent to cigarRangesAlongReferenceSpace + start(bam) |
rc |
(reverse complement) Should the alignments be reverse complemented, i.e. displayed with respect to the negative strand? (Default: FALSE) |
name |
A name for this set of reads, used in plots if present (Default: NULL) |
chimeras |
Off-target chimeric alignments not in bam. (Default: empty) |
verbose |
Print information about initialisation progress (Default: TRUE) |
alns
A GAlignments object containing the narrowed reads. Note that if the alignments are represented with respect to the reverse strand, the "start" remains with repect to the forward strand, whilst the cigar and the sequence are reverse complemented.
name
The name of the sample
cigar_labels
A vector of labels for the reads, based on the cigar strings, optionally renumbered with respect to a new zero point (e.g. the cut site) and shortened to only insertion and deletion locations. Set at initialisation of a CrisprSet object, but not at initialisation of a CrisprRun object.
chimeras
Chimeric, off-target alignments corresponding to alignments in alns
getCigarLabels(target.loc, genome_to_target, ref, separate.snv = TRUE,
match.label = "no variant", mismatch.label = "SNV", rc = FALSE,
keep.ops = c("I", "D", "N"), upstream = 8, downstream = min(5,
width(ref) - cut_site))
Description: Sets the "cig_labels" field, returns the cigar labels.
Input parameters: target.loc: The location of the cut site with respect to the target genome_to_target: A vector with names being genomic locations and values being locations with respect to the cut site separate.snv: Should single nucleotide variants be called? (Default: TRUE) match.label: Label for non-variant reads (Default: no variant) mismatch.label: Label for single nucleotide variants (Default: SNV) rc: Should the variants be displayed with respect to the negative strand? (Default: FALSE) keep.ops: CIGAR operations to remain in the variant label (usually indels) upstream: distance upstream of the cut site to call SNVs downstream: distance downstream of the cut site to call SNVs
getInsertionSeqs(ref_ranges, genome_ranges)
Description: Set the "insertions" field - a table of the locations of insertions, and the "ins_key" field which relates sequences indices to the insertions they contain Input parameters: ref_ranges: The cigar operations of the reads with respect to the reference genome_ranges: The cigar operations of the reads with respect to the genome, i.e. the reference locations shifted to their genomic start locations
removeSeqs(idxs)
Description: Remove sequences from a CrisprRun object and from the internal CrisprRun fields that store insertion locations for plotting.
Input parameters: idxs: Indexes of reads to remove
Helen Lindsay
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | # readsToTarget with signature("GAlignments", "GRanges") returns a
# CrisprRun object
bam_fname <- system.file("extdata", "gol_F1_clutch_1_embryo_1_s.bam",
package = "CrispRVariants")
param <- Rsamtools::ScanBamParam(what = c("seq", "flag"))
alns <- GenomicAlignments::readGAlignments(bam_fname, param = param,
use.names = TRUE)
reference <- Biostrings::DNAString("GGTCTCTCGCAGGATGTTGCTGG")
gd <- GenomicRanges::GRanges("18", IRanges::IRanges(4647377, 4647399), strand = "+")
crispr_run <- readsToTarget(alns, target = gd, reference = reference,
name = "Sample name", target.loc = 17)
# Alternatively, CrisprRun objects can be accessed from a CrisprSet object
# e.g. crispr_set$crispr_runs[[1]]
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.