summaryTable: Summary and count table of shRNA by sample

Description Usage Arguments Value

View source: R/summaryTable.R

Description

Produce a summary report. Report will include data for total number of reads, 5' trimmed reads, 3' trimmed reads, number and percent of mapped reads, number and percent of perfectly mapped reads, number and percent of good mapped reads, number and percent of poorly mapped reads and number of unmapped reads.

Usage

1
2
3
4
5
6
7
8
summaryTable(samkey, lib, trimreport, mapping_path = ".",
  mapping_rx = "^.*_mapped_species\\.txt$", wt_alignscores = 0,
  wt_readlengths_lower = 26, high_alignscores_upper = 0,
  high_alignscores_lower = -6, high_readlengths_lower = 26,
  low_alignscores_upper = -6, low_readlengths_upper = 26,
  count_alignscores = -6, count_readlengths = 26,
  output_report = "global_alignment_report.txt",
  output_count = "count_matrix.txt")

Arguments

samkey

Character. A link to sample key file. See source code for how the data should be structured.

lib

Character. A link to library (fasta) file. See source code for how the data should be structured.

trimreport

Character. A link to global trim report from the pipeline. See source code for how the data should be structured.

mapping_path

Character. Path to where mapping files reside.

mapping_rx

Character. Valid regular expression for collating of mapping files (per sample).

wt_alignscores

Integer. Perfect align counts. Align counts that have align scores equal to wt_alignscores and read lengths equal or higher to wt_readlengths_lower will be summed.

wt_readlengths_lower

Integer. Perfect align counts. Align counts that have align scores equal to wt_alignscores and read lengths equal or higher to wt_readlengths_lower will be summed.

high_alignscores_lower, high_alignscores_upper, high_readlengths_lower

Integer. Good align counts. Align counts with align scores >= high_alignscores_lower and < high_alignscores_upper and read lengths equal or higher than high_readlengths_lower will be summed.

low_alignscores_upper, low_readlengths_upper

Integer. Poor align counts. Align counts below low_alignscores_upper or read length below low_readlengths_upper will be excluded from the tally.

count_alignscores, count_readlengths

Integer. For count matrix, align counts for which align scores equal or greater to count_alignscores and read lengths equal or greater to count_readlengths will be used in the final tally.

output_report

Character. A name of file (incl. file extension) into which alignment report will be written to.

output_count

Character. A name of file (incl. file extension) into which count matrix (shRNA for rows, sample names for columns) will be written.

Value

Two files, global_alignment_report.txt and count_matrix.txt are written as a side effect. Function returns a list of length 2 where one can access alignment report (output$alignment_report) or count matrix (output$count_matrix).


genialis/shRNAde documentation built on Dec. 11, 2018, 1:34 a.m.