twaddlac has asked for the wisdom of the Perl Monks concerning the following question:
I am trying to write a script that matches a pattern and then removes only 6 of the following or preceding characters. I thought that I had the syntax correct (based on some printouts that I found online) but I am assuming I don't. When I try to run it i get the error message: "Search pattern not terminated".
Here's part of my code:
this is the line that is causing the error:while ($seq = $seqIn_obj->next_seq){ push(@seq_id,$seq->id); $temp_seq = $seq->seq; while(($id, $tag_seq) = each(%tag_hash)){ ?($temp_seq =~ s/^$tag_seq/*/i){/w,6}; } $new_seq = Bio::Seq->new(-seq => $temp_seq, -display_id => $se +q->id, -desc => $seq->desc(), -alphabet => $seq->alphabet); $fastQ->write_seq($new_seq); push(@sequence,$temp_seq); }
Also, if it's not too much to ask, is there a way to invert the pattern then apply it? Let me know if you need anything else from me! Thank you very much!!?($temp_seq =~ s/^$tag_seq/*/i){/w,6};
|
|---|