annotate test-data/reference.R @ 0:e01de823e919 draft default tip

Uploaded
author biotechcoder
date Fri, 01 May 2015 05:41:51 -0400
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
e01de823e919 Uploaded
biotechcoder
parents:
diff changeset
1 library(riboSeqR)
e01de823e919 Uploaded
biotechcoder
parents:
diff changeset
2 fastaCDS_REF <- findCDS(fastaFile='rsem_chlamy236_deNovo.transcripts.fa', startCodon=c("ATG"), stopCodon=c("TAG", "TAA", "TGA"))
e01de823e919 Uploaded
biotechcoder
parents:
diff changeset
3 ribofiles <- paste("chlamy236_plus_deNovo_plusOnly_Index", c(17,3,5,7), sep = "")
e01de823e919 Uploaded
biotechcoder
parents:
diff changeset
4 rnafiles <- paste("chlamy236_plus_deNovo_plusOnly_Index", c(10,12,14,16), sep = "")
e01de823e919 Uploaded
biotechcoder
parents:
diff changeset
5 riboDat_REF <- readRibodata(ribofiles, rnafiles, replicates=c("WT", "WT", "M", "M"))
e01de823e919 Uploaded
biotechcoder
parents:
diff changeset
6 fCs_REF <- frameCounting(riboDat_REF, fastaCDS_REF)
e01de823e919 Uploaded
biotechcoder
parents:
diff changeset
7 fS_REF <- readingFrame(rC = fCs_REF)
e01de823e919 Uploaded
biotechcoder
parents:
diff changeset
8
e01de823e919 Uploaded
biotechcoder
parents:
diff changeset
9 pdf(file="/tmp/Periodicity-plot.pdf")
e01de823e919 Uploaded
biotechcoder
parents:
diff changeset
10 plotFS(fS_REF, legend.text = c('Frame 0', 'Frame 1', 'Frame 2'))
e01de823e919 Uploaded
biotechcoder
parents:
diff changeset
11 dev.off()
e01de823e919 Uploaded
biotechcoder
parents:
diff changeset
12
e01de823e919 Uploaded
biotechcoder
parents:
diff changeset
13 ffCs_REF <- filterHits(fCs_REF, lengths=c(27,28), frames=list(1,0), hitMean = 50, unqhitMean = 10, fS=fS_REF)
e01de823e919 Uploaded
biotechcoder
parents:
diff changeset
14 pdf(file='/tmp/Metagene-analysis-plot.pdf')
e01de823e919 Uploaded
biotechcoder
parents:
diff changeset
15 plotCDS(coordinates=ffCs_REF@CDS, riboDat=riboDat_REF, lengths=27)
e01de823e919 Uploaded
biotechcoder
parents:
diff changeset
16 plotCDS(coordinates=ffCs_REF@CDS, riboDat=riboDat_REF, lengths=28)
e01de823e919 Uploaded
biotechcoder
parents:
diff changeset
17 dev.off()
e01de823e919 Uploaded
biotechcoder
parents:
diff changeset
18
e01de823e919 Uploaded
biotechcoder
parents:
diff changeset
19 pdf(file='/tmp/Ribosome-profile-plot.pdf')
e01de823e919 Uploaded
biotechcoder
parents:
diff changeset
20 plotTranscript("CUFF.37930.1", coordinates=ffCs_REF@CDS, riboData=riboDat_REF, length=27, cap=200)
e01de823e919 Uploaded
biotechcoder
parents:
diff changeset
21 dev.off()
e01de823e919 Uploaded
biotechcoder
parents:
diff changeset
22
e01de823e919 Uploaded
biotechcoder
parents:
diff changeset
23 riboCounts_REF <- sliceCounts(ffCs_REF, lengths = c(27,28), frames = list(0,2))
e01de823e919 Uploaded
biotechcoder
parents:
diff changeset
24 rnaCounts_REF <- rnaCounts(riboDat_REF, ffCs_REF@CDS)
e01de823e919 Uploaded
biotechcoder
parents:
diff changeset
25
e01de823e919 Uploaded
biotechcoder
parents:
diff changeset
26 save('fastaCDS_REF', 'riboDat_REF', 'fCs_REF', 'fS_REF', 'ffCs_REF', 'riboCounts_REF', 'rnaCounts_REF', file='Robjects.rda')
e01de823e919 Uploaded
biotechcoder
parents:
diff changeset
27
e01de823e919 Uploaded
biotechcoder
parents:
diff changeset
28
e01de823e919 Uploaded
biotechcoder
parents:
diff changeset
29
e01de823e919 Uploaded
biotechcoder
parents:
diff changeset
30
e01de823e919 Uploaded
biotechcoder
parents:
diff changeset
31
e01de823e919 Uploaded
biotechcoder
parents:
diff changeset
32
e01de823e919 Uploaded
biotechcoder
parents:
diff changeset
33
e01de823e919 Uploaded
biotechcoder
parents:
diff changeset
34