clip: Select CDS involved in a fusion

View source: R/fusion-utils.R

clipR Documentation

Select CDS involved in a fusion

Description

A list of GRangesList objects, formalized as a Transcripts class, is subset to return an instance of the same class containing only the CDS believed to be involved in the fusion.

Usage

clip(transcripts)

Arguments

transcripts

A TranscriptsFusion object

Value

A ClippedTranscripts object

See Also

fuse

Examples

  data(rear_cds)
  clip(rear_cds)
  ## One of the possible fused transcripts is gene B and gene C, or "BC"
  ## There are four possible refseq transcripts associated with gene 'B'
  full_refseqs <- txB(rear_cds)
  elementNROWS(full_refseqs)

  ## We exclude CDS from the four refseq transcripts that are not
  ## involved in the fusion using the clip function:
  clipped_tx <- clip(rear_cds)
  ## The clipped refseq transcripts for gene B are give by
  names(left(clipped_tx))
  clipped_refseqs <- left(clipped_tx)
  elementNROWS(clipped_refseqs)
  ##
  ## One transcript on the "right" side
  ##
  names(right(clipped_tx))
  length(right(clipped_tx)[[1]])
  ## Note the above exluced 9 CDS that appear in the unclipped refseq transcript
  length(txC(rear_cds)[[1]])

  ## The exon ranks of the clipped transcripts shows that the
  ## first 9 CDS are excluded in the fused transcript:

  right(clipped_tx)[[1]]$exon_rank

cancer-genomics/trellis documentation built on Aug. 20, 2024, 5:48 p.m.