# Install R package "ShadowReression": # Unix/Mac command: # R CMD INSTALL -l lib ShadowRegression.tar # May need to install other packages that ShadowRegression depends on # Run in R library(ShadowRegression, lib.loc='lib') # help pages available for the following functions: # ?getReadCnts # ?getErrorRates # ?sampleFromGenome # ?plot.SR # try on test data (need to unzip data first) # Expect about 30-60 minutes of run time, depending on system # if starting with fastq file, convert to read counts first: # getReadCnts('.', 'SRR037452.fastq', 'SRR037452.fastq.rcnts') errorRates = getErrorRates("SRR037452.fastq.rcnts", type="sub"); # Error rates can be accessed from errorRates$perReadER and # errorRates$cycleER errorRates$perReadER # error rate standard error intercept slope # 0.269477787 0.003710761 6.294485616 0.368883768 errorRates$cycleER # error rate standard error intercept slope # [1,] 0.008759717 0.0003898941 -0.28551211 0.008837128 # [2,] 0.007633150 0.0004031979 -0.05808014 0.007691863 # [3,] 0.008464954 0.0004196062 -0.18604044 0.008537221 # ... # Scatter plot of shadow counts and tag counts plot.SR(errorRates); # Sample from genomic sequence to assess whether too many repeats for Shadow # Regression to give un-inflated error estimates sampleFromGenome("phix.fasta"); er = getErrorRates("phix.fasta.rcnts", type="sub") er$perReadER # error rate standard error intercept slope # 0 NaN 0 0 er$cycleER # error rate standard error intercept slope # [1,] 0 NaN 0 0 # [2,] 0 NaN 0 0 # [3,] 0 NaN 0 0 plot.SR(er)