#!/usr/bin/perl $|=1; my $VERSION = "1.04"; my $AUTHOR = "Prilusky"; my $YEAR = "2003"; use LWP::Simple; # simple example to retrieve only the foldindex value my $sequence = qq{ MDDFERRRELRRQKREEMRLEAERLSYQRNDDDEEEAARERRRRARQERLRQKEEGDVS GEVTEKSEVNAQNSVAEEETKRSTDDEAALLERLARREERRQKRLQEALERQKEFDPTI TDGSLSVPSRREVNNVEENEITGKEEKVETRQGRCEIEETETVTKSYQRNNWRQDGEEE GKKEEKDSEEEKPKEVPTEENQVDVAVEKSTDKEEVVETKTLAVNAENDTNAMLEGEQS ITDAADKEKEEAEKEREKLEAEEKERLKAEEEKKAAEEKQKAEEEKKAAEERERAKAEE EKRAAEERERAKAEEERKAAEERERAKAEEERKAAEERAKAEEERKAAEERAKAEEERK AAEERAKAEKERKAAEERERAKAEEEKRAAEEKARLEAEKLKEKKKMEEKKAQEEKAQA NLLRKQEEDKEAKVEAKKESLPEKLQPTSKKDQVKDNKDKEKAPKEEMKSVWDRKRGVP EQKAQNGERELTTPKLKSTENAFGRSNLKGAANAEAGSEKLKEKQQEAAVELDELKKRR EERRKILEEEEQKKKQEEAERKIREEEEKKRMKEEIERRRAEAAEKRQKVPEDGVSEEK KPFKCFSPKGSSLKIEERAEFLNKSAQKSGMKPAHTTAVVSKIDSRLEQYTSAVVGNKA AKPAKPAASDLPVPAEGVRNIKSMWEKGNVFSSPGGTGTPNKETAGLKVGVSSRINEWL TKTPEGNKSPAPKPSDLRPGDVSGKRNLWEKQSVEKPAASSSKVTATGKKSETNGLRQF EKEP }; my $findex = getFoldIndex($sequence); print "got $findex\n"; sub getFoldIndex { my($aa) = @_; $aa =~ s/\W//g; my $content = get("https://fold.proteopedia.org/cgi-bin/findex?m=xml&sq=$aa"); my ($findex) = $content =~ /([\-\.\d]+)<\/findex>/; return $findex; }