Commit fe8eb17a authored by khalid's avatar khalid
Browse files

Now we retain the right length of tagged seq

parent 0e13d458
......@@ -252,21 +252,22 @@ inline void process_file(taggedInputFile& input_file, std::unordered_map<std::st
// Read through the file and store the results
while ((line_n = kseq_read(sequence)) >= 0)
{
std::string aString(sequence->seq.s);
std::string str3;
std::size_t pos = aString.find(tag); // position of tag in sequence str
uint adjustedSeqLen = aString.length() - maxtagl ; // we suppose that all seqs have initialy the same length !!!
if(pos == 0)
{
if( tagl == maxtagl)
str3 = aString.substr (tagl); // get after tag to the end
else //tagl < maxtagl
//if( tagl == maxtagl)
// str3 = aString.substr (tagl); // get after tag to the end
//else //tagl < maxtagl
{
uint seql = aString.length();
str3 = aString.substr (tagl, seql - ( maxtagl -tagl ));
str3 = aString.substr (tagl, adjustedSeqLen ); //get bases after tag
}
}
else {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment