4.9 years ago by
Merging of two different qProject objects (e.g. spliced and
non-spliced) is not recommended. QuasR requires a qProject object to
homogeneous, so that downstream processing functions (e.g. qCount,
qMeth, etc.) can work consistently on all samples in the qProject
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,
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
quick to re-create a qProject object using qAlign. Behind the scenes,
qAlign does a lot of consistency checks (e.g. fingerprints of genome
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
restrictions or having to leave your R session.
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
> I am glad you find QuasR useful.
> The way to use multiple (here: eight) cores for alignment is to
> cluster object (from package parallel) and provide it to the qAlign
> function as in the example below:
> cl <- makeCluster(8)
> proj <- qAlign(..., clObj=cl)
> In that way, you do not have to modify the alignmentParameter
> qAlign will analyze the cluster object provided to 'clObj' and
> the bowtie or SpliceMap command line parameters accordingly.
> 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
>> Bioconductor -- and now my wish has been granted.
>> The program works flawlessly. There's only one aspect I would like
>> modify and that is the number of threads I can use with SpliceMap.
>> 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
>> error in it -- in case this helps you to debug quickly.
>> I was unable to find the proper instruction sets for modifying this
>> 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
Phone : +41 61 697 6492
Fax : +41 61 697 3976
Mail : michael.stadler at fmi.ch