Re: Counting gaps in sequence data revisited.

2004-10-26 Thread Zeus Odin
Michael S. Robeson II [EMAIL PROTECTED] wrote in message ... open(DNA_SEQ, $dna_seq) Due to precedence, the parens are optional here. open(OUTFILE, indel_list_.$dna_seq) ^ indel_list_$dna_seq or indel_list_.$dna_seq foreach (keys %sequences) {

Re: counting gaps in sequence data

2004-10-24 Thread Zeus Odin
This is a really cool problem. See solution below. Michael, next time post some code please. Thanks, ZO -- #!/usr/bin/perl use warnings; use strict; use Data::Dumper; my(%gap, $animal); while (DATA) { if (/(\w+)/) { $animal = $1; } else { while (/(-+)/) {

Counting gaps in sequence data revisited.

2004-10-17 Thread Michael S. Robeson II
I just wanted to thank everyone for their help and suggestions. This is the final full working code to count continuos gaps in a every sequence in a multi-sequence FASTA file. It may not be elegant but it is fast and works well. Sorry for the long post but I wanted to share this with those

Re: Counting gaps in sequence data revisited.

2004-10-17 Thread Michael S. Robeson II
I cleaned up the code a little. So, here it is for anyone interested: #!usr/bin/perl # By Michael S. Robeson II with the help from the folks at lernperl.org and bioperl.org # 10/16/2004 # Last updated: 10/17/2004 # This script was made for the purpose of searching for indels (gaps) in aligned #

Re: counting gaps in sequence data

2004-10-15 Thread Errin Larsen
On Thu, 14 Oct 2004 16:11:42 -0600, Michael Robeson [EMAIL PROTECTED] wrote: Yeah, I have just submitted that same question verbatim to the bio-perl list. I am still running through some ideas though. I have both Bioinformatics perl books. They are not very effective teaching books. The

Re: counting gaps in sequence data

2004-10-15 Thread Michael Robeson
Errin, Thanks so much! I will spend the weekend going over what you've posted. Looks like I will learn a lot from this post alone. This stuff is so addictive. I can spend hours doing this and not realize it. If I am successful or not is another story! :-) I'll definitely let you know if I

counting gaps in sequence data

2004-10-14 Thread Michael Robeson
I have a set of data that looks something like the following: human acgtt---cgatacg---acgact-t chimp acgtacgatac---actgca---ac mouse acgata---acgatcgacgt I am having trouble setting up a hash etc., to count the number and types of continuous gaps. For example the 'human' sequence above

Re: counting gaps in sequence data

2004-10-14 Thread Errin Larsen
On Thu, 14 Oct 2004 11:02:06 -0600, Michael Robeson [EMAIL PROTECTED] wrote: I have a set of data that looks something like the following: SNIP So, any suggestions would be greatly appreciated. If anyone can help me out with all or even just bits of this I would greatly appreciate it.

Re: counting gaps in sequence data

2004-10-14 Thread Willy West
PS: is this a common problem/exercise in some class somewhere? I keep seeing requests for help having to do with those exact strings of DNA data. Is there a bunch of people working on DNA projects using Perl somewhere? Or, is this some homework? bio-informatics is a big area in which Perl

Re: counting gaps in sequence data

2004-10-14 Thread Errin Larsen
On Thu, 14 Oct 2004 15:40:24 -0400, Willy West [EMAIL PROTECTED] wrote: PS: is this a common problem/exercise in some class somewhere? I keep seeing requests for help having to do with those exact strings of DNA data. Is there a bunch of people working on DNA projects using Perl

Re: counting gaps in sequence data

2004-10-14 Thread Willy West
On Thu, 14 Oct 2004 14:47:57 -0500, Errin Larsen [EMAIL PROTECTED] wrote: bio-informatics is a big area in which Perl is involved... there's even a book from O'reilly on the subject... If what you say is true, then maybe Mike needs to take his questions to those list? I mean, if the

Re: counting gaps in sequence data

2004-10-14 Thread Errin Larsen
On Thu, 14 Oct 2004 16:08:44 -0400, Willy West [EMAIL PROTECTED] wrote: On Thu, 14 Oct 2004 14:47:57 -0500, Errin Larsen [EMAIL PROTECTED] wrote: bio-informatics is a big area in which Perl is involved... there's even a book from O'reilly on the subject... If what you say is true,

Re: counting gaps in sequence data

2004-10-14 Thread Paul Johnson
On Thu, Oct 14, 2004 at 11:02:06AM -0600, Michael Robeson wrote: I have a set of data that looks something like the following: So, my problem is that I think I know some of the bits of code to put into place the problem is I am getting lost on how to structure it all together.

Re: counting gaps in sequence data

2004-10-14 Thread Michael Robeson
Here is as far as I can get with some real code and pseudo code. This is just to show you that I am actually trying. :-) Pseudo - code # open DNA sequence file print Enter in the name of the DNA sequence file:\n; chomp (my

Re: counting gaps in sequence data

2004-10-14 Thread Errin Larsen
On Thu, 14 Oct 2004 23:23:48 +0200, Paul Johnson [EMAIL PROTECTED] wrote: On Thu, Oct 14, 2004 at 11:02:06AM -0600, Michael Robeson wrote: I have a set of data that looks something like the following: So, my problem is that I think I know some of the bits of code to put into place the

Re: counting gaps in sequence data

2004-10-14 Thread Paul Johnson
On Thu, Oct 14, 2004 at 04:50:30PM -0500, Errin Larsen wrote: Hi Paul, I think you missed a critical part of Mike's post!: No, I didn't miss it. I just thought it likely that Mike could get to there from where I left off, so I gave a solution to the bit that seemed most troublesome.

Re: counting gaps in sequence data

2004-10-14 Thread Michael Robeson
Yeah, I have just submitted that same question verbatim to the bio-perl list. I am still running through some ideas though. I have both Bioinformatics perl books. They are not very effective teaching books. The books spend too much time on using modules. Though while I understand the

Re: counting gaps in sequence data

2004-10-14 Thread Philipp Traeder
On Thursday 14 October 2004 21:44, Michael Robeson wrote: Here is as far as I can get with some real code and pseudo code. This is just to show you that I am actually trying. :-) Hi Michael, this looks quite promising - I'll try to sketch a solution without giving everything away ;-)