Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Given range random intervals from the given set (Bioinformatic problem)

by poegi (Initiate)
on Apr 04, 2012 at 07:36 UTC ( [id://963378]=perlquestion: print w/replies, xml ) Need Help??

poegi has asked for the wisdom of the Perl Monks concerning the following question:

I do have:

Ranges: 500 450 899 461 Genome Data (SequenceName and it's length (from 1 to milions)): nameA 985544 nameB 454552 nameC 47884 .... ....
I want to: Generate given range random intervals from Genome Data.

Workflow goes like that:

1. Script takes range from (Ranges);

2. Randomly chooses name from Genome Date;

3. Randomly 'picks up' given range interval from the name's length.

Any help?

PS.: Problem from the biological perspective is:

I have sequences of interest from the Genome Data with Name and Sequences. I want to randomly generate save length sequences from the same dataset. Right now my script only generates positions, but not the intervals

  • Comment on Given range random intervals from the given set (Bioinformatic problem)
  • Download Code

Replies are listed 'Best First'.
Re: Given length random intervals from the given set (Bioinformatic problem)
by moritz (Cardinal) on Apr 04, 2012 at 07:59 UTC

    Update: OP changed the question completely, so now my reply only makes limited sense.

    Most of the perl monks who read your question are pretty good at Perl, but know next to nothing at about biology. So if you want helpful replies, you should explain what you mean with

    Generate given Length random intervals from Genome data

    in a way that doesn't require prior biology knowledge. And you also need to explain how that should lead to the expected output.

    Also we don't know what length.pl does, so we can't even try to run your program.

Re: Given range random intervals from the given set (Bioinformatic problem)
by Sinistral (Monsignor) on Apr 04, 2012 at 13:32 UTC

    Have you seen the ever popular BioPerl site? They might be able to help better than the Monks, since Bioinformatics is the specialization of the site.

Re: Given range random intervals from the given set (Bioinformatic problem)
by snape (Pilgrim) on Apr 04, 2012 at 21:09 UTC

    This may help you

    use strict; use warnings; my %rangeFile; ## hash my %geneomeFile; ## From the Range Data File open my $IN2, "RangeFile.txt" or die $! while(<$IN1>){ chomp($_); $rangeFile{$_} = 1; } close($IN1); ## From Genome Data open my $IN2, "GenomeFile.txt" or die $! while(<$IN2>){ chomp($_); my @line = split('\t', $_); ## considering if genome data is t +ab-del file $genomeFile{$_} = 1; } close($IN2); ## Randomly Choosing Name from Genome Data foreach (rand keys %hash){ #### Code for step 3 ### }

    Btw, I didnt understan your step 3.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://963378]
Approved by moritz
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (2)
As of 2024-04-25 06:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found