From: Mateusz Warowny Date: Wed, 18 Jul 2018 10:51:32 +0000 (+0100) Subject: JAL-3067 Initial preparation. X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=968305a24f7a2d9b89dd419f3a327961ff85dba8;p=jalview.git JAL-3067 Initial preparation. --- diff --git a/.classpath b/.classpath index 5cb0080..8ca06f2 100644 --- a/.classpath +++ b/.classpath @@ -16,26 +16,9 @@ - - - - - - - - - - - - - - - - - @@ -61,7 +44,6 @@ - @@ -69,5 +51,13 @@ + + + + + + + + diff --git a/.project b/.project index 60d0c20..d0dfc7e 100644 --- a/.project +++ b/.project @@ -6,7 +6,7 @@ - net.sf.j2s.core.java2scriptbuilder + org.eclipse.jdt.core.javabuilder diff --git a/examples/estrogenReceptorProtein.fa b/examples/estrogenReceptorProtein.fa index 0541d39..8d7f928 100644 --- a/examples/estrogenReceptorProtein.fa +++ b/examples/estrogenReceptorProtein.fa @@ -1,4 +1,4 @@ ->UNIPROT|Q7LCB3/1-530 estrogen nuclear receptor beta variant a +>UNIPROT|Q7LCB3/1-530 estrogen receptor 2 isoform A MDIKNSPSSLNSPSSYNCSQSILPLEHGSIYIPSSYVDSHHEYPAMTFYSPAVMNYSIPSNVTNLEGGPGRQ TTSPNVLWPTPGHLSPLVVHRQLSHLYAEPQKSPWCEARSLEHTLPVNRETLKRKVSGNRCASPVTGPGSKR DAHFCAVCSDYASGYHYGVWSCEGCKAFFKRSIQGHNDYICPATNQCTIDKNRRKSCQACRLRKCYEVGMVK @@ -7,14 +7,29 @@ FTEASMMMSLTKLADKELVHMISWAKKIPGFVELSLFDQVRLLESCWMEVLMMGLMWRSIDHPGKLIFAPDL VLDRDEGKCVEGILEIFDMLLATTSRFRELKLQHKEYLCVKAMILLNSSMYPLVTATQDADSSRKLAHLLNA VTDALVWVIAKSGISSQQQSMRLANLLMLLSHVRHASNKGMEHLLNMKCKNVVPVYDLLLEMLNAHVLRGCK SSITGSECSPAEDSKSKEGSQNPQSQ ->UNIPROT|Q9VSE9/1-484 GH28308p -MSDGVSILHIKQEVDTPSASCFSPSSKSTATQSGTNGLKSSPSVSPERQLCSSTTSLSCDLHNVSLSNDGDS -LKGSGTSGGNGGGGGGGTSGGNATNASAGAGSGSVRDELRRLCLVCGDVASGFHYGVASCEACKAFFKRTIQ -GNIEYTCPANNECEINKRRRKACQACRFQKCLLMGMLKEGVRLDRVRGGRQKYRRNPVSNSYQTMQLLYQSN -TTSLCDVKILEVLNSYEPDALSVQTPPPQVHTTSITNDEASSSSGSIKLESSVVTPNGTCIFQNNNNNDPNE -ILSVLSDIYDKELVSVIGWAKQIPGFIDLPLNDQMKLLQVSWAEILTLQLTFRSLPFNGKLCFATDVWMDEH -LAKECGYTEFYYHCVQIAQRMERISPRREEYYLLKALLLANCDILLDDQSSLRAFRDTILNSLNDVVYLLRH -SSAVSHQQQLLLLLPSLRQADDILRRFWRGIARDEVITMKKLFLEMLEPLAR +>UNIPROT|Q90ZM7/1-438 corticoid receptor +GVEFQLPYSASATSFRPSVATSSASGISNFSNGNNFGFLSPNGVQQDGFPYPGFTSPAQSSVPPQKACLICS +DEASGCHYGVLTCGSCKVFFKRAVEGQHNYLCAGRNDCIIDKIRRKNCPACRLRKCIQAGMTLGARKLKKQG +RVKGENQRSPASSTATTSSATPQPSSNSTAVTTFSPPPTGEPIFSPTLIAILQAIEPEVVMSGYDNTRSQTT +AYMLSSLNRLCDKQLVSIVKWAKSLPGFRNLHIDDQMVLIQYSWMGLMSFAMSWRSFQHTNSKLLYFAPDLV +FDETRMQQSAMYQLCVEMRQVSEDFMKLQVTSEEFLCMKAILLLSTVPQEGLKSQGCFEEMRISYIRELNRT +IARTEKNAVQCWQRFYQLTKLLXCMQDLVSKLLEFCFATFTQTQVWSVEFPDMMAEIISAQLASHHGREARA +LHFHKK +>UNIPROT|Q90ZM8/1-554 estrogen receptor +ARGFSEAHGYEYSGASLYQPLPPSCTEFSIGAHQQQQHQHQHHQHQHQQHHHQQQQQQPQPQQNGVLGEGQS +SHLSYLPPSTELPQYVPSSPSAPYSMELGAGRPHGYDPGPQSLYRGGVESSAPPYSEQQQVVGGGGAMSAMG +LTEPRHVSSGSLPSSTRPERSTQFCAVCSDYASGYHYGVWSCEGCKAFFKRSTQGHNDYMCPATNQCTIDRN +RRKSCQACRLRKCYEVGMVKGVRKDRKGFRGVKHKRKRPIPQKNGGEGGAGGGQDVSETRPQGERPSGPRDR +ESAVSSLEADQVISALLEAEPPTVLSSYDPDKPVTEASLMAALTSLADRELVHMITWAKKIPGFTAIGLSDQ +VQLLECCWLEILIVGLIWRSIDRPGQLHFAPNLILGREDARNVEGMLDMFDMLLVTVSRFRELHLRREEYVC +LKAMILLNSGVFFCLSNSAGEQTNVQLIQQILEKVMDALGSTIGHIEASPPQHSRRLSQLLLLLSQIRHISN +KGIEHLNSMKRKNVIPLYDLLLELLDAHSLQNTGLRTSPPPQDFRATLVP +>UNIPROT|Q91445/1-344 androgen receptor +EASGCHYGALTCGSCKVFFKRAAEGKQKYLCASRNDCTIDKFRRKNCPSCRLRKCYEAGMTLGARKLKKLGN +LKAQDDIEGASSSSPTEEQAPKLVMTRIDGYECQPIFLNVLEAIEPGVVCAGHDNSQPDSFSNLLTSLNELG +ERQLVYVVKWAKALPGFRNLHVDDQMSIIQYSWMGLMVFAMGWRSFTNVNSRMLYFAPDLVFNEYRMHKSRM +YSQCIRMRHLSQEFGWLQITPQGFLCMKALLFFSIIPVDGLKNQKLFDELRMNYIKELDRIIACKRKNPTSC +SRRFYQLTKVLDSVTPIAKDLHQFTFDLLIKAHMVSVDYPEMMAEIISVQVPKILS >UNIPROT|Q9IBD5/1-710 progesterone receptor MDNNHQDKMESLYTPARASPTPDAESIKRARNLIKTYSESFGSYVEEIVRDDSNNIQSLSSVPLLMRNFGNM DTLTCAPGSGSDSEIWKDFVVPGNSVVSKDTCGHVEISTKAENLSWAAAPLSREETLAKGTVTVPATVPKES @@ -26,15 +41,14 @@ SLTPRRLSGDSQALMPLGCLPGVRELHLSPQIISVLESIEPEVVYSGYDNSQPDMPNMLLNSLNRLCERQLL RIVKWSKSLPGFRSLHINDQMALIQYSWMSLMVFSLGWRSFQNVTSDYLYFAPDLILNEEYMRRSPIFDLCM AMQFIPQEFANLQVTKEEFLCMKVLLLLNTVPLEGLKSQPQFDEMRQNYIHELTKAIHLRENGVVACSQRFY HLTKLMDHMHDIVKKLHLYCLSTFIQADAMRVEFPEMMSEVIASQLPRVLAGMVKPLLFHTK ->UNIPROT|Q7LCB3/1-530 estrogen receptor 2 isoform A -MDIKNSPSSLNSPSSYNCSQSILPLEHGSIYIPSSYVDSHHEYPAMTFYSPAVMNYSIPSNVTNLEGGPGRQ -TTSPNVLWPTPGHLSPLVVHRQLSHLYAEPQKSPWCEARSLEHTLPVNRETLKRKVSGNRCASPVTGPGSKR -DAHFCAVCSDYASGYHYGVWSCEGCKAFFKRSIQGHNDYICPATNQCTIDKNRRKSCQACRLRKCYEVGMVK -CGSRRERCGYRLVRRQRSADEQLHCAGKAKRSGGHAPRVRELLLDALSPEQLVLTLLEAEPPHVLISRPSAP -FTEASMMMSLTKLADKELVHMISWAKKIPGFVELSLFDQVRLLESCWMEVLMMGLMWRSIDHPGKLIFAPDL -VLDRDEGKCVEGILEIFDMLLATTSRFRELKLQHKEYLCVKAMILLNSSMYPLVTATQDADSSRKLAHLLNA -VTDALVWVIAKSGISSQQQSMRLANLLMLLSHVRHASNKGMEHLLNMKCKNVVPVYDLLLEMLNAHVLRGCK -SSITGSECSPAEDSKSKEGSQNPQSQ +>UNIPROT|Q9VSE9/1-484 estrogen-related receptor +MSDGVSILHIKQEVDTPSASCFSPSSKSTATQSGTNGLKSSPSVSPERQLCSSTTSLSCDLHNVSLSNDGDS +LKGSGTSGGNGGGGGGGTSGGNATNASAGAGSGSVRDELRRLCLVCGDVASGFHYGVASCEACKAFFKRTIQ +GNIEYTCPANNECEINKRRRKACQACRFQKCLLMGMLKEGVRLDRVRGGRQKYRRNPVSNSYQTMQLLYQSN +TTSLCDVKILEVLNSYEPDALSVQTPPPQVHTTSITNDEASSSSGSIKLESSVVTPNGTCIFQNNNNNDPNE +ILSVLSDIYDKELVSVIGWAKQIPGFIDLPLNDQMKLLQVSWAEILTLQLTFRSLPFNGKLCFATDVWMDEH +LAKECGYTEFYYHCVQIAQRMERISPRREEYYLLKALLLANCDILLDDQSSLRAFRDTILNSLNDVVYLLRH +SSAVSHQQQLLLLLPSLRQADDILRRFWRGIARDEVITMKKLFLEMLEPLAR >UNIPROT|Q9YGV9/1-848 androgen receptor alpha MEIPVGLGGVSDATNAVFRGPYQNVFHSLQVAFQSHGAVSRSLDFPNTKYGFLQNRHFCEMRQENKQPPCKG LGLFYGNHRNSDTGTNEDDIACFSRQSDAEARPGIFSESSLDTGDEITCKLQSDNQGVRASGPLLPGSSGCN @@ -48,34 +62,3 @@ GQGQGPAEAELSVSPKYDLGFHTQSMFLNILEAIEPEVVNAGHDYGQPDSAASLLTSLNELGERQLVKVVKW AKGMPGFRSLYVDDQMTVIQHSWMAVMVFALGWRSFKNVKSRMLYFAPDLVFNEHRMQVSTMYEHCIRMKNF SQEFAMLQVSQEEFLCMKALLLFSTIPVEGLKGQNFFDELRRSYINELDRLVSFRSKSSCSERFQQLTRLLD SLQPVLKKLHQFTFDLFVQSQNLSNQVCFPEMISEIISVHVPKILAGTVKPILFHK ->UNIPROT|Q90ZM7/1-438 corticoid receptor -GVEFQLPYSASATSFRPSVATSSASGISNFSNGNNFGFLSPNGVQQDGFPYPGFTSPAQSSVPPQKACLICS -DEASGCHYGVLTCGSCKVFFKRAVEGQHNYLCAGRNDCIIDKIRRKNCPACRLRKCIQAGMTLGARKLKKQG -RVKGENQRSPASSTATTSSATPQPSSNSTAVTTFSPPPTGEPIFSPTLIAILQAIEPEVVMSGYDNTRSQTT -AYMLSSLNRLCDKQLVSIVKWAKSLPGFRNLHIDDQMVLIQYSWMGLMSFAMSWRSFQHTNSKLLYFAPDLV -FDETRMQQSAMYQLCVEMRQVSEDFMKLQVTSEEFLCMKAILLLSTVPQEGLKSQGCFEEMRISYIRELNRT -IARTEKNAVQCWQRFYQLTKLLXCMQDLVSKLLEFCFATFTQTQVWSVEFPDMMAEIISAQLASHHGREARA -LHFHKK ->UNIPROT|Q91445/1-344 androgen receptor -EASGCHYGALTCGSCKVFFKRAAEGKQKYLCASRNDCTIDKFRRKNCPSCRLRKCYEAGMTLGARKLKKLGN -LKAQDDIEGASSSSPTEEQAPKLVMTRIDGYECQPIFLNVLEAIEPGVVCAGHDNSQPDSFSNLLTSLNELG -ERQLVYVVKWAKALPGFRNLHVDDQMSIIQYSWMGLMVFAMGWRSFTNVNSRMLYFAPDLVFNEYRMHKSRM -YSQCIRMRHLSQEFGWLQITPQGFLCMKALLFFSIIPVDGLKNQKLFDELRMNYIKELDRIIACKRKNPTSC -SRRFYQLTKVLDSVTPIAKDLHQFTFDLLIKAHMVSVDYPEMMAEIISVQVPKILS ->UNIPROT|Q9VSE9/1-484 estrogen-related receptor -MSDGVSILHIKQEVDTPSASCFSPSSKSTATQSGTNGLKSSPSVSPERQLCSSTTSLSCDLHNVSLSNDGDS -LKGSGTSGGNGGGGGGGTSGGNATNASAGAGSGSVRDELRRLCLVCGDVASGFHYGVASCEACKAFFKRTIQ -GNIEYTCPANNECEINKRRRKACQACRFQKCLLMGMLKEGVRLDRVRGGRQKYRRNPVSNSYQTMQLLYQSN -TTSLCDVKILEVLNSYEPDALSVQTPPPQVHTTSITNDEASSSSGSIKLESSVVTPNGTCIFQNNNNNDPNE -ILSVLSDIYDKELVSVIGWAKQIPGFIDLPLNDQMKLLQVSWAEILTLQLTFRSLPFNGKLCFATDVWMDEH -LAKECGYTEFYYHCVQIAQRMERISPRREEYYLLKALLLANCDILLDDQSSLRAFRDTILNSLNDVVYLLRH -SSAVSHQQQLLLLLPSLRQADDILRRFWRGIARDEVITMKKLFLEMLEPLAR ->UNIPROT|Q90ZM8/1-554 estrogen receptor -ARGFSEAHGYEYSGASLYQPLPPSCTEFSIGAHQQQQHQHQHHQHQHQQHHHQQQQQQPQPQQNGVLGEGQS -SHLSYLPPSTELPQYVPSSPSAPYSMELGAGRPHGYDPGPQSLYRGGVESSAPPYSEQQQVVGGGGAMSAMG -LTEPRHVSSGSLPSSTRPERSTQFCAVCSDYASGYHYGVWSCEGCKAFFKRSTQGHNDYMCPATNQCTIDRN -RRKSCQACRLRKCYEVGMVKGVRKDRKGFRGVKHKRKRPIPQKNGGEGGAGGGQDVSETRPQGERPSGPRDR -ESAVSSLEADQVISALLEAEPPTVLSSYDPDKPVTEASLMAALTSLADRELVHMITWAKKIPGFTAIGLSDQ -VQLLECCWLEILIVGLIWRSIDRPGQLHFAPNLILGREDARNVEGMLDMFDMLLVTVSRFRELHLRREEYVC -LKAMILLNSGVFFCLSNSAGEQTNVQLIQQILEKVMDALGSTIGHIEASPPQHSRRLSQLLLLLSQIRHISN -KGIEHLNSMKRKNVIPLYDLLLELLDAHSLQNTGLRTSPPPQDFRATLVP diff --git a/lib/commons-codec-1.10.jar b/lib/commons-codec-1.10.jar new file mode 100644 index 0000000..1d7417c Binary files /dev/null and b/lib/commons-codec-1.10.jar differ diff --git a/lib/commons-codec-1.3.jar b/lib/commons-codec-1.3.jar deleted file mode 100644 index 957b675..0000000 Binary files a/lib/commons-codec-1.3.jar and /dev/null differ diff --git a/lib/commons-logging-1.1.1.jar b/lib/commons-logging-1.1.1.jar deleted file mode 100644 index 1deef14..0000000 Binary files a/lib/commons-logging-1.1.1.jar and /dev/null differ diff --git a/lib/commons-logging-1.2.jar b/lib/commons-logging-1.2.jar new file mode 100644 index 0000000..93a3b9f Binary files /dev/null and b/lib/commons-logging-1.2.jar differ diff --git a/lib/httpclient-4.0.3.jar b/lib/httpclient-4.0.3.jar deleted file mode 100644 index fd0d377..0000000 Binary files a/lib/httpclient-4.0.3.jar and /dev/null differ diff --git a/lib/httpclient-4.5.6.jar b/lib/httpclient-4.5.6.jar new file mode 100644 index 0000000..56231de Binary files /dev/null and b/lib/httpclient-4.5.6.jar differ diff --git a/lib/httpcore-4.0.1.jar b/lib/httpcore-4.0.1.jar deleted file mode 100644 index 4aef35e..0000000 Binary files a/lib/httpcore-4.0.1.jar and /dev/null differ diff --git a/lib/httpcore-4.4.10.jar b/lib/httpcore-4.4.10.jar new file mode 100644 index 0000000..dc510f8 Binary files /dev/null and b/lib/httpcore-4.4.10.jar differ diff --git a/lib/httpmime-4.0.3.jar b/lib/httpmime-4.0.3.jar deleted file mode 100644 index 0dfd331..0000000 Binary files a/lib/httpmime-4.0.3.jar and /dev/null differ diff --git a/lib/httpmime-4.5.6.jar b/lib/httpmime-4.5.6.jar new file mode 100644 index 0000000..df5a7d1 Binary files /dev/null and b/lib/httpmime-4.5.6.jar differ diff --git a/lib/java-json.jar b/lib/java-json.jar deleted file mode 100755 index 2f211e3..0000000 Binary files a/lib/java-json.jar and /dev/null differ diff --git a/lib/json-20180130.jar b/lib/json-20180130.jar new file mode 100644 index 0000000..bc2cd41 Binary files /dev/null and b/lib/json-20180130.jar differ diff --git a/src/Main.java b/src/Main.java new file mode 100644 index 0000000..2723feb --- /dev/null +++ b/src/Main.java @@ -0,0 +1,95 @@ +import java.io.File; +import java.io.IOException; +import java.net.URISyntaxException; + +import uk.ac.dundee.compbio.slivkaclient.FileHandler; +import uk.ac.dundee.compbio.slivkaclient.HttpException; +import uk.ac.dundee.compbio.slivkaclient.ServerError; +import uk.ac.dundee.compbio.slivkaclient.Service; +import uk.ac.dundee.compbio.slivkaclient.SlivkaClient; +import uk.ac.dundee.compbio.slivkaclient.TaskHandler; +import uk.ac.dundee.compbio.slivkaclient.form.Form; +import uk.ac.dundee.compbio.slivkaclient.form.FormField; +import uk.ac.dundee.compbio.slivkaclient.form.FormValidationException; +import uk.ac.dundee.compbio.slivkaclient.form.ValidationException; + +public class Main +{ + public static void main(String[] args) + { + SlivkaClient cli; + try + { + cli = new SlivkaClient("localhost", 8000); + } catch (URISyntaxException e) + { + throw new Error(e); + } + + Service service = null; + Form form; + try + { + for (Service s : cli.getServices()) + { + if (s.getName().equals("Clustalw")) + { + service = s; + } + } + form = service.getForm(); + } catch (IOException | ServerError | HttpException e) + { + throw new Error(e); + } + + File input = new File("examples/estrogenReceptorProtein.fa"); + if (!input.exists()) + { + throw new Error("no file"); + } + + TaskHandler th; + try + { + FileHandler fh = cli.uploadFile(input, "text/plain", "input.txt"); + th = form.create() + .insert("input", fh) + .insert("matrix", "blosum") + .insert("outorder", "aligned") + .submit(); + } catch (IOException | HttpException | ServerError e) + { + throw new Error(e); + } catch (FormValidationException e) + { + for (ValidationException e1 : e.getErrors()) + { + System.err.println(e1); + } + throw new Error(e); + } + + try + { + while (!th.getStatus().isReady()) + { + Thread.sleep(1000); + } + } catch (IOException | HttpException | Error | InterruptedException e) + { + throw new Error(e); + } + try + { + for (FileHandler fh : th.getResult()) + { + System.out.println(fh.getTitle()); + fh.writeTo(System.out); + } + } catch (IOException | HttpException | ServerError e) + { + throw new Error(e); + } + } +}