[Biojava-l] User defined substitution matrix.
Andreas Prlic
andreas.prlic at gmail.com
Wed Oct 12 16:00:14 UTC 2011
Hi Canan,
Please subscribe to the biojava-l mailing list for sending messages to
the list. Details for how to do that can be found here:
http://biojava.org/wiki/BioJava:MailingLists
About your question:
getResourceAsStream is just opening a stream to a file that is bundled
together with a jar file. There should be no need for you to call that
to get a matrix.
If you want to use any of the (many) standard substitution matrices
that are supported by BioJava you just need to call
SubstitutionMatrixHelper .getMatrixFromAAINDEX(nameOfMatrix)
If you want to work with a matrix that is not yet the AAINDEX
collection of matrices, it depends on how the matrix is represented in
the file. If it is in the same style as in AAINDEX, you can use the
DefaultAAIndexProvider to parse your custom matrix.
Andreas
On Tue, Oct 11, 2011 at 11:09 PM, Canan Has <cananhas at iyte.edu.tr> wrote:
> Dear Dr. Prlic,
> Sorry to bother you, but my mails to biojava forum-nabble are not being
> answered. Even I have been already subscribed, I am getting alerts saying
> your message is in pending list, because you are not subscribed. Therefore,
> I decided to ask my question to you directly. I hope you will answer to me.
> Because, it is so important and urgent.
> Simply,I want to create my own substitution matrix object. I examined the
> source code of SubstitutionMatrixHelper and the related others. I did some
> modifications and took null pointer exception for getResourceAsStream().
> I tried to find out where the directory for getResourceAsStream() has been
> set. At first, I thought the file directory is the resources folder in
> alignment folder. Then, I deleted one of the matrices - pam250 and tried to
> initialize it by calling getPam250() and matrix was created. This leads me
> to think that the developer introduced ftp.ncbi url to getResourceAsStream
> to take matrices by name.
> Can you show a way to create my own? Or you can tell me and I can change
> where the url is given and recompile the code.
> Thanks in advance
> Canan Has
> Research Assistant & MSc Student
> Computational Biology & Bioinformatics Lab
> Molecular Biology and Genetics Department
> Izmir Institute of Technology
>
More information about the Biojava-l
mailing list