bioinformatics-toolkit-0.9.3: A collection of bioinformatics tools

Safe HaskellNone
LanguageHaskell2010

Bio.Utils.Functions

Synopsis

Documentation

ihs Source #

Arguments

:: Double

θ, determine the shape of the function

-> Double

input

-> Double 

inverse hyperbolic sine transformation

ihs' :: Double -> Double Source #

inverse hyperbolic sine transformation with θ = 1

scale :: Vector v Double => v Double -> v Double Source #

scale data to zero mean and 1 variance

filterFDR Source #

Arguments

:: Vector v (a, Double) 
=> Double

desired FDR value

-> v (a, Double)

input data and pvalues

-> v (a, Double) 

given the p-values, filter data by controling FDR

slideAverage Source #

Arguments

:: (Fractional a, Vector v a) 
=> Int

size of HALF sliding window, 2 means a total window size is 5

-> v a 
-> v a 

Compute the sliding average for each entry in a vector

kld :: (Vector v Double, Vector v (Double, Double)) => v Double -> v Double -> Double Source #

compute the Kullback-Leibler divergence between two valid (not check) probability distributions. kl(X,Y) = sum_i P(x_i) log_2(P(x_i)/P(y_i)).

jsd :: (Vector v Double, Vector v (Double, Double)) => v Double -> v Double -> Double Source #

Jensen-Shannon divergence: JS(X,Y) = 1/2 KL(X,(X+Y)/2) + 1/2 KL(Y,(X+Y)/2).

binarySearch :: (Vector v e, Ord e) => v e -> e -> Int Source #

O(log n). return the position of the first element that is >= query

binarySearchBy :: Vector v e => (e -> a -> Ordering) -> v e -> a -> Int Source #

binarySearchByBounds :: Vector v e => (e -> a -> Ordering) -> v e -> a -> Int -> Int -> Int Source #

quantileNormalization :: Matrix Double -> Matrix Double Source #

Columns are samples, rows are features / genes.