[Seqinr-commits] r1475 - pkg/inst/doc/src/mainmatter

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Oct 20 17:37:53 CEST 2008


Author: lobry
Date: 2008-10-20 17:37:52 +0200 (Mon, 20 Oct 2008)
New Revision: 1475

Modified:
   pkg/inst/doc/src/mainmatter/risa.rnw
   pkg/inst/doc/src/mainmatter/risa.tex
Log:
 

Modified: pkg/inst/doc/src/mainmatter/risa.rnw
===================================================================
--- pkg/inst/doc/src/mainmatter/risa.rnw	2008-10-12 08:29:25 UTC (rev 1474)
+++ pkg/inst/doc/src/mainmatter/risa.rnw	2008-10-20 15:37:52 UTC (rev 1475)
@@ -305,7 +305,8 @@
   # Loop over all sequences:
   #
   for(i in seq_len(res3$nelem)){
-    result[[i]] <- mn2risa(seqnames[i], amo1, amo2, verbose = verbose)
+    try.res <- try(result[[i]] <- mn2risa(seqnames[i], amo1, amo2, verbose = verbose))
+    if(inherits(try.res, "try-error")) result[[i]] <- -Inf
   }
   return(result)
 }
@@ -372,7 +373,8 @@
   	  i <- i + 1
   	  next
   	}
-  resultat[[i]] <- sp2risa(sp=sp,amo1, amo2, verbose = TRUE)
+  try.res <- try(resultat[[i]] <- sp2risa(sp=sp,amo1, amo2, verbose = TRUE))
+  if(inherits(try.res, "try-error")) resultat[[i]] <- -Inf
   save(resultat, file = "resultat.RData")
   print(paste("=>", resultat[[i]]))
   i <- i + 1
@@ -400,6 +402,21 @@
 table(unlist(lapply(resultat,length)))
 @ 
 
+Show how many IGS of different size we have per species.
+
+<<ndIGSpsp,fig=T>>=
+igsdbysp <- unlist(lapply(resultat, function(x)length(unique(unlist(x)))))
+plot(table(igsdbysp),
+xlab = "Number of IGS of different size",
+ylab = "Number of species")
+@ 
+
+Which are the species with the most important number of IGS?
+
+<<igsdbysp,fig=F>>=
+tail(igsdbysp[order(igsdbysp)], n = 30)
+@ 
+
 How many IGS do we have there:
 
 <<brut,fig=F>>=
@@ -415,9 +432,9 @@
 y <- tab
 plot(x,y, type = "h", ylim = c(0, max(y)),
 main = "Global distribution of IGS length",
-las = 1, ylab = "Count", xlab = "Size in bp")
+las = 1, ylab = "Count", xlab = "Size in bp", xlim = c(0,1500))
 
-dst <- density(brut2, adj = 0.1)
+dst <- density(brut2, adj = 0.2)
 lines(dst$x, dst$y*max(y)/max(dst$y), col = "red", xpd=NA)
 @ 
 

Modified: pkg/inst/doc/src/mainmatter/risa.tex
===================================================================
--- pkg/inst/doc/src/mainmatter/risa.tex	2008-10-12 08:29:25 UTC (rev 1474)
+++ pkg/inst/doc/src/mainmatter/risa.tex	2008-10-20 15:37:52 UTC (rev 1475)
@@ -404,7 +404,8 @@
    # Loop over all sequences:
    #
    for(i in seq_len(res3$nelem)){
-     result[[i]] <- mn2risa(seqnames[i], amo1, amo2, verbose = verbose)
+     try.res <- try(result[[i]] <- mn2risa(seqnames[i], amo1, amo2, verbose = verbose))
+     if(inherits(try.res, "try-error")) result[[i]] <- -Inf
    }
    return(result)
  }
@@ -475,7 +476,10 @@
          i <- i + 1
          next
      }
-     resultat[[i]] <- sp2risa(sp = sp, amo1, amo2, verbose = TRUE)
+     try.res <- try(resultat[[i]] <- sp2risa(sp = sp, amo1, 
+         amo2, verbose = TRUE))
+     if (inherits(try.res, "try-error")) 
+         resultat[[i]] <- -Inf
      save(resultat, file = "resultat.RData")
      print(paste("=>", resultat[[i]]))
      i <- i + 1
@@ -500,7 +504,7 @@
  (nnull <- sum(lesnull))
 \end{Sinput}
 \begin{Soutput}
-[1] 1901
+[1] 1
 \end{Soutput}
 \begin{Sinput}
  resultat <- resultat[!lesnull]
@@ -514,11 +518,66 @@
  table(unlist(lapply(resultat, length)))
 \end{Sinput}
 \begin{Soutput}
-  1   2   3   8  22  25  69 107 
-236  10   1   1   1   1   1   1 
+   1    2    3    4    5    6    7    8    9   10   11   12   13   14   15 
+1567  253  114   51   24   22   27   11   10    6    6    3    2    6    5 
+  16   17   18   19   20   21   22   23   24   25   26   29   31   35   37 
+   4    3    6    1    4    1    5    1    2    1    3    2    1    1    1 
+  39   45   64   69   71   72   80  107  139 
+   1    1    1    1    1    1    1    1    1 
 \end{Soutput}
 \end{Schunk}
 
+Show how many IGS of different size we have per species.
+
+\begin{Schunk}
+\begin{Sinput}
+ igsdbysp <- unlist(lapply(resultat, function(x) length(unique(unlist(x)))))
+ plot(table(igsdbysp), xlab = "Number of IGS of different size", 
+     ylab = "Number of species")
+\end{Sinput}
+\end{Schunk}
+\includegraphics{../figs/risa-ndIGSpsp}
+
+Which are the species with the most important number of IGS?
+
+\begin{Schunk}
+\begin{Sinput}
+ tail(igsdbysp[order(igsdbysp)], n = 30)
+\end{Sinput}
+\begin{Soutput}
+           KLEBSIELLA PNEUMONIAE 342                 CAMPYLOBACTER JEJUNI 
+                                   6                                    7 
+                  PSEUDOMONAS PUTIDA         SHEWANELLA WOODYI ATCC 51908 
+                                   7                                    7 
+        SHEWANELLA SEDIMINIS HAW-EB3              ESCHERICHIA COLI CFT073 
+                                   7                                    7 
+                     VIBRIO CHOLERAE                    VIBRIO VULNIFICUS 
+                                   7                                    7 
+VIBRIO PARAHAEMOLYTICUS RIMD 2210633            BACILLUS HALODURANS C-125 
+                                   7                                    7 
+   HELIOBACTERIUM MODESTICALDUM ICE1                  CUPRIAVIDUS NECATOR 
+                                   7                                    8 
+             PSEUDOMONAS FLUORESCENS  CANDIDATUS COMPETIBACTER PHOSPHATIS 
+                                   8                                    8 
+             VIBRIO PARAHAEMOLYTICUS                  BACILLUS HALODURANS 
+                                   8                                    8 
+   ALKALIPHILUS METALLIREDIGENS QYMF                 SORANGIUM CELLULOSUM 
+                                   8                                    9 
+            BRADYRHIZOBIUM JAPONICUM           PSYCHROMONAS INGRAHAMII 37 
+                                   9                                    9 
+     GEOBACILLUS KAUSTOPHILUS HTA426           RHODOPSEUDOMONAS PALUSTRIS 
+                                   9                                   10 
+                    ESCHERICHIA COLI             GEOBACILLUS KAUSTOPHILUS 
+                                  10                                   10 
+               VIBRIO FISCHERI ES114                KLEBSIELLA PNEUMONIAE 
+                                  11                                   12 
+        PHOTOBACTERIUM PROFUNDUM SS9                      BACILLUS CEREUS 
+                                  12                                   13 
+               STAPHYLOCOCCUS AUREUS         UNCULTURED SYNECHOCOCCUS SP. 
+                                  24                                   29 
+\end{Soutput}
+\end{Schunk}
+
 How many IGS do we have there:
 
 \begin{Schunk}
@@ -527,14 +586,14 @@
  length(brut)
 \end{Sinput}
 \begin{Soutput}
-[1] 513
+[1] 7659
 \end{Soutput}
 \begin{Sinput}
  brut2 <- brut[!is.na(brut)]
  length(brut2)
 \end{Sinput}
 \begin{Soutput}
-[1] 172
+[1] 4373
 \end{Soutput}
 \end{Schunk}
 
@@ -544,8 +603,9 @@
  x <- as.numeric(unlist(dimnames(tab)))
  y <- tab
  plot(x, y, type = "h", ylim = c(0, max(y)), main = "Global distribution of IGS length", 
-     las = 1, ylab = "Count", xlab = "Size in bp")
- dst <- density(brut2, adj = 0.1)
+     las = 1, ylab = "Count", xlab = "Size in bp", xlim = c(0, 
+         1500))
+ dst <- density(brut2, adj = 0.2)
  lines(dst$x, dst$y * max(y)/max(dst$y), col = "red", xpd = NA)
 \end{Sinput}
 \end{Schunk}
@@ -570,7 +630,7 @@
 There were two compilation steps:
 
 \begin{itemize}
-  \item \Rlogo{} compilation time was: Sat Oct 11 18:42:20 2008
+  \item \Rlogo{} compilation time was: Thu Oct 16 11:18:43 2008
   \item \LaTeX{} compilation time was: \today
 \end{itemize}
 



More information about the Seqinr-commits mailing list