Skip to contents

Data objects

data objects loaded with brentlabRnaSeqTools

database_info
URLS to active databases
grant_df
the 2016 grant summary represented as a dataframe
passing_genes_all
genes considered NOT to have 'high dispersion'
database_colnames
set global variables, mostly as a hack to make the tidyverse data binding pass the R CMD Check

Database – Utilities

Things like connecting directly to the database, archiving or retrieving a user token

connectToDatabase()
Connect to a remote postgresql database
archiveDatabase()
pull entire database (not counts) and save to output_dir for archival purposes
getUserAuthToken()
get (via a http POST request) your user authentication token from the database

Database – Getting Data

get the full join (getMetadata) or individual tables

getMetadata()
Get the combined metadata as a tibble from a remote database
getRawCounts()
Get combined raw counts
getGeneNames()
Get gene names
listTables()
list tables in databse
getTable()
Convenience function to pull a single table
getCapsuleImageSet()
Retrieve, as a zip file, the set of images which correspond to a given bioSampleNumber

Database – Sending Data

send data TO the database. Please be careful with these.

postFastqSheet()
post new fastq sheet to database
postCounts()
post counts to database
postQcSheet()
post new qc sheet to database
patchTable()
PATCH entries in database table
postTable()
Post a table to the database
postCapsuleJpeg()
Send a single JPEG KN99 capsule image to the capsule image table
postCapsuleJpeg_batch()
Send a set of JPEGs for a given bioSampleNumber to the database
postCountsToDatabase()
Send Counts to Database (legacy pipeline)
postImageAnnotationsToDatabase()
Send Capsule Image Annotation Data to Database

brentLabRnaSeq Object

the object(s) used in most of QC processing

brentlabRnaSeqExperiment()
brentlabRnaSeqExperiment constructor.
brentlabRnaSeqSet() brentlabRnaSeqSetFromDatabase()
brentlabRnaSeqSet object and constructor
brentlabRnaSeqSetTransform()
brentlabRnaSeqSetTransform object and constructor. This extends DESeqTransform.
coerceToDds()
coerce brentlabRnaSeqSet to DESeqDataSet
createExperimentSet()
Create a pre-defined experiment set
createTestTrainSet()
create test train set
estimateSizeFactorsByProtocol()
Calculate Size Factors within protocol groups
extractColData()
extract colData as tibble
extractDesignMatrix()
extract the model.matrix using the design and colData
getRunNumberLeadingZero()
correct run number to add leading zero where approprirate
qaFilter()
Quality filter a brentlabRnaSeqSet object

RNAseq Pipeline

Functions for processing data from the database for the RNAseq pipeline

readHTSeqFile()
Parse HTSeq output to tibble
parseNovoalignLog()
Parse a novoalign log
geneGRanges()
Given a GenomicFeatures annotation_db and a gene_id, extract an GRanges object of the cds
strandedScanBamParam()
A helper function to create a ScanBamParam object
htseq_proteinCodingTotal()
Calculate KN99 protein coding total
htseq_notAlignedTotalPercent()
Extract notAlignedTotalPercent from novoalign log
htseq_libraryComplexity()
Calculate percentage of library accounted for by top expressed genes
locusCoverage()
Calculate coverage over a given feature
htseq_locusLog2cpm()
Get the log2cpm of a given locus in the htseq output
novoalignPipelineQC()
QC a crypto run output by the novoalign+htseq pipeline
addQcColsToMeta()
add qc metrics to metadata
autoAuditQcTable()
Audit a qc table with metrics added
decomposeStatus2Bit()
decompose sums of powers of two to a list of the summed powers
kn99_novo_htseq_status
QC status codes for the novo+htseq pipeline
kn99_novo_htseq_thresholds
thresholds set for the novo+htseq pipeline

RNAseq Pipeline – nextflow

Functions for processing data in the nextflow pipeline

createNovoalignPipelineSamplesheet()
create a sample sheet for the novoalign pipeline
createNfCorePipelineSampleSheet()
create nf-co sample sheet
moveNfCoFastqFiles()
move fastq files from lts to scratch for nf-co/rnaseq pipeline

RNAseq QC – Misc

Miscellaneous RNAseq QC functions

setPerturbedLociToZero()
Zero out perturbed expression
removeParameterEffects()
remove some effects from the counts
fltrLowReplicateParams()
filter low replicate parameters from metadata

RNAseq QC – RLE

Functions used to calculate relative log expression for QC

rleTransform()
transform normalized counts into regularized log expression
calculateRLE()
calculate RLE of a numeric dataframe
calculateGeneWiseMedians()
calculate medians across rows of dataframe
rleSummary()
rleSummary calculates summary statistics of rleFullTable
addRleSummaryStats()
calculate RLE by replicate groups
rleByReplicateGroup()
calculate RLE by replicate groups
rlePlotCompareEffectRemoved()
plots output of rleSummaryByReplicateGroup
removeLibdateByReplicate()
Remove the libraryDate effects from KN99 dds objs
plotRLEhistograms()
composite plot of all rle_stats in one plot
rlePlot()
plot RLE for a given column filter
rlePlot_helper()
the actual plotting function for rlePlot

RNAseq QC – IGV

Functions for interacting with the IGV

createIgvBatchscript()
create IGV viewer batch script (single range, as many tracks as you like)

Experimental Sets

Functions for creating various pre-defined experimental sets

createEnvPertSet_perturbed()
create Environmental Perturbation Perturbed set
createEnvPertSet_titrationWT()
create Environmental Perturbation Titration (TDY451 only) set
createEnvPert_epWT()
filter combined_df for environmental perturbation sample set
createEPTally()
Create the EP tally in long form
createNinetyMinuteInduction_2016grant()
90minuteInduction set Definition
createNinetyMinuteInduction_2016grantWithDoubles()
ninetyMin set where both doubles are in the grant_df
createNinetyMinuteInduction_all()
Samples with genotypes not in the grant_df
createNinetyMinuteInduction_non2016grant()
Samples with genotypes not in the grant_df
createInductionSetTally()
create 90 minute induction set tally
replicateByProtocolTally()
experimental replicates by libraryProtocol tally
replicateByProtocolTally_90min()
90min replicate by protocol tally
filterWtByExperimentalLibdate_90min()
WT filtering helper for 90minInduction sets
splitProtocolGroups()
Split a brentlabRnaSeqSet into two by protocol

Binding Response EDA functions

For instance, for Rank-Response plots

rank_response_plot()
Given expresion and binding signal, plot the rank response a la doi:
create_partitions()
Given a vector length adn the size of each parition, create a vector which represents those partitions.
sort_rank_mean_expr()
Create a rank-response data frame

Utilities

Helper functions

isNumeric()
test if argument is numeric
is_integer64()
Test if value is datatype integer64
localView()
To view a data.frame / data.table in LibreOffice Calc
parseComparatives()
parse text comparative sentence
readInData()
read in columnar data
run_numbers_with_leading_zero
A named list containing a run number without a leading zero, eg 647, with the value being the same runnumber with a leading 0, eg 0647.
testBamPath()
test bam path