yes it a good idea but i'm dealing with dna sequences .
i'm using :
for( QByteArray::const_iterator i = myqbyte.constEnd(); i !=myqbyte.constBegin(); )
but this procedure become so slow with large sequences
yes it a good idea but i'm dealing with dna sequences .
i'm using :
for( QByteArray::const_iterator i = myqbyte.constEnd(); i !=myqbyte.constBegin(); )
but this procedure become so slow with large sequences
DNA
I were to do so, I would write a customized container for DNA strand/sequence, (This will need knowledge of DNA structure and ways to digitize it)
There are other methods, but are applciation specific, like reverse only the section of the sequence? (instead of complete sequence).
Think again do you really want to reverse the sequence? can you not re-write your operation to operate on the sequence in reverse (I bet that should be acceptable)
When you know how to do it then you may do it wrong.
When you don't know how to do it then it is not that you may do it wrong but you may not do it right.
this is my function which do the reverse task (some time i need to get the reverse of the full length )
//--------------------------------------
// Returns the reverse strand of a DNA or RNA sequence.
QByteArray QDnaSequence::Reverse(QByteArray& seq)
{
QByteArray reverse;
for( QByteArray::const_iterator i = seq.constEnd(); i !=seq.constBegin(); )
{
--i;
reverse += *i;
}
return reverse;
}
Bookmarks