Random nucleotide string generator?

View: New views
7 Messages — Rating Filter:   Alert me  

Random nucleotide string generator?

by Roger Hall :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

All,
 
Is there a random generator for creating nucleotides (of length l with composition frequencies a, c, g, and t) in there somewhere?
 
I noticed a thread about it from 2000 and nothing since (searching for "random sequence").
 
If not - what should the namespace be for such a module should it be undone and desirable?
 
TIA!
 
Roger
 
 
 
_______________________________________________
Bioperl-l mailing list
Bioperl-l@...
http://lists.open-bio.org/mailman/listinfo/bioperl-l

Re: Random nucleotide string generator?

by Aidan Budd :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

a non-bioperl option would be to use something external like seq-gen or
similar - tools designed for outputing "random" sequences simulated over a
tree - one could simply sample a single simulated sequence at random from
the output alignment

On Fri, 26 Jun 2009, Roger Hall wrote:

> All,
>  Is there a random generator for creating nucleotides (of length l with
> composition frequencies a, c, g, and t) in there somewhere?
>  
> I noticed a thread about it from 2000 and nothing since (searching for "random sequence").
>  
> If not - what should the namespace be for such a module should it be undone and desirable?
>  
> TIA!
>  
> Roger
>  
>  
>  
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l@...
> http://lists.open-bio.org/mailman/listinfo/bioperl-l
>

--
----------------------------------------------------------------------
Aidan Budd                                    tel:+49 (0)6221 387 8530
EMBL - European Molecular Biology Laboratory  fax:+49 (0)6221 387 8517
Meyerhofstr. 1, 69117 Heidelberg, Germany

http://www.embl-heidelberg.de/~budd/
http://www-db.embl.de/jss/EmblGroupsHD/per_1807.html

_______________________________________________
Bioperl-l mailing list
Bioperl-l@...
http://lists.open-bio.org/mailman/listinfo/bioperl-l

Re: Random nucleotide string generator?

by Luis Miguel Rodríguez :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Dear all, dear Roger,
I'm not sure if there is such generator (I think so).  Anyway, if you flag
it as "undone and desirable", please take into account the possibility of
extend the generator for dinucleotides, particularly useful when working
with secondary structure of RNA molecules,

Cheers,

On Fri, Jun 26, 2009 at 8:28 AM, Roger Hall <rahall2@...> wrote:

> All,
>
> Is there a random generator for creating nucleotides (of length l with
> composition frequencies a, c, g, and t) in there somewhere?
>
> I noticed a thread about it from 2000 and nothing since (searching for
> "random sequence").
>
> If not - what should the namespace be for such a module should it be undone
> and desirable?
>
> TIA!
>
> Roger
>
>
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l@...
> http://lists.open-bio.org/mailman/listinfo/bioperl-l
>



--
Luis M. Rodriguez-R
[http://bioinf.uniandes.edu.co/~miguel/]
---------------------------------
Unidad de Bioinformática del Laboratorio de Micología y Fitopatología
Universidad de Los Andes, Colombia
[http://bioinf.uniandes.edu.co]


+ 57 1 3394949 ext 2619
lmrodriguezr@...
me@...

_______________________________________________
Bioperl-l mailing list
Bioperl-l@...
http://lists.open-bio.org/mailman/listinfo/bioperl-l

Re: Random nucleotide string generator?

by Dave Messina-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

The Bioperl solution piggybacks on EMBOSS. See Chris Fields' comment on this
post from Neil Saunders' blog:
http://nsaunders.wordpress.com/2007/07/25/howto-generate-random-sequences-using-emboss-and-perl/


You can also do this outside of BioPerl using shuffle from Sean Eddy's SQUID
package, available here:
[ SQUID ftp site ] <ftp://selab.janelia.org/pub/software/squid/>

<ftp://selab.janelia.org/pub/software/squid/>

If not - what should the namespace be for such a module should it be undone
> and desirable?


Perhaps add it to Bio::SeqUtils?


Dave
_______________________________________________
Bioperl-l mailing list
Bioperl-l@...
http://lists.open-bio.org/mailman/listinfo/bioperl-l

Parent Message unknown Random nucleotide string generator?

by Dave Messina-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

[Forwarding Bruno's reply.... -Dave]
---------- Forwarded message ----------
From: Bruno Vecchi <vecchi.b@...>
Date: Fri, Jun 26, 2009 at 14:44
Subject: Re: [Bioperl-l] Random nucleotide string generator?
To: Dave Messina <David.Messina@...>


Here's a little script that I used for a somewhat related task. It produces
a randomized version of an input sequence (thus keeping the original's
composition). Maybe you could adjust it to your needs; providing an input
sequence with the desired length and composition you should get what you
want.

#!perl
use List::Util qw(shuffle);
use Bio::SeqIO;

my ($seqfile, $number) = @ARGV;

my $in = Bio::SeqIO->new(-file => $seqfile);
my $fh = Bio::SeqIO->newFh(-format => 'fasta');

my $seq = $in->next_seq;
my @chars = split '', $seq->seq;

for my $i (1 .. $number) {
    @chars = shuffle @chars;
    my $new_seq = Bio::Seq->new(-id => $i, -seq => join '', @chars);
    print $fh $new_seq;
}

You can use it like this from the command line (assuming you want 20 output
sequences):

shuffle.pl input_sequence.fasta 20 > random_sequences.fasta

Bruno.

2009/6/26 Dave Messina <David.Messina@...>

> The Bioperl solution piggybacks on EMBOSS. See Chris Fields' comment on
> this
> post from Neil Saunders' blog:
>
> http://nsaunders.wordpress.com/2007/07/25/howto-generate-random-sequences-using-emboss-and-perl/
>
>
> You can also do this outside of BioPerl using shuffle from Sean Eddy's
> SQUID
> package, available here:
> [ SQUID ftp site ] <ftp://selab.janelia.org/pub/software/squid/>
>
> <ftp://selab.janelia.org/pub/software/squid/>
>
> If not - what should the namespace be for such a module should it be undone
> > and desirable?
>
>
> Perhaps add it to Bio::SeqUtils?
>
>
> Dave
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l@...
> http://lists.open-bio.org/mailman/listinfo/bioperl-l
>
_______________________________________________
Bioperl-l mailing list
Bioperl-l@...
http://lists.open-bio.org/mailman/listinfo/bioperl-l

Re: Random nucleotide string generator?

by Mark A. Jensen :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

You guys earned your scrap:
http://www.bioperl.org/wiki/Random_sequence_generation

cheers and thanks! MAJ
----- Original Message -----
From: "Roger Hall" <rahall2@...>
To: <bioperl-l@...>
Sent: Friday, June 26, 2009 2:28 AM
Subject: [Bioperl-l] Random nucleotide string generator?


> All,
>
> Is there a random generator for creating nucleotides (of length l with
> composition frequencies a, c, g, and t) in there somewhere?
>
> I noticed a thread about it from 2000 and nothing since (searching for "random
> sequence").
>
> If not - what should the namespace be for such a module should it be undone
> and desirable?
>
> TIA!
>
> Roger
>
>
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l@...
> http://lists.open-bio.org/mailman/listinfo/bioperl-l
>
>

_______________________________________________
Bioperl-l mailing list
Bioperl-l@...
http://lists.open-bio.org/mailman/listinfo/bioperl-l

Re: Random nucleotide string generator?

by Ocar Campos-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks for the add to the wiki Mark.

Cheers.

O'car Campos C.
Bioinformatics Engineering Student.
University of Talca.


2009/7/1 Mark A. Jensen <maj@...>

> You guys earned your scrap:
> http://www.bioperl.org/wiki/Random_sequence_generation
>
> cheers and thanks! MAJ
> ----- Original Message ----- From: "Roger Hall" <rahall2@...>
> To: <bioperl-l@...>
> Sent: Friday, June 26, 2009 2:28 AM
> Subject: [Bioperl-l] Random nucleotide string generator?
>
>
>
>  All,
>>
>> Is there a random generator for creating nucleotides (of length l with
>> composition frequencies a, c, g, and t) in there somewhere?
>>
>> I noticed a thread about it from 2000 and nothing since (searching for
>> "random sequence").
>>
>> If not - what should the namespace be for such a module should it be
>> undone and desirable?
>>
>> TIA!
>>
>> Roger
>>
>>
>>
>> _______________________________________________
>> Bioperl-l mailing list
>> Bioperl-l@...
>> http://lists.open-bio.org/mailman/listinfo/bioperl-l
>>
>>
>>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l@...
> http://lists.open-bio.org/mailman/listinfo/bioperl-l
>
_______________________________________________
Bioperl-l mailing list
Bioperl-l@...
http://lists.open-bio.org/mailman/listinfo/bioperl-l