CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Need a Custom or Prewritten Perl Program?: I need a program that...:
I need a program that...

 



Peppin
New User

Jan 12, 2010, 9:28 AM

Post #1 of 2 (3042 views)
I need a program that... Can't Post

Dear everybody, I am a newby and that why I ask you how to do!
So I have a file in which are present some sequences of cleavage site for proteases. I would like to reformatting this file in another file but I don't know how to do with perl.

before
YARS
Tyrosyl-trna synthetase
KNSE-PEEV
359-360
CAMP
Cathelicidin antimicrobial peptide
KRFA-LLGD
133-134

after
>YARS Tyrosyl-trna synthetase
KNSEPEEV

>CAMP Cathelicidin antimicrobial peptide
KRFALLGD


Please, I hope that someone helps to me.


jamida
New User

Jan 30, 2010, 10:18 AM

Post #2 of 2 (2855 views)
Re: [Peppin] I need a program that... [In reply to] Can't Post

It's hard to know for sure what you're asking for, the example is good but you need to generalize a bit more.

You have capitalized words, in 2 varieties... 4 letter and two 4-letter hyphenated words, right? Also you appear to not care at all about the numbers (seems you just replace them with a blank line). Additionally you may want to elaborate on your error cases. EG what happens if:
YARS
Tyrosyl-trna synthetase
Cathelicidin antimicrobial peptide
CAMP
Cathelicidin antimicrobial peptide

Or is the structure of your input file even more complicated that it appears to non-biologists?

Anyway, assuming you know a little PERL, your root problem may be that you do not know how to read a bunch of lines as one line. I would suggest a PERL COOKBOOK to see if there's something close there.

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives