Results 1 to 4 of 4
Thread: arrayList in a while loop
- 11-04-2011, 12:59 AM #1
arrayList in a while loop
I got a little bit of code I am kinda stuck with.
I got this arrayList where we stored a fasta file.
Fasta file example: >seq1 guguurguorgungun ionjlimlmo >seq2 jjkliuihlni >seq3 ppokkpdgstdcbch mdhdgsvtxtgsgwd jdbuydfyhedgy
But the problem is, how do I get it to take the next >seq...
I was thinking of letting it count++;
But overall, how can I find a certain ietm in the arrayList? (Like this ">")
I don't know if indexOf would help?
- 11-04-2011, 01:31 AM #2
Re: arrayList in a while loophow can I find a certain ietm in the arrayList? (Like this ">")
But if the '>' is embedded in a longer String or class, you will have to get each object in the list and look in the object's contents.
- 11-07-2011, 12:02 AM #3
Re: arrayList in a while loop
We now made a function getProtein. And what getProtein does is he takes every >seq and the lines below.
Now the idea was something like this:
int count = 0;
// Do something to continue to the next with getProtein function (>seq2 etc.)
Do you maybe have any idea on this one?
Like how to get the next >seq...
- 11-07-2011, 12:28 AM #4
- By simon.black325 in forum New To JavaReplies: 6Last Post: 09-08-2011, 04:18 AM
- By Ciwan in forum New To JavaReplies: 21Last Post: 06-27-2011, 07:29 PM
- By moriarty in forum New To JavaReplies: 30Last Post: 03-28-2010, 03:00 AM
- By Java Tip in forum Java TipReplies: 0Last Post: 01-20-2008, 09:53 AM
- By Java Tip in forum Java TipReplies: 0Last Post: 11-14-2007, 04:22 PM