Liking cljdoc? Tell your friends :D
Mostly clj/s.
Exceptions indicated.

clj-deconstruct-sigs.core


signature->vectorclj/s

(signature->vector data)

Converts a frequencies map into a 96 element vector representing the substitution patterns.

Converts a frequencies map into a 96 element vector representing the
substitution patterns.
sourceraw docstring

squareclj

(square x)
source

which-signaturesclj/s

(which-signatures sample-tumor signature-set)
(which-signatures sample-tumor
                  signature-set
                  {:keys [signature-cutoff error-threshold]
                   :or {signature-cutoff 0.06 error-threshold 0.001}})

Finds a linear mixture of signature-set which best describes the given vector sample-tumor.

Accepts the following options: :signature-cutoff - A threshold for cutting weights off. Defaults to 0.06. :error-threshold - Target error reduction rate to stop optimization. Defaults to 1e-3.

Returns a map with the following keys: :seed-idx - Index of the signature that was used as the initial seed. :weights - A map of weight indices to weight. :weights* with zero contribution entries. :weights* - A map of non-zero weight indices to weight. Note that entries that have zero contribution will be missing. :product - matrix product of :weights and the provided signatures. :unknown - 1 minus the sum of weights. :diff - Element wise difference of the provided sample tumor and the product. :error-sum - Square root of the sum of the element wise square of :diff. Indicates how close the :product is from the original input.

Finds a linear mixture of `signature-set` which best describes the given
vector `sample-tumor`.

Accepts the following options:
:signature-cutoff - A threshold for cutting weights off.
                    Defaults to 0.06.
:error-threshold  - Target error reduction rate to stop optimization.
                    Defaults to 1e-3.

Returns a map with the following keys:
:seed-idx  - Index of the signature that was used as the initial seed.
:weights   - A map of weight indices to weight. :weights* with zero
             contribution entries.
:weights*  - A map of non-zero weight indices to weight.
             Note that entries that have zero contribution will be missing.
:product   - matrix product of :weights and the provided signatures.
:unknown   - 1 minus the sum of weights.
:diff      - Element wise difference of the provided sample tumor and the
             product.
:error-sum - Square root of the sum of the element wise square of :diff.
             Indicates how close the :product is from the original input.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close