Randomising the content of a site in a nucleotide alignment without altering composition
0
1
Entering edit mode
6.0 years ago

Hi everyone,

I have a DNA sequence alignment in a .fasta format that I'd like to read in using R, choose one of a given set of variant sites (columns if we think of a DNA sequence alignment as a matrix where rows are sequences), and then randomise this site x times to produce x alignments that are identical with the exception of the 'shuffling' of the site of interest.

What is important here is that I'd like to keep the base composition of the given site. For example, if a given site has a 'C' frequency of 0.7 and a 'T' frequency of 0.3, I would like to retain this. All I want to do is shuffle which sequences have which nucleotide.

Does anyone know of a software package that can do this? Or alternatively of a quick way in R that I can isolate the colum of interest and simply rearrange its contents in a random way?

Thank you

R sequence • 1.3k views
ADD COMMENT
0
Entering edit mode

You might want to shuffle the columns or nucleotides using the Fisher-Yates Algorithm.

ADD REPLY
0
Entering edit mode

did you try fasta shuffle letters? (http://meme-suite.org/doc/fasta-shuffle-letters.html)

ADD REPLY

Login before adding your answer.

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