correct_batch_effect_by_ref: Piecewise-linear warping to correct batch effects

Description Usage Arguments Value

Description

Correct the error that the same sample with known molecules can show up at slightly different locations when autoradiographed on multiple gels.

Usage

1
2
correct_batch_effect_by_ref(dat_binned_query, dat_binned_ref,
  peak_ind_mat_query, peak_ind_mat_ref, bp, score_thres)

Arguments

dat_binned_query

The binned data to be compressed or stretched towards the reference

dat_binned_ref

The binned data to be aligned to. It is usually arbitrarily chosen or the one least visually warped (could be very subjective). We sugguest in one particular analysis, fix this data to be one specific gel.

peak_ind_mat_query

A matrix of values, with the first-column entries that equal score_thres considered as peaks in the query lane

peak_ind_mat_ref

Same as peak_ind_mat_query but for the reference gel to be aligned to.

bp

The break points that binned the smoothed data into bins.

score_thres

The score threshold above or equal to which we call peak candidate bins.

Value

A list of two elements, the first is the vector of break points at reference peak locations (large to small; NB:check this), the second is a vector of the same length as the legnth of reference lane, with each element warped_ind[i] being the index in the query lane that corresponds for reference index i.


zhenkewu/spotgear documentation built on June 22, 2019, 1:55 a.m.