Commit 0ba5c684 authored by Marc Duez's avatar Marc Duez
parents a880ab95 19d4bbdd
......@@ -115,11 +115,14 @@ OnlineFasta::OnlineFasta(const OnlineFasta &of) {
OnlineFasta::~OnlineFasta() {
if (input_allocated)
delete input;
if (current.seq)
delete [] current.seq;
}
void OnlineFasta::init() {
line_nb = 0;
line = getInterestingLine();
current.seq = NULL;
}
size_t OnlineFasta::getLineNb() {
......@@ -142,7 +145,8 @@ void OnlineFasta::next() {
current.label.erase();
current.sequence.erase();
current.quality.erase();
current.seq = NULL;
if (current.seq)
delete [] current.seq;
if (hasNext()) {
switch(line[0]) {
......@@ -201,7 +205,8 @@ void OnlineFasta::next() {
case 'C': B = 1; break;
case 'G': B = 2; break;
case 'T': B = 3; break;
B = 4; break;
default:
B = 4; break;
}
current.seq[i] = B ;
}
......
......@@ -169,6 +169,7 @@ KmerSegmenter::KmerSegmenter(Sequence seq, IKmerStore<KmerAffect> *index,
info = "" ;
info_extra = "seed";
segmented = false;
reversed = false;
Dend=0;
int s = (size_t)index->getS() ;
......
#!/bin/bash
#!/usr/bin/env bash
if [ $# -eq 0 -o "$1" == "-h" -o "$1" == "--help" ]; then
echo "Usage: $0 <file.should_get>
......@@ -74,7 +74,7 @@ TMP_TAP_FILE=$(mktemp tap.XXXX)
{
nb_tests=0
# Count number of tests to be performed
nb_tests=`grep -Pc '^[^$#!]' $BASE`
nb_tests=`grep -Ec '^[^$#!]' $BASE`
echo "1.."$nb_tests
test_nb=1
......@@ -161,7 +161,7 @@ while read line; do
# Replace whitespaces if needed
if [ $IGNORE_WHITESPACES -ne 0 ]; then
pattern=$(sed -r 's/\s+/[[:space:]]+/g' <<< $pattern)
pattern=$(sed -r 's/[[:space:]]+/[[:space:]]+/g' <<< $pattern)
fi
debug "Grepping \"$pattern\" in $FILE_TO_GREP"
......
#!/bin/bash
#!/usr/bin/env bash
# This script also parse a file .should_get
# In the .should_get format, every line starting with a # is a comment
......
Markdown is supported
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