Re: Documentation, tutorials and cookbook about pairwise sequence alignment

Andrea Battistelli <[email protected]> Wed, 25 May 2016 12:49:50 +0200
Newsgroups gmane.comp.java.bio.general
Message-ID <CANDNoNS+N-=xrLuQGK7xDhK6BGoSNfxHgz+FpNg1toJsimrMDQ@mail.gmail.com>
--===============8806665391984828344==
Content-Type: multipart/alternative; boundary=001a113b18e8cfdc5c0533a86e86

--001a113b18e8cfdc5c0533a86e86
Content-Type: text/plain; charset=UTF-8

Ok understood, sorry.
Now it works, thank you Andreas.

2016-05-24 20:30 GMT+02:00 Andreas Prlic <[email protected]>:

> Hi Andreas,
>
> please don't mail me directly with questions, but keep them on the list,
> for the benefit of other users who might be in the same situation.
>
> You are right, the signature of SubstitutionMatrix has changed at some
> point in the past. Try this:
>
> SubstitutionMatrix<AminoAcidCompound> matrix = SubstitutionMatrixHelper.getBlosum65();
>
>
> There is also another example in the "demo" package of the alignment module, that you could take a look at.
>
> About the tutorial: When you have the basics figured out, any contributions/pull requests to improve the tutorial will be welcome! ;-)
>
> A
>
>
>
>
> On Tue, May 24, 2016 at 5:51 AM, Andrea Battistelli <
> [email protected]> wrote:
>
>> Hi Andreas.
>>
>> I have seen the codes in the page you suggested me.
>> I have encountered some errors about:
>>
>> *import org.biojava.nbio.alignment.template.SequencePair;*
>>
>>
>> *import org.biojava.nbio.alignment.template.SubstitutionMatrix;*
>> Regarding all the other imports, there are not problems.
>> Indeed in the code I have errors in this part:
>>
>> *SubstitutionMatrix<AminoAcidCompound> matrix = new
>> SimpleSubstitutionMatrix<AminoAcidCompound>();*
>> *List<SequencePair<ProteinSequence, AminoAcidCompound>> alig =
>> Alignments.getAllPairsAlignments(lst,*
>> *                PairwiseSequenceAlignerType.LOCAL, new
>> SimpleGapPenalty(), matrix);*
>> *for (SequencePair<ProteinSequence, AminoAcidCompound> pair : alig) {*
>> *            System.out.printf("%n%s vs %s%n%s",
>> pair.getQuery().getAccession(), pair.getTarget().getAccession(), pair);*
>> *}*
>> It is told me to create these two classes.
>>
>> I am using the last version of the BioJava project (4.2.1) by means of
>> Maven (as described in the site).
>> Probably in that version there are not anymore those classes*. *Could be
>> this the problem?
>> How could I solve this?
>>
>> Thanks a lot.
>>
>> P.S.
>> Regarding the "BioJavaTutorial page - book 2: The Alignment module" (
>> https://github.com/biojava/biojava-tutorial/blob/master/alignment/README.md),
>> could be possible kindly to have the explanation of the pages?
>> Unfortunaltely it is the onyl part of the tutorial without explanation.
>>
>>
>> 2016-05-24 14:12 GMT+02:00 Andrea Battistelli <[email protected]>:
>>
>>> Hi Andreas.
>>>
>>> Thank you very much for the fixes. Surely it will help me.
>>> I have understood the problem you encountered with the old site.
>>> Now I will try to apply those things.
>>>
>>> Thanks again,
>>> Andrea
>>>
>>> 2016-05-23 19:27 GMT+02:00 Andreas Prlic <[email protected]>:
>>>
>>>> Hi Andrea,
>>>>
>>>> Sorry for the inconvenience. We had to turn the old site off, since
>>>> there were too many security breaches which resulted in content spamming.
>>>> This is across all bio* projects...
>>>>
>>>> I fixed the links on the CookBook4 page. Checking some of the related
>>>> pages, there are still a lot of formatting issues. That will take a bit to
>>>> fix them all up. However, each page at the bottom has an "edit this page"
>>>> link, which makes it easy to access the raw markdown content.  It is
>>>> possible to see the code in a more readable way. I also fixed up this page
>>>> for now: http://biojava.org/wikis/BioJava:CookBook3:PSA/
>>>>
>>>> Hope that helps,
>>>>
>>>> Andreas
>>>>
>>>>
>>>>
>>>> On Sat, May 21, 2016 at 4:09 AM, Andrea Battistelli <
>>>> [email protected]> wrote:
>>>>
>>>>> Hello everyone.
>>>>>
>>>>> I have been studying the pairwise sequence alignment concept for a
>>>>> project that I need to do for an exam.
>>>>> In particular I am interested in the global and local alignments and
>>>>> all the things related to them (how they are implemented, how I can
>>>>> generate a paiwise alignment, ect.).
>>>>> I would implement my project in Java employing indeed BioJava as
>>>>> starting point.
>>>>> I set up correctly the Maven project on Eclipse so no problem under
>>>>> that point of view.
>>>>>
>>>>> Few months ago I have seen there was all the documentation, tutorials
>>>>> and specifications about the BioJava project based on the Wiki pages.
>>>>> I have seen it has been all migrated into a new web site but now I am
>>>>> not finding any documentation, tutorial or cookbook about the topic of
>>>>> personal interest.
>>>>>
>>>>> - In the BioJavaTutorial page - book 2, the alignment module has no
>>>>> pages of explanation.
>>>>> - In the CookBook4.0, all the links relative to the paiwise sequence
>>>>> alignment give me back an "address uninterpretable" message.
>>>>> - Finally in the Wiki Pages section there are many links. In some of
>>>>> these there are links interesting for me but they contain not well
>>>>> formatted codes.
>>>>>
>>>>> I know that it may taketime to migrate all the things but in the
>>>>> meantime:
>>>>> Is there any possibility to have the reference to the old web site?
>>>>> Anyone can help me to indicate me where I can find some good pages of
>>>>> documentation, tutorial, etc. about pairwise sequence alignment for BioJava?
>>>>>
>>>>> Thanks a lot.
>>>>>
>>>>> _______________________________________________
>>>>> Biojava-l mailing list  -  [email protected]
>>>>> http://mailman.open-bio.org/mailman/listinfo/biojava-l
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> -----------------------------------------------------------------------
>>>> Dr. Andreas Prlic
>>>> RCSB PDB Protein Data Bank
>>>> Technical & Scientific Team Lead
>>>> University of California, San Diego
>>>>
>>>> Editor Software Section
>>>> PLOS Computational Biology
>>>>
>>>> BioJava Project Lead
>>>> -----------------------------------------------------------------------
>>>>
>>>
>>>
>>
>
>
>
>

--001a113b18e8cfdc5c0533a86e86
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div><div>Ok understood, sorry.<br></div>Now it works, tha=
nk you Andreas.<br></div></div><div class=3D"gmail_extra"><br><div class=3D=
"gmail_quote">2016-05-24 20:30 GMT+02:00 Andreas Prlic <span dir=3D"ltr">&l=
t;<a href=3D"mailto:[email protected]" target=3D"_blank">[email protected]</a=
>&gt;</span>:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8=
ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr">Hi Andreas=
,<div><br></div><div>please don&#39;t mail me directly with questions, but =
keep them on the list, for the benefit of other users who might be in the s=
ame situation.</div><div><br></div><div>You are right, the signature of Sub=
stitutionMatrix has changed at some point in the past. Try this:</div><div>=
<br></div><div><pre style=3D"color:rgb(0,0,0);font-family:Menlo;font-size:9=
pt">SubstitutionMatrix&lt;AminoAcidCompound&gt; matrix =3D SubstitutionMatr=
ixHelper.<span style=3D"font-style:italic">getBlosum65</span>();</pre><pre>=
<font face=3D"arial, helvetica, sans-serif"><br></font></pre><pre><font fac=
e=3D"arial, helvetica, sans-serif">There is also another example in the &qu=
ot;demo&quot; package of the alignment module, that you could take a look a=
t.<br><br>About the tutorial: When you have the basics figured out, any con=
tributions/pull requests to improve the tutorial will be welcome! ;-)</font=
><span class=3D"HOEnZb"><font color=3D"#888888"><br><br>A</font></span></pr=
e><pre style=3D"color:rgb(0,0,0);font-family:Menlo;font-size:9pt"><br></pre=
><pre style=3D"color:rgb(0,0,0);font-family:Menlo;font-size:9pt"><br></pre>=
</div><div><div class=3D"h5"><div class=3D"gmail_extra"><br><div class=3D"g=
mail_quote">On Tue, May 24, 2016 at 5:51 AM, Andrea Battistelli <span dir=
=3D"ltr">&lt;<a href=3D"mailto:[email protected]" target=3D"_blank">a=
[email protected]</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_=
quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1=
ex"><div dir=3D"ltr"><div><div>Hi Andreas.<br><br></div>I have seen the cod=
es in the page you suggested me.<br>I have encountered some errors about:<b=
r><br><div style=3D"margin-left:40px"><i>import org.biojava.nbio.alignment.=
template.SequencePair;</i><br></div><div style=3D"margin-left:40px"><i>impo=
rt org.biojava.nbio.alignment.template.SubstitutionMatrix;<br><br></i></div=
></div><div>Regarding all the other imports, there are not problems.<br></d=
iv><div>Indeed in the code I have errors in this part:<br><br><div style=3D=
"margin-left:40px"><i><b><u>SubstitutionMatrix</u></b>&lt;AminoAcidCompound=
&gt; matrix =3D new SimpleSubstitutionMatrix&lt;AminoAcidCompound&gt;();</i=
><br></div><div style=3D"margin-left:40px"><i>List&lt;<b><u>SequencePair</u=
></b>&lt;ProteinSequence, AminoAcidCompound&gt;&gt; alig =3D Alignments.get=
AllPairsAlignments(lst,</i><br></div><div style=3D"margin-left:40px"><i>=C2=
=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 Pa=
irwiseSequenceAlignerType.LOCAL, new SimpleGapPenalty(), matrix);</i><br></=
div><div style=3D"margin-left:40px"><i>for (<b><u>SequencePair</u></b>&lt;P=
roteinSequence, AminoAcidCompound&gt; pair : alig) {</i><br></div><div styl=
e=3D"margin-left:40px"><i>=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=
=A0=C2=A0 System.out.printf(&quot;%n%s vs %s%n%s&quot;, pair.getQuery().get=
Accession(), pair.getTarget().getAccession(), pair);</i><br></div><div styl=
e=3D"margin-left:40px"><i>}</i><br></div></div><div>It is told me to create=
 these two classes.<br><br></div><div>I am using the last version of the Bi=
oJava project (4.2.1) by means of Maven (as described in the site).<br>Prob=
ably in that version there are not anymore those classes<i>. </i>Could be t=
his the problem?<br></div><div>How could I solve this?<br><br></div><div>Th=
anks a lot.<br></div><div><br></div><div>P.S. <br>Regarding the &quot;BioJa=
vaTutorial page - book 2: The Alignment module&quot; (<a href=3D"https://gi=
thub.com/biojava/biojava-tutorial/blob/master/alignment/README.md" target=
=3D"_blank">https://github.com/biojava/biojava-tutorial/blob/master/alignme=
nt/README.md</a>), could be possible kindly to have the explanation of the =
pages?<br></div><div>Unfortunaltely it is the onyl part of the tutorial wit=
hout explanation.<br></div><div><i><br></i></div></div><div><div><div class=
=3D"gmail_extra"><br><div class=3D"gmail_quote">2016-05-24 14:12 GMT+02:00 =
Andrea Battistelli <span dir=3D"ltr">&lt;<a href=3D"mailto:andreyas.1688@gm=
ail.com" target=3D"_blank">[email protected]</a>&gt;</span>:<br><bloc=
kquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #cc=
c solid;padding-left:1ex"><div dir=3D"ltr"><div><div><div><div>Hi Andreas.<=
br><br></div>Thank you very much for the fixes. Surely it will help me.<br>=
</div>I have understood the problem you encountered with the old site.<br><=
/div>Now I will try to apply those things.<br><br></div><div>Thanks again,<=
br></div><div>Andrea<br></div></div><div><div><div class=3D"gmail_extra"><b=
r><div class=3D"gmail_quote">2016-05-23 19:27 GMT+02:00 Andreas Prlic <span=
 dir=3D"ltr">&lt;<a href=3D"mailto:[email protected]" target=3D"_blank">andr=
[email protected]</a>&gt;</span>:<br><blockquote class=3D"gmail_quote" style=3D"=
margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"=
ltr">Hi Andrea,<div><br></div><div>Sorry for the inconvenience. We had to t=
urn the old site off, since there were too many security breaches which res=
ulted in content spamming. This is across all bio* projects...</div><div><b=
r></div><div>I fixed the links on the CookBook4 page. Checking some of the =
related pages, there are still a lot of formatting issues. That will take a=
 bit to fix them all up. However, each page at the bottom has an &quot;edit=
 this page&quot; link, which makes it easy to access the raw markdown conte=
nt.=C2=A0 It is possible to see the code in a more readable way. I also fix=
ed up this page for now: <a href=3D"http://biojava.org/wikis/BioJava:CookBo=
ok3:PSA/" target=3D"_blank">http://biojava.org/wikis/BioJava:CookBook3:PSA/=
</a></div><div><br></div><div>Hope that helps,</div><div><br></div><div>And=
reas<br><div><br></div></div><div><br></div></div><div class=3D"gmail_extra=
"><br><div class=3D"gmail_quote"><div><div>On Sat, May 21, 2016 at 4:09 AM,=
 Andrea Battistelli <span dir=3D"ltr">&lt;<a href=3D"mailto:andreyas.1688@g=
mail.com" target=3D"_blank">[email protected]</a>&gt;</span> wrote:<b=
r></div></div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;=
border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir=3D"ltr"><di=
v><div><div><div><div><div>Hello everyone.<br><br></div>I have been studyin=
g the pairwise sequence alignment concept for a project that I need to do f=
or an exam.<br></div><div>In particular I am interested in the global and l=
ocal alignments and all the things related to them (how they are implemente=
d, how I can generate a paiwise alignment, ect.).<br></div>I would implemen=
t my project in Java employing indeed BioJava as starting point.<br></div><=
div>I set up correctly the Maven project on Eclipse so no problem under tha=
t point of view.<br></div><div><br></div>Few months ago I have seen there w=
as all the documentation, tutorials and specifications about the BioJava pr=
oject based on the Wiki pages.<br></div>I have seen it has been all migrate=
d into a new web site but now I am not finding any documentation, tutorial =
or cookbook about the topic of personal interest.<br><br></div>- In the Bio=
JavaTutorial page - book 2, the alignment module has no pages of explanatio=
n.<br></div><div>- In the CookBook4.0, all the links relative to the paiwis=
e sequence alignment give me back an &quot;<span lang=3D"en"><span>address<=
/span> <span>uninterpretable</span></span>&quot; message.<br></div><div>- F=
inally in the Wiki Pages section there are many links. In some of these the=
re are links interesting for me but they contain not well formatted codes.<=
br><br></div><div>I know that it may taketime to migrate all the things but=
 in the meantime:<br>Is there any possibility to have the reference to the =
old web site?<br></div><div>Anyone can help me to indicate me where I can f=
ind some good pages of documentation, tutorial, etc. about pairwise sequenc=
e alignment for BioJava?<br><br></div><div>Thanks a lot.<br></div></div>
<br></div></div>_______________________________________________<br>
Biojava-l mailing list=C2=A0 -=C2=A0 <a href=3D"mailto:[email protected]=
en-bio.org" target=3D"_blank">[email protected]</a><br>
<a href=3D"http://mailman.open-bio.org/mailman/listinfo/biojava-l" rel=3D"n=
oreferrer" target=3D"_blank">http://mailman.open-bio.org/mailman/listinfo/b=
iojava-l</a><span><font color=3D"#888888"><br></font></span></blockquote></=
div><span><font color=3D"#888888"><br><br clear=3D"all"><div><br></div>-- <=
br><div><div dir=3D"ltr"><div><div dir=3D"ltr">----------------------------=
-------------------------------------------<br>Dr. Andreas Prlic<br>RCSB PD=
B Protein Data Bank</div><div>Technical &amp; Scientific Team Lead</div><di=
v dir=3D"ltr">University of California, San Diego<div><br></div><div>Editor=
 Software Section=C2=A0<br><div>PLOS Computational Biology<div><div><div><b=
r></div><div>BioJava Project Lead<br>--------------------------------------=
---------------------------------<br></div></div></div></div></div></div></=
div></div></div>
</font></span></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br><br clear=3D"all"><div><br></div><div><d=
iv dir=3D"ltr"><div><div dir=3D"ltr"><div><div><div><div><div><br></div></d=
iv></div></div></div></div></div></div></div>
</div></div></div></div>
</blockquote></div><br></div>

--001a113b18e8cfdc5c0533a86e86--

--===============8806665391984828344==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Biojava-l mailing list  -  [email protected]
http://mailman.open-bio.org/mailman/listinfo/biojava-l
--===============8806665391984828344==--