- Notifications
You must be signed in to change notification settings - Fork2
Home
Tools for analyzing sequencing data containing UMI generated by umierrorcorrect using comprehensive easy-to-use methods. The package allows merging of multiple samples into a single UMIexperiment object which can be easily manipulated using build-in functions to generate tabular and graphical output.
- R (>= 3.5.0), which can be downloaded and installed via The Comprehensive R Archive NetworkCRAN.
- Installation from R using install_github requires the devtools package
- Using the shiny app additionally requires tidyverse, shiny, shinyFiles, shinyWidgets, shinydashboard and DT
Define a variable containing the path to the directory with all the umierrorcorrect output foldersbelonging to your experiment. umiAnalyzer comes with raw test data generated with umierrorcorrect thatyou can import if you don't have any of your own.
Call the createUmiExperiment to create your umiExperiment object.
The UMIexperiment object always maintains your raw data, however you can create as many filters as youlike, which will be saved as separate objects to access. You can filter the consensus table ofUMIexperiment object with filterUMIobject. The only mandatory arguments are the object to be filteredand a user defined name. You can use that name to retrieve a filtered table using getFilter.
library(umiAnalyzer)main<- system.file("extdata",package="umiAnalyzer")samples<- list.dirs(path=main,full.names=FALSE,recursive=FALSE)simsen<- createUmiExperiment(experimentName='simsen',mainDir=main,sampleNames=samples)reads<- parseBamFiles(mainDir=main,sampleNames=samples,consDepth=10)plotFamilyHistogram(reads)
umiAnalyzer comes with a build-in umiExperiment object to explore, which was generated using the codeabove, so it can be used without creating the it first, if so desired.
In order to call variants using the umiAnalyzer variant caller simply load the package and test dataand use the callVariants function. You can then filter the resulting consensus data (cons.data) withinthe object, e.g. for significant variants.
data<-simsendata<- callVariants(data)data<- filterVariants(object=data,p.adjust=0.2,minDepth=5)
umiAnalyzer supports adding meta data to a UMIsample or UMIexperiment object, such as experimentaldesign matrices or clinical parameters. This is done using the importDesign function and requires asimple formatted table supplied by the user as a tab separated file. It is important that the orderof the samples in the meta data file is the same as when building the UMIexperiment object.
data<-simsendata<- callVariants(data)metaData<- system.file('extdata','metadata.txt',package='umiAnalyzer')data<- importDesign(object=data,file=metaData)
The mergeTechnicalReplicates function will result in a merged data set accessible from the UMIexperiment object usingobjectmerged.data. This is meant to provide statistical information across multiple replicates. If you want to mergemultiple sequencing runs of the sample into a single sample using the collapseReplicates function instead.
mergeTechnicalReplicates(object=object,filter='myfilter')
It is also possible to add meta data to an object and to retrieve metadata if needed. The designmatrix loaded with importDesign can be retrieved as follows:
design<- getMetaData(object=data,attributeName='design')design
Similarly, any kind of meta data can be added and retrieved from an object using addMetaData:
comment<-"fix this"data<- addMetaData(object=data,attributeName='my-comment',attributeValue=comment)myattribute<- getMetaData(object=data,attributeName='my-comment')myattribute
Generates a VCF file in the current working directory, another output directory can be speciied using the outDir parameter.The printAll parameter specifies whether all variants should be printed or only those with at least 5 reads as a support (default = FALSE).
generateVCF(object=exp1,outFile='myVCF')
Functions for analyzingDebarcer output
DebarcerExperiment<- createUMIexperiment_Debarcer(experiment.name='debarcer',main.dir=main,dir.names=sample.names)