predict_ps_itss: =========================================================================...

View source: R/predict_ps_itss.r View source: R/.ipynb_checkpoints/predict_ps_itss-checkpoint.r

predict_ps_itssR Documentation

========================================================================= predict_ps_itss

predict_ps_itss predicts pausing sites (ps) and internal starting sites (ITSS) between delay fragments.

Description

predict_ps_itss predicts ps and ITSS within the same TU. Neighboring delay segments are compared to each other by positioning the intercept of the second segment into the first segment using slope and intercept coefficients.

Usage

predict_ps_itss(inp, maxDis = 300)

Arguments

inp

SummarizedExperiment: the input data frame with correct format.

maxDis

integer: the maximal distance allowed between two successive fragments.

Details

predict_ps_itss uses 3 steps to identify ps and ITSS:

  1. select unique TU.

  2. select from the input dataframe the columns: ID, position, strand, delay. delay fragment, TU and slope coordinates, velocity_fragment and intercept.

  3. select delay segments in the TU.

  4. loop into all delay segments and estimate the coordinates of the last point of the first segment using the coefficients of the second segment and vice versa. We get two predicted positions, the difference between them is compared to the threshold.

In case the strand is "-", additional steps are added:

The positions of both segments are ordered from the last position to the first one.

All positions are merged in one column and subtracted from the maximum position. the column is split in 2. The first and second correspond to the positions of the first and second segments respectively.

Both segments are subjected to lm fit and the positions predicted are used on the same way as the opposite strand.

If the difference between the positions predicted is lower than negative threshold, ps is assigned otherwise, and if the difference is higher than the positive threshold, ITSS is assigned.

Value

The SummarizedExperiment with the columns regarding statistics:

ID:

The bin/probe specific ID.

position:

The bin/probe specific position.

strand:

The bin/probe specific strand.

intensity:

The relative intensity at time point 0.

probe_TI:

An internal value to determine which fitting model is applied.

flag:

Information on which fitting model is applied.

position_segment:

The position based segment.

delay:

The delay value of the bin/probe.

half_life:

The half-life of the bin/probe.

TI_termination_factor:

String, the factor of TI fragment.

delay_fragment:

The delay fragment the bin belongs to.

velocity_fragment:

The velocity value of the respective delay fragment.

intercept:

The vintercept of fit through the respective delay fragment.

slope:

The slope of the fit through the respective delay fragment.

HL_fragment:

The half-life fragment the bin belongs to.

HL_mean_fragment:

The mean half-life value of the respective half-life fragment.

intensity_fragment:

The intensity fragment the bin belongs to.

intensity_mean_fragment:

The mean intensity value of the respective intensity fragment.

TU:

The overarching transcription unit.

TI_termination_fragment:

The TI fragment the bin belongs to.

TI_mean_termination_factor:

The mean termination factor of the respective TI fragment.

seg_ID:

The combined ID of the fragment.

pausing_site:

presence of pausing site indicated by +/-.

iTSS_I:

presence of iTSS_I indicated by +/-.

ps_ts_fragment:

The fragments involved in pausing site or iTSS_I.

event_duration:

Integer, the duration between two delay fragments.

Examples

data(fragmentation_minimal)
predict_ps_itss(inp = fragmentation_minimal, maxDis = 300) 

CyanolabFreiburg/rifi documentation built on May 7, 2023, 7:53 p.m.