Re: [Rd] pairwiseAlignment Improvements

2017-04-27 Thread Dario Strbenac
This has been re-sent to the Bioconductor Development mailing list and may be 
deleted from the archive if it is possible.
__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


[Rd] pairwiseAlignment Improvements

2017-04-27 Thread Dario Strbenac
Good day,

The location of indels can be retrieved from a PairwiseAlignmentsSingleSubject 
object by using indel. Determining any difference between the two sequences, 
including substitutions, is not quick nor easy. I suppose that summary displays 
details of the mismatches, but the variable is of class 
PairwiseAlignmentsSingleSubjectSummary which has no documented accessors. So, 
the code to access the information looks bad.

summaryAlign@mismatchSummary[["subject"]]

SubjectPosition Subject Pattern Count Probability
1   2   T   A 1   1
2   3   T   A 1   1

This could be improved with accessors for end users.

Also, instead of being a data.frame, this would be better stored as IRanges 
with associated metadata columns, accessible with mcols, so that methods like 
reduce could easily be used to look for contiguous blocks of differences.

Is there a reason why the show method for the summary only shows mismatches, 
even if there are indels contained in it? This seems arbitrary and also 
misleading, because it always gives a false impression that there are no indels.

Could the return data types consistently be made to be IRanges ? Sometimes it's 
IntegerList, sometimes it's IRanges. For example,

> A
  11-letter "DNAString" instance
seq: GAACGAGGACC
> B
  8-letter "DNAString" instance
seq: GGACGAGC
> alignment <- pairwiseAlignment(A, B, gapOpening = 0, gapExtension = 1, 
> substitutionMatrix = substitutions)
> alignment@subject@mismatch
IntegerList of length 1
[[1]] 2
> alignment@subject@indel
IRangesList of length 1
[[1]]
IRanges of length 1
start end width
[1] 8   9 2

Lastly, why are functions like insertion, deletion, and indel documented in 
Numeric Summary Methods? Unlike nchar and score, they are not numerical 
summaries of the data.

It'd be nice to see this part of Biostrings thoroughly refactored with more 
focus on UX.

--
Dario Strbenac
University of Sydney
Camperdown NSW 2050
Australia

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] tempdir() may be deleted during long-running R session

2017-04-27 Thread frederik
> > It might still be useful if R could sometimes detect when automated
> > cleanup happened and warn the user. Perhaps a simple way could be to
> > always create an empty file inside session directory, like
> > ".tmp_cleaner_trap". R would never touch this file, but check its
> > existence time-to-time. If it gets deleted, R would issue a warning and
> > ask the user to check tmp cleaner configuration. The idea is that this
> > file will be the oldest one in the session directory, so would get
> > cleaned up first.

It may kill two birds with one stone if we put the PID into such a
file. Then it could be used to automate the cleanup of /tmp/Rtmp
directories left around from crashed R sessions (since we're about to
tell Systemd not to touch them).

I'm not sure what is meant by "R would ... check its existence
time-to-time". It doesn't sound to me like an important enough task to
go into the main event loop of the interpreter. Maybe a warning/error
in 'tempdir()' to tell us that either the directory has been deleted
or that the PID file no longer exists.

Thank you,

Frederick

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] tempdir() may be deleted during long-running R session

2017-04-27 Thread frederik
> Frederick posted the way to do this in systems using systemd.  We should be
> putting that in place, or the equivalent on systems using other tempfile
> cleanups.  This looks to me like something that "make install" should do, or
> perhaps it should be done by people putting together packages for specific
> systems.

For Arch's 'apache' package it is just a file in the package directory
that gets installed by the PKGBUILD script:

install -D -m644 "${srcdir}/apache.tmpfiles.conf" 
"${pkgdir}/usr/lib/tmpfiles.d/apache.conf"

Similarly for the 'screen' package.

I added a task in the Arch bug tracker to do this for R:

https://bugs.archlinux.org/task/53848

I don't get the sense that it is customary to put examples of such
files into the source distribution, so I think nothing more needs to
be done on your side (aside from alerting package maintainers for
other distributions).

Thanks,

Frederick

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


[Rd] prefixed zlib and bzip2 headers

2017-04-27 Thread Jones, Michael
Hello,

I'm trying to compile R-3.3.3 or R-3.4.0 on a RHEL6 system that I've prefixed 
the latest headers down a shared utility path, I've sourced this path in 
LD_LIBRARY_LATH, R_LD_LIBRARY_PATH,  and dropping the headers down /src/include 
which appears to be the default R_include_dir but it will not accept these any 
other place than /usr/include.  Is there a way to properly define a prefixed 
includedir and libdir for R that I'm missing?  I was able to do this in 
3.2.4-revised successfully.  I see the comments that -with-system-zlib is now 
default, but I see no options to override that.  Can you please point me in the 
correct direction?


Many thanks!


[[alternative HTML version deleted]]

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel