Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #2337 > unrolled thread
| Started by | Matteo Pendleton <znfinger@gmail.com> |
|---|---|
| First post | 2011-05-13 10:28 +0000 |
| Last post | 2011-05-15 11:04 +0000 |
| Articles | 3 — 3 participants |
Back to article view | Back to comp.soft-sys.math.mathematica
Protein Sequence Alignment efficiency Matteo Pendleton <znfinger@gmail.com> - 2011-05-13 10:28 +0000
Re: Protein Sequence Alignment efficiency Armand Tamzarian <mike.honeychurch@gmail.com> - 2011-05-14 07:13 +0000
Re: Protein Sequence Alignment efficiency ZnFinger <znfinger@gmail.com> - 2011-05-15 11:04 +0000
| From | Matteo Pendleton <znfinger@gmail.com> |
|---|---|
| Date | 2011-05-13 10:28 +0000 |
| Subject | Protein Sequence Alignment efficiency |
| Message-ID | <iqj14b$rg8$1@smc.vnet.net> |
I'm trying to do some bioinformatics work in Mathematica and I've run up
against a bit of a roadblock regarding code efficiency. I'm doing pairwise
protein sequence alignments and I've written a nice little function that
takes two sequences and returns the optimal alignment. The trouble is that
it's slow. The reason
it's slow is because changing the scoring table to the proper "BLOSUM80"
slows the operation down horribly.
Assuming:
seqa =
"QVQLVQSGAEVKKPGSSVKVSCKASGGTFSSYAISWVRQAPGQGLEWMGGIIPIFGTANYAQKFQGRVTITADESTSTAYMELSSLRSEDTAVYYCARDLETTVVTIYFDYWGQGTLVTVSS";
seqb =
"QVQLVQSGAEVKKPGASVKVSCKASGYTFTGYYMHWVRQAPGQGLEWMGRINPNSGGTNYAQKFQGRVTSTRDTSISTAYMELSRLRSDDTVVYYCARDLRRFGGVPYYFDYWGQGTLVTVSS"
While:
Timing[SequenceAlignment[seqa , seqb , MergeDifferences -> False];]
Out[1]={0., Null}
Changing the scoring table results in this:
Timing[SequenceAlignment[ seqa , seqb , SimilarityRules -> "BLOSUM80" ,
MergeDifferences -> False];]
Out[1]={0.171, Null}
..and my two strings are very similar. Is there any way to optimize the
SequenceAlignment function so that it doesn't do this or would it be better
to create a specialized alignment function based on the underlying linear
programming so that the scoring table is built in? I'd like to be able to
run millions of sequences through this function and that's not going to be
practical if I can only do 5/sec.
Thanks in advance!
[toc] | [next] | [standalone]
| From | Armand Tamzarian <mike.honeychurch@gmail.com> |
|---|---|
| Date | 2011-05-14 07:13 +0000 |
| Message-ID | <iqla29$9va$1@smc.vnet.net> |
| In reply to | #2337 |
On May 13, 8:28 pm, Matteo Pendleton <znfin...@gmail.com> wrote:
> I'm trying to do some bioinformatics work in Mathematica and I've run up
> against a bit of a roadblock regarding code efficiency. I'm doing pairwise
> protein sequence alignments and I've written a nice little function that
> takes two sequences and returns the optimal alignment. The trouble is that
> it's slow. The reason
> it's slow is because changing the scoring table to the proper "BLOSUM80"
> slows the operation down horribly.
>
> Assuming:
>
> seqa =
> "QVQLVQSGAEVKKPGSSVKVSCKASGGTFSSYAISWVRQAPGQGLEWMGGIIPIFGTANYAQKFQGRVTITADESTSTAYMELSSLRSEDTAVYYCARDLETTVVTIYFDYWGQGTLVTVSS";
> seqb =
> "QVQLVQSGAEVKKPGASVKVSCKASGYTFTGYYMHWVRQAPGQGLEWMGRINPNSGGTNYAQKFQGRVTSTRDTSISTAYMELSRLRSDDTVVYYCARDLRRFGGVPYYFDYWGQGTLVTVSS"
>
> While:
> Timing[SequenceAlignment[seqa , seqb , MergeDifferences -> False];]
>
> Out[1]={0., Null}
>
> Changing the scoring table results in this:
>
> Timing[SequenceAlignment[ seqa , seqb , SimilarityRules -> "BLOSUM80" ,
> MergeDifferences -> False];]
>
> Out[1]={0.171, Null}
>
> ..and my two strings are very similar. Is there any way to optimize the
> SequenceAlignment function so that it doesn't do this or would it be better
> to create a specialized alignment function based on the underlying linear
> programming so that the scoring table is built in? I'd like to be able to
> run millions of sequences through this function and that's not going to be
> practical if I can only do 5/sec.
>
> Thanks in advance!
Out of curiosity what led you to try to use Mathematica for this task?
Mike
[toc] | [prev] | [next] | [standalone]
| From | ZnFinger <znfinger@gmail.com> |
|---|---|
| Date | 2011-05-15 11:04 +0000 |
| Message-ID | <iqobvk$m7j$1@smc.vnet.net> |
| In reply to | #2365 |
I'm creating a generalized method for developing biologic therapeutic agents that is heavily dependent on some systems biology requiring a lot of differential calculus, network analysis, some manipulation of crystal structures and some protein sequence space operations. All of those things I have in place from earlier work (and they function quickly even with lots of sequences/structures) but part of the front end of the software is dependent on producing i -> j SW alignment pairs from a large sequence library. There's an additional functionality I'd like to add on later that requires dynamically updating that set of sequences, so this ability to do quick pairwise alignments is rather critical and I'd rather not have to resort to introducing scripts from other languages if I don't have to, particularly when Mathematica should have the ability to perform this operation quickly.
[toc] | [prev] | [standalone]
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web