Mercurial > repos > vimalkumarvelayudhan > riboseqr_wrapper
comparison test-data/reference.R @ 5:423ad61697c4
Bugfix 1: [triplet] Lengths (frameCounting) if given should be a range (not zero).
readingFrame function fails with subscript out of bounds.
Bugfix 2: [triplet] Check if transcript name in SAM matches the name in FASTA. Produce
an error message if it's not. This fixes the problem where an empty plot is
produced (no bars).
[ribosome_profile] - A proper error message is now produced if an invalid transcript name is
provided.
Updated test data
| author | Vimalkumar Velayudhan <vimalkumarvelayudhan@gmail.com> |
|---|---|
| date | Tue, 27 Oct 2015 12:21:50 +0000 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 2:b2eb07000039 | 5:423ad61697c4 |
|---|---|
| 1 # Script used to prepare the input data for Triplet periodicity step. It is done this way | |
| 2 # as SAM files were not available for this dataset at the time this release was made | |
| 3 library(riboSeqR) | |
| 4 fastaCDS <- findCDS(fastaFile='rsem_chlamy236_deNovo.transcripts.fa', startCodon=c("ATG"), stopCodon=c("TAG", "TAA", "TGA")) | |
| 5 | |
| 6 # RiboSeq file 1-4 are just links to chlamy236_plus_deNovo_plusOnly_Index[17,3,5,7] | |
| 7 ribofiles <- paste(c("RiboSeq file 1", "RiboSeq file 2", "RiboSeq file 3", "RiboSeq file 4")) | |
| 8 rnafiles <- paste(c("RNASeq file 1", "RNASeq file 2", "RNASeq file 3", "RNASeq file 4")) | |
| 9 riboDat <- readRibodata(ribofiles, rnafiles, replicates=c("WT", "WT", "M", "M")) | |
| 10 save('riboDat', file='Prepare riboSeqR input (R data file)', compress=FALSE) | |
| 11 | |
| 12 fCs <- frameCounting(riboDat, fastaCDS) | |
| 13 fS <- readingFrame(rC = fCs) | |
| 14 | |
| 15 #pdf(file="/tmp/Periodicity-plot.pdf") | |
| 16 #plotFS(fS, legend.text = c('Frame 0', 'Frame 1', 'Frame 2')) | |
| 17 #dev.off() | |
| 18 | |
| 19 ffCs <- filterHits(fCs, lengths=c(27,28), frames=list(1,0), hitMean = 50, unqhitMean = 10, fS=fS) | |
| 20 save('fastaCDS', 'riboDat', 'fCs', 'fS', 'ffCs', file='Metagene analysis (R data file)', compress=FALSE) | |
| 21 | |
| 22 #pdf(file='/tmp/Metagene-analysis-plot.pdf') | |
| 23 #plotCDS(coordinates=ffCs@CDS, riboDat=riboDat, lengths=27) | |
| 24 #plotCDS(coordinates=ffCs@CDS, riboDat=riboDat, lengths=28) | |
| 25 #dev.off() | |
| 26 # | |
| 27 #pdf(file='/tmp/Ribosome-profile-plot.pdf') | |
| 28 #plotTranscript("CUFF.37930.1", coordinates=ffCs@CDS, riboData=riboDat, length=27, cap=200) | |
| 29 #dev.off() | |
| 30 # | |
| 31 #riboCounts <- sliceCounts(ffCs, lengths = c(27,28), frames = list(0,2)) | |
| 32 #rnaCounts <- rnaCounts(riboDat, ffCs@CDS) | |
| 33 | |
| 34 #save('fastaCDS', 'riboDat', 'fCs', 'fS', 'ffCs', 'riboCounts', 'rnaCounts', file='Robjects.rda') | |
| 35 | |
| 36 | |
| 37 | |
| 38 | |
| 39 | |
| 40 | |
| 41 | |
| 42 |
