multiple threads on QuasR
1
1
Entering edit mode
@michael-stadler-5887
Last seen 4 weeks ago
Switzerland
Dear Vincent, I am copying the list since this may be interesting to other users as well. I am glad you find QuasR useful. The way to use multiple (here: eight) cores for alignment is to create a cluster object (from package parallel) and provide it to the qAlign function as in the example below: library(QuasR) cl <- makeCluster(8) proj <- qAlign(..., clObj=cl) In that way, you do not have to modify the alignmentParameter argument; qAlign will analyze the cluster object provided to 'clObj' and modify the bowtie or SpliceMap command line parameters accordingly. Regards, Michael On 12.04.2013 23:45, Vincent Zimmern wrote: > Dear Dr. Stadler, > > I hope this message finds you well. > > QuasR is a wonderful tool -- really, there's no other adjective to > describe it. I've been waiting for something like this to emerge from > Bioconductor -- and now my wish has been granted. > > The program works flawlessly. There's only one aspect I would like to > modify and that is the number of threads I can use with SpliceMap. My > current (and failed) approach to launch QuasR with 8 threads on my > 12-core machine is as follows: > > > DP19_align <- qAlign(sampleFile, genome=genomeName, > + alignmentsDir=home_repo, paired='fr', > + splicedAlignment=TRUE,auxiliaryFile=auxFile, > alignmentParameter="-num_threads 8", > + projectName="DP19") > > I have attached the log file from this alignment with the associated > error in it -- in case this helps you to debug quickly. > > I was unable to find the proper instruction sets for modifying this one > parameter (the other parameters can remain the same). > > Many thanks again for a brilliant piece of code! > > Kindest Regards, > > Vincent Zimmern > > Master's Student (Bioinformatics) > Ecole Polytechnique Federale de Lausanne > > -------------------------------------------------------------------- ---- > > UT Southwestern Medical Center > The future of medicine, today.
Alignment GLAD QuasR Alignment GLAD QuasR • 2.3k views
ADD COMMENT
0
Entering edit mode
@michael-stadler-5887
Last seen 4 weeks ago
Switzerland
Hi Vincent, Merging of two different qProject objects (e.g. spliced and non-spliced) is not recommended. QuasR requires a qProject object to be homogeneous, so that downstream processing functions (e.g. qCount, qMeth, etc.) can work consistently on all samples in the qProject object. That being said, you can have an R session with multiple qProject objects that live happily next to one another. And should it be necessary, you can fuse (e.g. merge() or cbind()) the derived data, such as the data.frames returned by qCount. qAlign is the only recommended way to create a qProject object - existing alignments however will identified and reused, so it should be quick to re-create a qProject object using qAlign. Behind the scenes, qAlign does a lot of consistency checks (e.g. fingerprints of genome and read sequences, aligner and alignment parameters, etc.), making sure that the resulting qProject object is consistent. I hope that in this way, you should be able to do what you want without restrictions or having to leave your R session. Best wishes, Michael On 20.04.2013 23:37, Vincent Zimmern wrote: > Dear Michael, > > Thanks for the help -- that worked perfectly. > > One additional question. I would like to create 2 qProject objects and then merge the two based on their underlying BAM files. One qProject would contain spliced alignments and the other would contain unspliced alignments. I would like to create a third qProject that would contain the union of the spliced and unspliced alignments and would set the splicedAlignment variable to anything (TRUE or FALSE, doesn't matter). Is this possible without having to exit R and use Samtools to merge the two files and then re-loading the merged BAM file into QuasR? > > Also, is it possible to create a new qProject object without referring to the qAlign() function? I tried using the new() function but, so far, to no avail. > > thanks for your help! > > Vincent Zimmern > ________________________________________ > From: Michael Stadler [michael.stadler at fmi.ch] > Sent: Monday, April 15, 2013 1:43 AM > To: Vincent Zimmern > Cc: bioconductor at stat.math.ethz.ch > Subject: Re: multiple threads on QuasR > > Dear Vincent, > > I am copying the list since this may be interesting to other users as well. > > I am glad you find QuasR useful. > > The way to use multiple (here: eight) cores for alignment is to create a > cluster object (from package parallel) and provide it to the qAlign > function as in the example below: > > library(QuasR) > cl <- makeCluster(8) > proj <- qAlign(..., clObj=cl) > > In that way, you do not have to modify the alignmentParameter argument; > qAlign will analyze the cluster object provided to 'clObj' and modify > the bowtie or SpliceMap command line parameters accordingly. > > Regards, > Michael > > > > On 12.04.2013 23:45, Vincent Zimmern wrote: >> Dear Dr. Stadler, >> >> I hope this message finds you well. >> >> QuasR is a wonderful tool -- really, there's no other adjective to >> describe it. I've been waiting for something like this to emerge from >> Bioconductor -- and now my wish has been granted. >> >> The program works flawlessly. There's only one aspect I would like to >> modify and that is the number of threads I can use with SpliceMap. My >> current (and failed) approach to launch QuasR with 8 threads on my >> 12-core machine is as follows: >> >> > DP19_align <- qAlign(sampleFile, genome=genomeName, >> + alignmentsDir=home_repo, paired='fr', >> + splicedAlignment=TRUE,auxiliaryFile=auxFile, >> alignmentParameter="-num_threads 8", >> + projectName="DP19") >> >> I have attached the log file from this alignment with the associated >> error in it -- in case this helps you to debug quickly. >> >> I was unable to find the proper instruction sets for modifying this one >> parameter (the other parameters can remain the same). >> >> Many thanks again for a brilliant piece of code! >> >> Kindest Regards, >> >> Vincent Zimmern >> >> Master's Student (Bioinformatics) >> Ecole Polytechnique Federale de Lausanne >> >> ------------------------------------------------------------------- ----- >> >> UT Southwestern Medical Center >> The future of medicine, today. > > -- -------------------------------------------- Michael Stadler, PhD Head of Computational Biology Friedrich Miescher Institute Basel (Switzerland) Phone : +41 61 697 6492 Fax : +41 61 697 3976 Mail : michael.stadler at fmi.ch
ADD COMMENT

Login before adding your answer.

Traffic: 645 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6