tnseq_saturation: Make a plot and some simple numbers about tnseq saturation

View source: R/tnseq.R

tnseq_saturationR Documentation

Make a plot and some simple numbers about tnseq saturation

Description

This function takes as input a tab separated file from essentiality_tas.pl This is a perl script written to read a bam alignment of tnseq reads against a genome and count how many hits were observed on every TA in the given genome. It furthermore has some logic to tell the difference between reads which were observed on the forward vs. reverse strand as well as reads which appear to be on both strands (eg. they start and end with 'TA').

Usage

tnseq_saturation(data, column = "Reads", ylimit = 100, adjust = 2)

Arguments

data

data to plot

column

which column to use for plotting

ylimit

Define the y axis?

adjust

Prettification parameter from ggplot2.

Value

A plot and some numbers:

  1. maximum_reads = The maximum number of reads observed in a single position.

  2. hits_by_position = The full table of hits / position

  3. num_hit_table = A table of how many times every number of hits was observed.

  4. eq_0 = How many times were 0 hits observed?

  5. gt_1 = How many positions have > 1 hit?

  6. gt_2 = How many positions have > 2 hits?

  7. gt_4 = How many positions have > 4 hits?

  8. gt_8 = How many positions have > 8 hits?

  9. gt_16 = How many positions have > 16 hits?

  10. gt_32 = How many positions have > 32 hits?

  11. ratios = Character vector of the ratios of each number of hits vs. 0 hits.

  12. hit_positions = 2 column data frame of positions and the number of observed hits.

  13. hits_summary = summary(hit_positions)

  14. plot = Histogram of the number of hits observed.

See Also

[ggplot2]

Examples

 ## Not run: 
 input <- "preprocessing/hpgl0837/essentiality/hpgl0837-trimmed_ca_ta-v0M1.wig"
 saturation <- tnseq_saturation(file = input)

## End(Not run)

elsayed-lab/hpgltools documentation built on May 9, 2024, 5:02 a.m.