Re: [R] how to set crontab for updating the repositories?

2009-08-28 Thread Patrick Aboyoun

Sukhbir,
The recommended rsync commands for mirroring the Bioconductor 
repositories are given at


http://bioconductor.org/download/mirrors/mirror-howto.html


Cheers,
Patrick



Paul Hiemstra wrote:

Sukhbir Rattan wrote:

Hi,

I have downloaded around 60GB package repositories of bioconductor to 
use it

locally and to set up mirror at my university site.

I have installed the mirror with rsync command and able to access also.

Now I have to set a cron job for its daily updating from bioconductor
website. How should I do it?

I know rsync have to be used but I don't know the proper syntax.

I request to send proper syntax.

Thanks,

Sukhbir Singh Rattan.

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide 
http://www.R-project.org/posting-guide.html

and provide commented, minimal, self-contained, reproducible code.
  

Hi,

Typing:

crontab -e

Will open the crontab file for the current user, here you can add 
commands that are to executed at certain times. The crontab will look 
something like:


# m h  dom mon dow   command
0 0 * * * /foo/bar

where the command /foo/bar will be executed every day (dom, mon and 
dow are a *, meaning 'for all') at 12 pm.


cheers,
Paul




__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Character SNP data to binary MAF data

2009-01-29 Thread Patrick Aboyoun

Hadassa,
You may want to check out the snpMatrix package in Bioconductor

http://bioconductor.org/packages/2.3/bioc/html/snpMatrix.html
http://bioconductor.org/packages/2.4/bioc/html/snpMatrix.html

It contains classes that manage this type of information and should  
minimize your coding effort.



Patrick


Quoting Thomas Lumley tlum...@u.washington.edu:



The first step is to convert your data to all uppercase with toupper().

Then it depends on how tidy the data are: are there missing data, are
some SNPs monomorphic in your sample, etc.

If there are no missing data you can use

N-ncol(the_data)
halfN - N/2

maf_one_row -function(arow) {
   rval-numeric(N)
   if (sum(i-arow==A)halfN) {
rval[]-1
   } else if (sum(i-arow==C)halfN){
rval[i]-1
   } else if (sum(i-arow==T))halfN){
rval[i]-1
   } else if (sum(i-arow==G)halfN){
rval[i]-1
   }
   rval
}

apply(the_data, 1, maf_one_row)

YOu could also use table() to find the two alleles, but you have to
make sure that the code still works when there is only one allele.

 -thomas

On Thu, 29 Jan 2009, Hadassa Brunschwig wrote:


Hi

An example is as follows. Consider the character 3x6 matrix:

a A a T A t
G g t T T t
A a C C c c

For each row I would like to identify the most frequent letter and
assign a 1 to it and 0
to the less frequent character. That is, in row 1 the most frequent
letter is A (I do not differentiate between capital and non-capital
letters), in row 2 T and in row 3 C. After the binary conversion
the resulting matrix would look like that:

1 1 1 0 1 0
0 0 1 1 1 1
0 0 1 1 1 1

Any suggestions on how to do that (and I am sure I am not the first
one to try this).

Thanks
Hadassa


On Thu, Jan 29, 2009 at 1:50 AM, Jorge Ivan Velez
jorgeivanve...@gmail.com wrote:


Hi Hadassa,
Do you have a sample of your data and the output you want? It might be
useful for us in order to provide any help to you.
Regards,

Jorge


On Wed, Jan 28, 2009 at 8:36 AM, Hadassa Brunschwig
hadassa.brunsch...@mail.huji.ac.il wrote:


Hi

I am sure there is a function out there already but I couldn't find it.
I have SNP data, that is, a matrix which contains in each row two
characters (they are different in each row) and I would like to
convert this matrix to a binary one according to the minor allele
frequency. For non-geneticists: I want to have a binary matrix
for which in each row the 0 stands for the less frequent character
and 1 for the more frequent character.

Thanks for any suggestions.
Hadassa

--
Hadassa Brunschwig
PhD Student
Department of Statistics
The Hebrew University of Jerusalem
http://www.stat.huji.ac.il

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.







--
Hadassa Brunschwig
PhD Student
Department of Statistics
The Hebrew University of Jerusalem
http://www.stat.huji.ac.il

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.



Thomas Lumley   Assoc. Professor, Biostatistics
tlum...@u.washington.eduUniversity of Washington, Seattle

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Installation of RCurl Windows binary package from BioC extra repos (was Re: [BioC] Rcurl 0.8-1 update for bioconductor 2.7)

2008-12-01 Thread Patrick Aboyoun

Hi Roger,
Good to hear from you again. Given that RCurl is hosted in both the CRAN 
mirrors and in the Bioconductor extra repository, it can be a little 
confusing how to install it on your system. The recommended path is to 
follow the steps on the Bioconductor extra home page for RCurl


http://bioconductor.org/packages/release/extra/html/RCurl.html

To install this package, start R and enter:

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



Patrick



Day, Roger S wrote:

Hi Patrick,

Greetings from !(sunny) Pittsburgh.

What's the scoop on RCurl on windows (XP)?
I've tried to install RCurl_0.92-0.zip and RCurl_0.9-3.zip,
with both R 2.7.2 and R 2.8.0 from the RGUI (utils:::menuInstallLocal),
and get the error
Windows binary packages in zipfiles are not supported.
which (according to google's one and only hit) comes from a perl script.
Your suggestion (below) to use biocLite hangs the R session, at this point:
	Running biocinstall version 2.3.9 with R version 2.8.0 
	Your version of R requires version 2.3 of Bioconductor.

trying URL 
'http://bioconductor.org/packages/2.3/extra/src/contrib/RCurl_0.92-0.tar.gz'
Content type 'application/x-gzip' length 239873 bytes (234 Kb)
opened URL
downloaded 234 Kb
(In this case, R 2.7.2.)
We also tried to build RCurl from the tarballs, 
in DOS window and in Cygwin window,

with a variety of problems.

Is there a current solution to installing RCurl on windows?

(I'm moving this topic to r-help from bioconductor
on suggestions seen on that list.)

Thanks for your help.
-Roger


  

-Original Message-
From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On Behalf Of 
Patrick Aboyoun

Sent: Thursday, May 29, 2008 8:49 PM
To: Steve Lianoglou
Cc: Yan Zhou; [EMAIL PROTECTED]
Subject: Re: [BioC] Rcurl 0.8-1 update for bioconductor 2.7

Steve and Yan,
We just uploaded source, Windows binary, and MacOS X Tiger 
binary packages for RCurl 0.9-3 to the Bioconductor CRAN-like 
repository http://bioconductor.org/packages/2.2/extra. This 
repository is make available when you use R 2.7.0 and type


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

Let me know if this meets your needs.


Cheers,
Patrick



Steve Lianoglou wrote:


Hi,

  
I'm seeking help here regarding updating the Rcurl for macOSX to a 
newer version so it'll accomodate to bioconductor 2.7. The current 
version of Rcurl 0.8-1 (in bioconductor 2.7 for macOSX) is 

built for 

bioconductor 2.6; Is there anyone who could help to put the 
bioconductor 2.7 compatible version of Rcurl into the 

database? So we 

could use packages depending on Rcurl? Any kind help is greatly 
appreciated!

When this was brought up earlier, I think the consensus was 
  
that since 

this isn't a bioconductor hosted package, you'd better 
  
inquire over at 


R-help.

That said, someone also suggested earlier to install it 
  
straight from 


the source via this incantation:

  

install.packages(RCurl, repos = http://www.omegahat.org/R;)

I don't think that worked for me, and I ended up d/ling the source 
package and installing it manually, by first d/ling it and 
uncompressing it. You'll get an RCurl folder. At the 
  
command line, you 


can then:

$ R CMD BUILD RCurl
$ R CMD CHECK RCurl_0.9-3.tar.gz
$ R CMD INSTALL RCurl_0.9-3.tar.gz

I'm not sure if this is the best way, but I seem to have a fully 
functioning RCurl again since the biomaRt package relies on 
  
that, and 


that works now.

Btw - you can get RCurl here: http://www.omegahat.org/RCurl/

HTH,
-steve

___
Bioconductor mailing list
[EMAIL PROTECTED]
https://stat.ethz.ch/mailman/listinfo/bioconductor
Search the archives: 
http://news.gmane.org/gmane.science.biology.informatics.conductor
  

___
Bioconductor mailing list
[EMAIL PROTECTED]
https://stat.ethz.ch/mailman/listinfo/bioconductor
Search the archives: 
http://news.gmane.org/gmane.science.biology.informatics.conductor




__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Installation of RCurl Windows binary package from BioC extra repos (was Re: [BioC] Rcurl 0.8-1 update for bioconductor 2.7)

2008-12-01 Thread Patrick Aboyoun

Roger,
Given that you are having problems installing the RCurl package from 
source, I recommend you install the binary version of the package 
instead. (It sounds like you may need to clean up broken installations 
first.) Here is what an installation would look like on a machine 
without the libcurl library installed on it:




 source(http://bioconductor.org/biocLite.R;)
 biocLite(RCurl)
Running biocinstall version 2.3.9 with R version 2.8.0
Your version of R requires version 2.3 of Bioconductor.
Warning in install.packages(pkgs = pkgs, repos = repos, dependencies = 
dependencies,  :
 argument 'lib' is missing: using 
'C:\Users\patrick\Documents/R/win-library/2.8'
trying URL 
'http://bioconductor.org/packages/2.3/extra/bin/windows/contrib/2.8/RCurl_0.92-0.zip'

Content type 'application/zip' length 1347812 bytes (1.3 Mb)
opened URL
downloaded 1.3 Mb

package 'RCurl' successfully unpacked and MD5 sums checked

The downloaded packages are in
   C:\Users\patrick\AppData\Local\Temp\RtmpTNKaC7\downloaded_packages
updating HTML package descriptions
 library(RCurl)
 uris - c(http://www.omegahat.org/RCurl/index.html;, 
http://www.omegahat.org/RCurl/philosophy.xml;)

 txt - getURI(uris)
 names(txt)
[1] http://www.omegahat.org/RCurl/index.html; 
http://www.omegahat.org/RCurl/philosophy.xml;

 nchar(txt)
   http://www.omegahat.org/RCurl/index.html 
http://www.omegahat.org/RCurl/philosophy.xml
   
426948969

 sessionInfo()
R version 2.8.0 (2008-10-20)
i386-pc-mingw32

locale:
LC_COLLATE=English_United States.1252;LC_CTYPE=English_United 
States.1252;LC_MONETARY=English_United 
States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252


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


other attached packages:
[1] RCurl_0.92-0

loaded via a namespace (and not attached):
[1] tools_2.8.0



Day, Roger S wrote:

Thanks, Patrick.
As I mentioned, this results in a hung system,
I've waited as long as an hour, no progress
in the GUI past downloaded 234 Kb.
The 00LOCK folder is created but is empty.
An R.INSTALL. folder is created, with
the unpacked package file.
There is a README.windows file,
but it seems a bit garbled, as if some text were accidentally replaced by line 
feeds.
My interpretation:
Retrieve curl-7.19.2-ssl-sspi-zlib-static-bin-w32 from 
http://curl.haxx.se/
(I did not find 7.12.0 there.)
	Set LIBCURL_DIR=where.i.put.it\curl-7.19.2-ssl-sspi-zlib-static-bin-w32 
	Go to R.INSTALL.

R CMD INSTALL RCurl
The result:
-- Making package RCurl 
test: and: unknown operand
Cannot find libcurl.dll in C:\Documents and 
Settings\day\Desktop\curl-7.19.2-ssl-sspi-zlib-static-bin-w32
make[2]: *** [c:/PROGRA~1/R/R-28~1.0/library/RCurl/] Error 1
make[1]: *** [all] Error 2
make: *** [pkg-RCurl] Error 2
*** Installation of RCurl failed ***
Got rid of the test: and: error by copying the curl folder to . and 
resetting LIBCURL_DIR.
But libcurl.dll still cannot be found by configure.win (despite its presence).
Examining configure.win, it turns out that setting CURL_LIB_DIR works. Possibly 
a bug in configure.win.
Next problem: 
	Cannot find curl/curl.h in curl-7.19.2-ssl-sspi-zlib-static-bin-w32/include

True, this file is not there.   By un-setting LIBCURL_DIR this problem  
'vanishes'. (a good thing or not?)
Next problem:
cp: cannot stat `curl-7.19.2-ssl-sspi-zlib-static-bin-w32/libcurl.dll':
( 3 other dlls)
By moving everything to \, to avoid spaces in folder names, two of these 
messages 'vanish'.
But still 2 dll's cannot be found, zlib1.dll and ssleay32.dll
and this is not the fault of the script-- they really are absent this time.

Where to now, trusty guide?

-Roger

  

-Original Message-
From: Patrick Aboyoun [mailto:[EMAIL PROTECTED] 
Sent: Monday, December 01, 2008 2:10 PM

To: Day, Roger S
Cc: 'r-help@r-project.org'; Boyce, Richard David
Subject: Installation of RCurl Windows binary package from 
BioC extra repos (was Re: [BioC] Rcurl 0.8-1 update for 
bioconductor 2.7)


Hi Roger,
Good to hear from you again. Given that RCurl is hosted in 
both the CRAN mirrors and in the Bioconductor extra 
repository, it can be a little confusing how to install it on 
your system. The recommended path is to follow the steps on 
the Bioconductor extra home page for RCurl


http://bioconductor.org/packages/release/extra/html/RCurl.html

To install this package, start R and enter:

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



Patrick



Day, Roger S wrote:


Hi Patrick,

Greetings from !(sunny) Pittsburgh.

What's the scoop on RCurl on windows (XP)?
I've tried to install RCurl_0.92-0.zip and RCurl_0.9-3.zip, 
  
with both 

R 2.7.2 and R 2.8.0 from the RGUI 
  
(utils:::menuInstallLocal), and get

Re: [R] counting number of G in TCGGGGGACAATCGGTAACCCGTCT

2008-07-15 Thread Patrick Aboyoun

Henrik,
As Wolfgang mentioned, the Biostrings package in Bioconductor has a 
number of sequence manipulation functions. The alphabetFrequency 
function would get you what you need.


 library(Biostrings)
 alphabetFrequency(DNAString(TCGACAATCGGTAACCCGTCT))
A C G T M R W S Y K V H D B N - +
5 7 8 5 0 0 0 0 0 0 0 0 0 0 0 0 0
 alphabetFrequency(DNAString(TCGACAATCGGTAACCCGTCT), baseOnly = 
TRUE)

   A C G T other
   5 7 8 5 0


Patrick


Wolfgang Huber wrote:

Hi,

And the Bioconductor package Biostrings is the place to go for any
serious work with sequences.



__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.