subroutine problem

2004-12-01 Thread Michael Robeson
I have written a rather simplistic script so I can get used to LWP::Simple etc... Anyway I am using a subroutine to "get" and "print" data from a website. I have gotten it to work except for the fact that the first iteration of the subroutine "uses" no data at all, yet after that it works f

Re: counting gaps in sequence data

2004-10-15 Thread Michael Robeson
know if I have any trouble. -Cheers! -Mike On Oct 15, 2004, at 7:22 AM, Errin Larsen wrote: 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 tho

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 usefulness

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 $dna_s

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

Moving between hashes 2.

2004-09-24 Thread Michael Robeson
Gunnar, Thanks so much for the help and the links! They help quit a bit. I decided to use the if statement you posted: if ( $aa eq '-' ) { $hash3{$_} .= '---'; } else { $hash3{$_} .= substr $dna,0,3,''; } instead of: $hash3{$_} .= $

Moving between hashes 2.

2004-09-17 Thread Michael Robeson
**Sorry, if this is a repeat. Wasn't sure if the mail went through. If you already replied can you re-send it to my e-mail address above as well? Thanks!*** I have two sets of data that have been stored in hashes. The first hash has amino-acid (protein) sequence data. The second hash has the c

RE: combining data from more than one file...

2004-05-20 Thread Michael Robeson
Sorry, I meant to upload this script (see below). However, I have one last question. Why can't I use s/\n//g;# instead of tr/A-Za-z-//cd; in the script below? I thought it would be simpler to remove the newline characters from $_ which is all I really want to do. However, most of the time

Re: combining data from more than one file...

2004-05-20 Thread Michael Robeson
Thanks to those that helped. The code works great. Now I will practice one honing it down to the bare essentials. Below is the final code you all helped with. -Thanks a million! -Mike >>> Begin PERL Code<<< #! /usr/bin/perl -w use strict; use FileHandle; my %organisms; print "Enter in a list of

Re: combining data from more than one file...

2004-05-18 Thread Michael Robeson
Ok great. Most of what you show does make sense. However, there are some bits of code that I need further clarification with. Some bits I am able to tell what they are doing but I do not quite know how or why they work they way they do. I'll state these areas in the code we've got together at t