[Wavetiling-commits] r36 - in pkg: . R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Apr 24 07:26:12 CEST 2012


Author: kdbeuf
Date: 2012-04-24 07:26:12 +0200 (Tue, 24 Apr 2012)
New Revision: 36

Modified:
   pkg/DESCRIPTION
   pkg/R/helperFunctions.R
   pkg/R/methods-WaveTilingFeatureSet.R
   pkg/R/methods-WfmInf.R
Log:


Modified: pkg/DESCRIPTION
===================================================================
--- pkg/DESCRIPTION	2012-04-18 09:38:52 UTC (rev 35)
+++ pkg/DESCRIPTION	2012-04-24 05:26:12 UTC (rev 36)
@@ -1,5 +1,5 @@
 Package: waveTiling
-Version: 0.1.35
+Version: 0.1.36
 Date: 2012-02-16
 License: GPL (>=2)
 Title: Wavelet-Based Models for Tiling Array Transcriptome Analysis
@@ -7,7 +7,7 @@
 Maintainer: Kristof De Beuf <kristof.debeuf at UGent.be>
 Depends: oligo, oligoClasses, Biobase, Biostrings
 Imports: methods, affy, preprocessCore, GenomicRanges, waveslim, GenomeGraphs, IRanges
-Suggests: BSgenome
+Suggests: BSgenome, BSgenome.Athaliana.TAIR.TAIR9
 Description: This package is designed to conduct transcriptome analysis for tiling arrays based on fast wavelet-based functional models.
 Collate: allClasses.R allGenerics.R helperFunctions.R
         initialize-methods.R methods-MapFilterProbe.R

Modified: pkg/R/helperFunctions.R
===================================================================
--- pkg/R/helperFunctions.R	2012-04-18 09:38:52 UTC (rev 35)
+++ pkg/R/helperFunctions.R	2012-04-24 05:26:12 UTC (rev 36)
@@ -225,14 +225,14 @@
 				varEps[i] <- sum(D[,starts[i]:ends[i]]*VinvD)/(ends[i]-starts[i]+1)/N
 			}
 			crit1 <- -1/2*sum(log(t(X)%*%X%*%WaveFit$phi+rep(1,ncol(X))))-1/2*(log(varEps)%*%Kj)-N*K*log(2*pi)/2-N*K/2
-			if (trace==TRUE) message("\n iteration", j,"of",max.it)
+			if (trace==TRUE) message("iteration ", j," of ",max.it)
 			if ((abs((crit0-crit1)/crit0))<tol)
 			{
-				if (trace==TRUE) message("\n Gauss Seidel algorithm converged \n")
+				if (trace==TRUE) message("Gauss Seidel algorithm converged")
 				break
 			}
 		}
-		if ((abs(crit0-crit1)/crit0)>tol) message("\n Warning: The maximum number of iterations reached without convergence\n")
+		if ((abs(crit0-crit1)/crit0)>tol) message("Warning: The maximum number of iterations reached without convergence")
 	}
 	if (!saveall)
 	{

Modified: pkg/R/methods-WaveTilingFeatureSet.R
===================================================================
--- pkg/R/methods-WaveTilingFeatureSet.R	2012-04-18 09:38:52 UTC (rev 35)
+++ pkg/R/methods-WaveTilingFeatureSet.R	2012-04-24 05:26:12 UTC (rev 36)
@@ -96,10 +96,10 @@
 		trBand <- max(setTrustBand,minTrustBand)
 		if ((strand=="forward") | (strand=="both"))
 		{
-			message("begin remapping forward strand...\n")
-			message("extract probe sequences\n")
+			message("begin remapping forward strand...")
+			message("extract probe sequences")
 			pmSeqDict <- PDict(dataPMSeq,tb.start=1,tb.end=trBand)
-			message("match probe sequences to DNA sequence\n")
+			message("match probe sequences to DNA sequence")
 			chrSeqList <- list()
 			for (i in chrId)
 			{
@@ -121,11 +121,11 @@
 			posInit <- c()
 			posInit[mp[,1]] <- unlist(lapply(startPM,function(x) unlist(x[pmMatch])))
 			strandInit <- rep("forward",length(pmMatchIndex))
-			message("remapping forward strand done\n")
+			message("remapping forward strand done")
 		}
 		if ((strand=="reverse") | (strand=="both"))
 		{
-			message("begin remapping reverse strand...\n")
+			message("begin remapping reverse strand...")
 			## Fix me: sometimes reverseComplement/sometimes not?
 			dataPMSeqRevComp <- reverseComplement(pmSequence(object))
 			#dataPMSeqRevComp <- pmSequence(object)
@@ -140,7 +140,7 @@
 				}
 				names(chrSeqList) <- seqnames(BSgenomeObject)[chrId]
 			}
-			message("match probe sequences to DNA sequence\n")
+			message("match probe sequences to DNA sequence")
 			startPMRevComp <- lapply(chrSeqList,function(x) startIndex(matchPDict(pmSeqDictRevComp,x)))
 			nposChrPMRevComp <- lapply(startPMRevComp,function(x) sapply(x,length))
 			pmMatchRevComp <- Reduce("+",nposChrPMRevComp)==1
@@ -156,7 +156,7 @@
 			posInitRevComp <- c()
 			posInitRevComp[mp[,1]] <- unlist(lapply(startPMRevComp,function(x) unlist(x[pmMatchRevComp])))
 			strandInitRevComp <- rep("reverse",length(pmMatchIndexRevComp))
-			message("remapping reverse strand done\n")
+			message("remapping reverse strand done")
 		}
 	}
 	else
@@ -184,7 +184,7 @@
 	pmMmOverlap <- NULL
 	if (strand=="both")
 	{
-		message("filter overlaps forward-reverse strand\n")
+		message("filter overlaps forward-reverse strand")
 		## should be done more efficiently with something in Biostrings... ("%in%" does not work)
 		dataPMSeqChar <- as.character(dataPMSeq)
 		dataPMSeqRevCompChar <- as.character(dataPMSeqRevComp)
@@ -193,7 +193,7 @@
 	}
 	if (MM)
 	{
-		message("filter overlaps PM-MM\n")
+		message("filter overlaps PM-MM")
 		if (strand=="forward")
 		{
 			dataMMSeq <- pm2mm(dataPMSeq)

Modified: pkg/R/methods-WfmInf.R
===================================================================
--- pkg/R/methods-WfmInf.R	2012-04-18 09:38:52 UTC (rev 35)
+++ pkg/R/methods-WfmInf.R	2012-04-24 05:26:12 UTC (rev 36)
@@ -75,7 +75,7 @@
 	annoChrGeneGR <- annoChrGR[geneId]
 	#annoChrGeneStrandGR <- annoChrGeneGR[strand(annoChrGeneGR)==strandAlt]
 	#annoChrGeneStrandOppGR <- annoChrGeneGR[strand(annoChrGeneGR)==strandOpp]
-	message("find overlaps with detected regions...\n")
+	message("find overlaps with detected regions...")
 	nList <- length(regions)
 	annoOver <- GRangesList()
 	for (j in 1:nList)
@@ -115,13 +115,13 @@
 		strandAlt <- "-"
 		strandOpp <- "+"
 	}
-	message("get annotated regions...\n")
+	message("get annotated regions...")
 	annoExons <- annoFile[(annoFile$strand==strandAlt)&(annoFile$chromosome==chromosome)&((annoFile$feature=="exon")|(annoFile$feature=="pseudogenic_exon")),c("chromosome","strand","feature","ID","start","end")]
 	annoExonsOpp <- annoFile[(annoFile$strand==strandOpp)&(annoFile$chromosome==chromosome)&((annoFile$feature=="exon")|(annoFile$feature=="pseudogenic_exon")),c("chromosome","strand","feature","ID","start","end")]
 	regGlocNoAnnoSense <- list()
 	regGlocNoAnnoBoth <- list()
 	nList <- length(regions)
-	message("find overlaps with detected regions...\n")
+	message("find overlaps with detected regions...")
 	for (j in 1:nList)
 	{
 		regGlocIR <- regions[[j]]
@@ -129,8 +129,8 @@
 		annoExonsOppIR <- IRanges(start=annoExonsOpp$start,end=annoExonsOpp$end)
 		overSense <- findOverlaps(regGlocIR,annoExonsIR)
 		overOpp <- findOverlaps(regGlocIR,annoExonsOppIR)
-		noAnnoSenseId <- which(!(1:length(regGlocIR) %in% matchMatrix(overSense)[,1]))
-		noAnnoOppId <- which(!(1:length(regGlocIR) %in% matchMatrix(overOpp)[,1]))
+		noAnnoSenseId <- which(!(1:length(regGlocIR) %in% as.matrix(overSense)[,1]))
+		noAnnoOppId <- which(!(1:length(regGlocIR) %in% as.matrix(overOpp)[,1]))
 		noAnnoBothId <- which((1:length(regGlocIR) %in% noAnnoSenseId) & (1:length(regGlocIR) %in% noAnnoOppId))
 		regGlocNoAnnoSense[[j]] <- regGlocIR[noAnnoSenseId]
 		regGlocNoAnnoBoth[[j]] <- regGlocIR[noAnnoBothId]



More information about the Wavetiling-commits mailing list