shuffling distance matrix
3
0
Entering edit mode
@prsmra01uniroma2it-2079
Last seen 10.3 years ago
Dear All, It may sound a trivial question...but I couldn't find a simple solution in R: I'm working on all-against-all distance matrices, the values stored in these matrices representing measures of similarities between pair of proteins; these matrices can be considered representation of phylogenetic trees; I want to generate other matrices with the same randomly permuted distances....how can I shuffle these matrices ? thank you, Maria -- Maria Persico, PhD. student http://cbm.bio.uniroma2.it/~maria/ MINT database group Universita' di Tor Vergata, via della Ricerca scientifica 11 00133 Roma, Italy Tel +39 0672594315 (Supervisor's room) Fax +39 0672594766 Mobile phone: +393479715662 e-mail maria.persico at uniroma2.it
• 1.3k views
ADD COMMENT
0
Entering edit mode
@william-shannon-1787
Last seen 10.3 years ago
An embedded and charset-unspecified text was scrubbed... Name: not available Url: https://stat.ethz.ch/pipermail/bioconductor/attachments/20070319/ e295a43d/attachment.pl
ADD COMMENT
0
Entering edit mode
Tony Chiang ▴ 570
@tony-chiang-1769
Last seen 10.3 years ago
An embedded and charset-unspecified text was scrubbed... Name: not available Url: https://stat.ethz.ch/pipermail/bioconductor/attachments/20070319/ 2a573dda/attachment.pl
ADD COMMENT
0
Entering edit mode
An embedded and charset-unspecified text was scrubbed... Name: not available Url: https://stat.ethz.ch/pipermail/bioconductor/attachments/20070319/ 93460a22/attachment.pl
ADD REPLY
0
Entering edit mode
@stephen-henderson-71
Last seen 7.7 years ago
" You can do something like this > m = matrix(1:144, 12, 12) > rowRandomIndex = sample(1:12) > colRandomIndex = sample(1:12) > m[rowRandomIndex, colRandomIndex] There must be more elegant ways to do this...but this should work. " Or try (replace=T i.e. bootstrap rather than permute is I think appropriate for your example >m = sample(m, length(m), replace=T) Stephen Henderson UCL, London WC1E 6BT Cheers, --TC On 3/19/07, prsmra01 at uniroma2.it <prsmra01 at="" uniroma2.it=""> wrote: > > Dear All, > > It may sound a trivial question...but I couldn't find a simple > solution in R: I'm working > on all-against-all distance matrices, the values stored in these > matrices representing > measures of similarities between pair of proteins; these matrices can > be considered > representation of phylogenetic trees; I want to generate other > matrices with the same > randomly permuted distances....how can I shuffle these matrices ? > > thank you, > > Maria > -- > Maria Persico, PhD. student > http://cbm.bio.uniroma2.it/~maria/ > MINT database group > Universita' di Tor Vergata, via della Ricerca scientifica 11 > 00133 Roma, Italy > Tel +39 0672594315 (Supervisor's room) > Fax +39 0672594766 > Mobile phone: +393479715662 > e-mail maria.persico at uniroma2.it > > _______________________________________________ > Bioconductor mailing list > Bioconductor at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: > http://news.gmane.org/gmane.science.biology.informatics.conductor > [[alternative HTML version deleted]] _______________________________________________ Bioconductor mailing list Bioconductor at stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/bioconductor Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor ********************************************************************** This email and any files transmitted with it are confidentia...{{dropped}}
ADD COMMENT

Login before adding your answer.

Traffic: 550 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