remove part of string (DNA)by Furor (Novice)
|on Apr 12, 2011 at 11:58 UTC||Need Help??|
Furor has asked for the wisdom of the Perl Monks concerning the following question:
Hello, been working myself in into Perl since about a week. I need it to write scripts for manipulating DNA-sequences. In first instance, I need to cut off part of a string. This might be a trivial thing to do for an experienced programmer but currently, I don't know where to go from this point ...
I've heard of BioPerl, but since I'm quite new to Perl AND programming in general, I get this huge avalanche of information over me and I really don't know where to look first. Plus I need to get some results rather quickly.
So, what I want it to do is read in a file (fasta format) and compare (the beginning of) every sequence to some
specified strings (called a primer) and when there's a match, remove the matching string from the sequence.
The remaining trimmed sequences should be stored in a new file, and perhaps as a control, store non-matched
sequences in another file. This leads to another question. Do you have to store the processed data in an array
before writing it to an output-file, or can this be done directly?
Also, I was wondering if it'd make a difference in speed if it'd check the entire file (couple of thousand rows) separately for each specific primer, or if you go row by row and check every primer against it (so only going through the file once). Does this make sense? :o)
Don't mind the comments too much :)
Thanks in advance!