Re: [Bioc-devel] BiocStyle on windows with spaces in path names

2014-10-09 Thread Henrik Bengtsson
On Wed, Oct 8, 2014 at 12:20 PM, Martin Morgan mtmor...@fhcrc.org wrote:
 On 10/08/2014 11:41 AM, Henrik Bengtsson wrote:

 You may want to make those function local to latex().  I haven't
 verified it works (won't have time), but I bet a beer that it will
 work.


 I'll take you up on the bet, at least for some definition of 'work'. For
 instance when debugging a vignette or writing a complicated Makefile for
 courses I commonly do the equivalent of

   R CMD Sweave foo.Rnw
   R CMD texi2dvi --pdf foo.tex

 Any environment variables set running Sweave are not available running
 texi2dvi.

Easy,

Rscript -e R.rsp::rfile foo.Rnw

would Sweave + texi2dvi --pdf in one go.  Putting that aside, I'm
happy to buy you a beer :)

Another solution along along lines of using TEXINPUTS would be to do:

R CMD Sweave foo.Rnw
export TEXINPUTS=`Rscript -e BiocStyle::texinputs()`
R CMD texi2dvi --pdf foo.tex


A third different (and obvious) solution, is to copy the files to
the current directory, i.e.

$ svn diff -x --ignore-all-space R/latex.R
Index: R/latex.R
===
--- R/latex.R   (revision 95224)
+++ R/latex.R   (working copy)
@@ -3,12 +3,14 @@
  error=FALSE, use.unsrturl=TRUE)
 {
 options(..., width=width)
-cat(sprintf(\\RequirePackage{%s}\n\n,
-sub(.sty$, , .bioconductor.sty)))
+sty - .bioconductor.sty
+file.copy(sty, basename(sty), overwrite=TRUE)
+cat(\\RequirePackage{Bioconductor}\n\n)

 if (use.unsrturl) {
 bst - file.path(system.file(package=BiocStyle, resources,
  latex), unsrturl)
+file.copy(bst, basename(bst), overwrite=TRUE)
 cat(sprintf(\\AtBeginDocument{\\bibliographystyle{%s}}\n, bst))
 }

This works also in your use case and those local copies are
automagically cleaned out by R CMD build.  This passes R CMD check
--as-cran on BiocStyle etc.  Now one can argue that it will clutter up
your local directory.  For the original problem of \usepackage{} et
al. does not support spaces in paths one can also copy to a temporary
directory and use that path instead.  (Personally I favor not
specifying paths at all to make even the intermediate *.tex file
portable.)

/Henrik



 Martin


 --
 Computational Biology / Fred Hutchinson Cancer Research Center
 1100 Fairview Ave. N.
 PO Box 19024 Seattle, WA 98109

 Location: Arnold Building M1 B861
 Phone: (206) 667-2793

___
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel


Re: [Bioc-devel] NAMESPACE question

2014-10-09 Thread Robert Castelo

hi Martin,

thanks for your recommendations regarding the conditional loading of 
packages. I think however, that they are not related to the problem I'm 
referring. Let me put here a reproducible example which works with 
qpgraph version 0.99.7 that I have just pushed to svn:


library(qtl)
library(qpgraph)

map - sim.map(len=100, n.mar=10, anchor.tel=FALSE, eq.spacing=TRUE, 
include.x=FALSE)


eqtlcross - eQTLcross(map)
eqtlcross - addGenes(eqtlcross, 5)
eqtlcross - addeQTL(eqtlcross, g1, location=map[[1]][1])

sim.eqtl - reQTLcross(eqtlcross, rho=0.5, a=1)
cross - sim.cross(map, sim.eqtl, n.ind=100)

gstarts -runif(5, min=range(map[[1]])[1], max=range(map[[1]])[2])

annot - data.frame(chr=rep(names(map)[1], 5),
start=gstarts, end=gstarts+1,
strand=rep(+, 5),
row.names=sim.eqtl$model$Y,
stringsAsFactors=FALSE)

## the following is the method that triggers the
## unexpected behavior. Its last but one instruction
## in line 208 of file qpgraph/R/eQTLnetworkEstimationParam-methods.R
## is the following:
##
## geneAnnotation - geneAnnotation[genes]
##
## and should be using the method [ imported from GenomicRanges
## however it starts loading a number of packages to do the job

param - eQTLnetworkEstimationParam(cross, geneAnnotation=annot, 
genome=simulatedGenome)

Loading required package: parallel

Attaching package: ‘BiocGenerics’

The following objects are masked from ‘package:parallel’:

[...etc...]

sessionInfo()
R version 3.1.0 (2014-04-10)
Platform: x86_64-unknown-linux-gnu (64-bit)

locale:
 [1] LC_CTYPE=en_US.UTF8   LC_NUMERIC=C 
LC_TIME=en_US.UTF8LC_COLLATE=en_US.UTF8
 [5] LC_MONETARY=en_US.UTF8LC_MESSAGES=en_US.UTF8 
LC_PAPER=en_US.UTF8   LC_NAME=C
 [9] LC_ADDRESS=C  LC_TELEPHONE=C 
LC_MEASUREMENT=en_US.UTF8 LC_IDENTIFICATION=C


attached base packages:
[1] stats4parallel  stats graphics  grDevices utils datasets 
 methods   base


other attached packages:
[1] IRanges_1.99.28 S4Vectors_0.2.4 BiocGenerics_0.11.5 
qpgraph_1.99.7  qtl_1.33-7

[6] vimcom_0.9-93   setwidth_1.0-3  colorout_1.0-2

loaded via a namespace (and not attached):
 [1] annotate_1.43.5  AnnotationDbi_1.27.16base64enc_0.1-2 
 BatchJobs_1.4
 [5] BBmisc_1.7   Biobase_2.25.0 
BiocParallel_0.99.22 biomaRt_2.21.1
 [9] Biostrings_2.33.14   bitops_1.0-6 brew_1.0-6 
 checkmate_1.4
[13] codetools_0.2-9  DBI_0.3.1digest_0.6.4 
fail_1.2
[17] foreach_1.4.2futile.logger_1.3.7 
futile.options_1.0.0 GenomeInfoDb_1.1.23
[21] GenomicAlignments_1.1.30 GenomicFeatures_1.17.19 
GenomicRanges_1.17.42graph_1.43.0
[25] grid_3.1.0   iterators_1.0.7  lambda.r_1.1.6 
lattice_0.20-29
[29] Matrix_1.1-4 mvtnorm_1.0-0RCurl_1.95-4.3 
Rgraphviz_2.9.1
[33] Rsamtools_1.17.34RSQLite_0.11.4 
rtracklayer_1.25.17  sendmailR_1.2-1
[37] stringr_0.6.2tools_3.1.0  XML_3.98-1.1 
xtable_1.7-4

[41] XVector_0.5.8zlibbioc_1.11.1


cheers,
robert.



On 10/07/2014 05:54 PM, Martin Morgan wrote:

On 10/07/2014 08:15 AM, Robert Castelo wrote:

hi, it happens only with [, that's why i'm puzzled.

it behaves as if you load a GRanges object 'x' and try to subset it

x[1]

without loading 'GenomicRanges' first.


Is there a reproducible example? I see in your code there are several
places where you require() or library() various packages. I think one of
these Depends: on GenomicRanges, and the messages you see are the effect
of moving GenomicRanges from 'loaded' to 'attached'. You can see the
effect with

library(qpgraph)
sessionInfo() ## GenomicRanges loaded but not attached
library(GenomicRanges) ## information about the package being attached

Probably in your code you do not actually want to require() ad hoc
packages and influence the user search path (and implicitly rely on
search path order for correct functionality), but rather to
requireNamespace(foo); foo::fun(...) (or possibly loadNamespace()).

Complicated!

Martin



robert.

On 10/07/2014 05:05 PM, Michael Lawrence wrote:

Does that happen with the other methods or just [? As a last resort,
you could just drop the import (because [ is a primitive, it should
just work).

On Tue, Oct 7, 2014 at 3:08 AM, Robert Castelo robert.cast...@upf.edu
mailto:robert.cast...@upf.edu wrote:

hi Martin,

On 10/06/2014 07:24 PM, Martin Morgan wrote:
[...]

There are two 'as.vector' generics, one defined in Matrix and one in
BiocGenerics (and made available via IRanges). These generics have
different methods

 showMethods(Matrix::as.vector)
Function: as.vector (package base)
x=abIndex, mode=ANY
x=abIndex, mode=character
x=ANY, mode=ANY
x=dgCMatrix, mode=missing
x=dgeMatrix, mode=missing
x=diagonalMatrix, mode=missing
x=dsCMatrix, mode=missing
x=ldenseMatrix, 

[Bioc-devel] Faculty Position in Computational Systems Biology at UC Riverside

2014-10-09 Thread Thomas Girke
University of California, Riverside
AP Recruit job link: https://aprecruit.ucr.edu/apply/JPF00230

POSITION
We are seeking an Assistant Professor in the field of Computational
Systems Biology. Research should be in systems biology, using
computational approaches or a combination of both experimental and
computational approaches.

TITLE/RANK
Assistant Professor. Appointment and salary will be competitive and
commensurate with accomplishments.

LOCATION
University of California, Riverside.

BACKGROUND
The successful candidate will hold an academic appointment in the
Department of Botany and Plant Sciences with the option of a secondary
cooperating faculty appointment in a quantitative department such as
statistics, computer science, engineering or related. The candidate will
also join the innovative and multidisciplinary Institute for Integrative
Genome Biology (IIGB) which connects theoretical and experimental
researchers from different departments in Life, Physical and
Mathematical Sciences, Medicine, Engineering and various campus based
Centers. The IIGB is organized around a 10,000 sq.ft. suite of
Instrumentation Facilities that serve as a centralized, shared­use
resource for faculty, staff and students, offering advanced tools in
bioinformatics, microscopy, proteomics and genomics. Its bioinformatic
component is equipped with a modern high­performance compute (HPC)
infrastructure. This position will include an appointment in the
Agricultural Experiment Station, which incl udes the responsibility to
conduct research and outreach relevant to the mission of the California
Agricultural Experiment Station (http://cnas.ucr.edu/about/anr/).


QUALIFICATIONS
A Ph.D. in a field related to systems biology is required including
several years of postdoctoral research.


RESPONSIBILITIES
Qualified candidates are expected to have excellent publication and
research records in computational systems biology or related areas, such
as bioinformatics or computational genome biology. The candidate’s
research program should be heavily focused on involving modern
high­throughput data, especially from next generation sequencing
technologies. An additional requirement is a strong commitment to
teaching in computational systems biology.


TO APPLY
Review of applications will begin November 7, 2014 and continue until
the position is filled. Interested individuals should: (1) submit a
curriculum vitae, (2) provide a statement of research, and (3) three
letters of reference. A teaching statement is strongly recommended.
Please submit your applications through the AP Recruit job link:
https://aprecruit.ucr.edu/apply/JPF00230

Websites: http://www.genomics.ucr.edu, http://cnas.ucr.edu/, http://www.ucr.edu

The University of California is an Equal Opportunity/Affirmative Action
Employer/Veterans Employer. In accordance with Federal law, we are
making available our Campus Security Report to all prospective
employees.

___
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel


Re: [Bioc-devel] NAMESPACE question

2014-10-09 Thread Hervé Pagès

Hi Robert, Martin,

Yes using requireNamespace() internally is much cleaner than using
require(). Sorry for that. Just made the change in S4Vectors 0.2.6.
FYI the need to load IRanges namespace in a couple of places
inside S4Vectors is temporary and will go away soon.

Cheers,
H.

On 10/09/2014 09:33 AM, Martin Morgan wrote:

On 10/09/2014 08:00 AM, Robert Castelo wrote:

hi Martin,

thanks for your recommendations regarding the conditional loading of
packages. I
think however, that they are not related to the problem I'm referring.
Let me
put here a reproducible example which works with qpgraph version
0.99.7 that I
have just pushed to svn:

library(qtl)
library(qpgraph)

map - sim.map(len=100, n.mar=10, anchor.tel=FALSE, eq.spacing=TRUE,
include.x=FALSE)

eqtlcross - eQTLcross(map)
eqtlcross - addGenes(eqtlcross, 5)
eqtlcross - addeQTL(eqtlcross, g1, location=map[[1]][1])

sim.eqtl - reQTLcross(eqtlcross, rho=0.5, a=1)
cross - sim.cross(map, sim.eqtl, n.ind=100)

gstarts -runif(5, min=range(map[[1]])[1], max=range(map[[1]])[2])

annot - data.frame(chr=rep(names(map)[1], 5),
 start=gstarts, end=gstarts+1,
 strand=rep(+, 5),
 row.names=sim.eqtl$model$Y,
 stringsAsFactors=FALSE)

## the following is the method that triggers the
## unexpected behavior. Its last but one instruction
## in line 208 of file qpgraph/R/eQTLnetworkEstimationParam-methods.R
## is the following:
##
## geneAnnotation - geneAnnotation[genes]
##
## and should be using the method [ imported from GenomicRanges
## however it starts loading a number of packages to do the job

param - eQTLnetworkEstimationParam(cross, geneAnnotation=annot,
genome=simulatedGenome)
Loading required package: parallel

Attaching package: ‘BiocGenerics’

The following objects are masked from ‘package:parallel’:

[...etc...]


Hmm, I see that the parallel, BiocGenerics, and stats4 packages are
being attached. In a new R session I did this:

  trace(loadNamespace, tracer=recover)
Tracing function loadNamespace in package base
[1] loadNamespace
  param - eQTLnetworkEstimationParam(cross, geneAnnotation=annot,
genome=simulatedGenome)
Loading required package: parallel
Tracing loadNamespace(package, c(which.lib.loc, lib.loc)) on entry

Enter a frame number, or 0 to exit

  1: eQTLnetworkEstimationParam(cross, geneAnnotation = annot, genome =
simulat
  2: geneAnnotation[genes]
  3: geneAnnotation[genes]
  4: extractROWS(x, i)
  5: extractROWS(x, i)
  6: extractROWS(seqnames(x), i)
  7: extractROWS(seqnames(x), i)
  8: suppressWarnings(require(IRanges, quietly = TRUE))
  9: withCallingHandlers(expr, warning = function(w)
invokeRestart(muffleWarnin
10: require(IRanges, quietly = TRUE)
...

and it's likely from

./S4Vectors/R/Rle-class.R:if (!suppressWarnings(require(IRanges,
quietly=TRUE)))
./S4Vectors/R/Rle-class.R:if (!suppressWarnings(require(IRanges,
quietly=TRUE)))

could be addressed with suppressPackageStartupMessages()
(less-preferred) or requireNamespace(IRanges) followed by
IRanges::...; let's see if we can get that fixed...

Martin



sessionInfo()
R version 3.1.0 (2014-04-10)
Platform: x86_64-unknown-linux-gnu (64-bit)

locale:
  [1] LC_CTYPE=en_US.UTF8   LC_NUMERIC=C LC_TIME=en_US.UTF8
LC_COLLATE=en_US.UTF8
  [5] LC_MONETARY=en_US.UTF8LC_MESSAGES=en_US.UTF8
LC_PAPER=en_US.UTF8
LC_NAME=C
  [9] LC_ADDRESS=C  LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF8
LC_IDENTIFICATION=C

attached base packages:
[1] stats4parallel  stats graphics  grDevices utils datasets
  methods   base

other attached packages:
[1] IRanges_1.99.28 S4Vectors_0.2.4 BiocGenerics_0.11.5
qpgraph_1.99.7  qtl_1.33-7
[6] vimcom_0.9-93   setwidth_1.0-3  colorout_1.0-2

loaded via a namespace (and not attached):
  [1] annotate_1.43.5  AnnotationDbi_1.27.16base64enc_0.1-2
BatchJobs_1.4
  [5] BBmisc_1.7   Biobase_2.25.0 BiocParallel_0.99.22
biomaRt_2.21.1
  [9] Biostrings_2.33.14   bitops_1.0-6 brew_1.0-6
checkmate_1.4
[13] codetools_0.2-9  DBI_0.3.1digest_0.6.4
fail_1.2
[17] foreach_1.4.2futile.logger_1.3.7 futile.options_1.0.0
GenomeInfoDb_1.1.23
[21] GenomicAlignments_1.1.30 GenomicFeatures_1.17.19
GenomicRanges_1.17.42
graph_1.43.0
[25] grid_3.1.0   iterators_1.0.7  lambda.r_1.1.6
lattice_0.20-29
[29] Matrix_1.1-4 mvtnorm_1.0-0RCurl_1.95-4.3
Rgraphviz_2.9.1
[33] Rsamtools_1.17.34RSQLite_0.11.4 rtracklayer_1.25.17
sendmailR_1.2-1
[37] stringr_0.6.2tools_3.1.0  XML_3.98-1.1
xtable_1.7-4
[41] XVector_0.5.8zlibbioc_1.11.1


cheers,
robert.



On 10/07/2014 05:54 PM, Martin Morgan wrote:

On 10/07/2014 08:15 AM, Robert Castelo wrote:

hi, it happens only with [, that's why i'm puzzled.

it behaves as if you load a GRanges object 'x' and try to subset it

x[1]

without loading 'GenomicRanges' first.

Re: [Bioc-devel] a warning we may not need any more?

2014-10-09 Thread Hervé Pagès

Hi Vince,

Good idea. I made that change in GenomeInfoDb 1.1.26:

  library(GenomeInfoDb)
  x - Seqinfo(seqnames=c(chr1, chr2, chr3, chrM),
   seqlengths=c(100, 200, NA, 15),
   isCircular=c(NA, FALSE, FALSE, TRUE),
   genome=toy)

  y - Seqinfo(seqnames=c(chr3, chr4, chrM),
   seqlengths=c(300, NA, 15))

  merge(x, y)  # warning

  genome(y) - genome(x)[[1]]
  merge(x, y)  # no warning

Cheers,
H.

On 10/09/2014 12:04 PM, Vincent Carey wrote:

*Warning message:*

*In .Seqinfo.mergexy(x, y) :*

*  Each of the 2 combined objects has sequence levels not in the other:*

*  - in 'x': chr4, chr16, chr10, chr11, chr18, chr20, chr22*

*  - in 'y': chrY*

*  Make sure to always combine/compare objects based on the same reference*

*  genome (use suppressWarnings() to suppress this warning).*


*It seems to me that if we can check equality of the assigned genomes, we
should*

*not issue this warning.*

[[alternative HTML version deleted]]

___
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel



--
Hervé Pagès

Program in Computational Biology
Division of Public Health Sciences
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N, M1-B514
P.O. Box 19024
Seattle, WA 98109-1024

E-mail: hpa...@fhcrc.org
Phone:  (206) 667-5791
Fax:(206) 667-1319

___
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel


Re: [Bioc-devel] package ‘FEM’ is not available (for R version 3.0.2)

2014-10-09 Thread Dan Tenenbaum


- Original Message -
 From: Yinming Jiao 20907...@zju.edu.cn
 To: bioc-devel@r-project.org
 Sent: Thursday, October 9, 2014 7:46:38 PM
 Subject: [Bioc-devel] package ‘FEM’ is not available (for R version 3.0.2)
 
 
 Dear All,
 
 
 I have a package, FEM, which is published few days ago.
 
 
 The link is
 :http://www.bioconductor.org/packages/devel/bioc/html/FEM.html
 
 
 But when I try to install it,
 
 
  source(http://bioconductor.org/biocLite.R;)
  biocLite(FEM)
 
 
 R reports: package ��FEM�� is not available (for R version 3.0.2).
 
 
 So How  can I resolve this problem.
 
 
 I also noted that Bioconductor version: Development (3.0)
 
 
 
 What does this mean?

Bioconductor is versioned and Bioconductor versions are meant to work with 
specific versions of R.

Bioconductor 3.0 which will be released next week, and which will contain your 
package, only works with R-3.1.x.

Currently both Bioconductor 2.14 (the current release version) and Bioconductor 
3.0 (the devel version, soon to be release) work with this version of R. So if 
you want to install FEM, you need to install R-3.1.1.

If you want to install FEM before the release you need to do the following:

source(http://bioconductor.org/biocLite.R;)
useDevel()
biocLite(FEM)

If you wait till after the release, you won't need to do the second line. 

BTW, as a package developer, it's a good idea to develop your package using the 
same (devel) version of Bioconductor that your package will be added to (and of 
course the appropriate version of R). R may change, and other packages that you 
depend on may change, and you want to make sure your package will work as 
expected for end users.

Dan




 
 
 
 
 Thanks very much.
 
 
 Yinming Jiao
 
 
 --
 
 CAS-MPG Partner Institute for Computational Biology
 320 Yue Yang Road
 Shanghai 200031
 China
 Email: 20907...@zju.edu.cn or jiaoyinm...@picb.ac.cn
 Mob: +86 1852139 6188
   [[alternative HTML version deleted]]
 
 
 ___
 Bioc-devel@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/bioc-devel
 

___
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel