varity.fusion

NOTE: This algorithm was initially developed at Cancer Precision
Medicine Center, Japanese Foundation for Cancer Research and Xcoo
re-implemented it with Clojure.

fusion-genes

(fusion-genes rg-index {[{c1 :chr, p1 :pos, :as bp1} {c2 :chr, p2 :pos, :as bp2}] :breakpoints, is :inserted-seq})
Returns a lazy sequence of annotations of all possible combinations of fusion
genes. An annotation is a map containing the following key-values:
- `:breakpoints` Given breakpoints in the order of 5'-part, 3'-part.
- `:genes` Candidate genes for each of the `:breakpoints`.
- `:fusion?` `true` iff the genes form a fused transcript.
- `:breakpoint-regions` Genic regions for each of the `:breakpoints`.
- `:transcript-regions` A sequence of regions corresponding to each exon of a
resulting transcript. May not be fused or may be `nil` if no transcription is
expected.

fusion-transcripts

(fusion-transcripts seq-reader rg-index bp)
Like `fusion-genes` but returns only in-frame and actually fused genes. An
amino acid sequence is added as `:transcript` for each candidates.

in-frame?

(in-frame? transcript-regions)
Checks if the reading frame of given regions are in-frame.

parse-vcf-breakpoints

(parse-vcf-breakpoints chr pos ref-base alt-bnd)
Parses a VCF-style breakend string into a map used in `varity.fusion`.

transcript

(transcript seq-reader transcript-regions)
Translates a sequence of regions into an amino acid sequence.

variant->breakpoints

(variant->breakpoints {:keys [chr pos ref alt], {:keys [SVTYPE END]} :info})
Converts each allele in a VCF-style variant into a map used in
`varity.fusion`. Returns a lazy sequence of the same length with alleles.