if (isPaired) {
assert(samread(in, b2) >= 0 && (b2->core.flag & 0x0001));
assert((b->core.flag & 0x0001) && (b2->core.flag & 0x0001));
- assert((b->core.flag & 0x0040) && (b2->core.flag & 0x0080) || (b->core.flag & 0x0080) && (b2->core.flag & 0x0040));
+ assert(((b->core.flag & 0x0040) && (b2->core.flag & 0x0080)) || ((b->core.flag & 0x0080) && (b2->core.flag & 0x0040)));
++cnt;
}
if (verbose && cnt % 1000000 == 0) { std::cout<< cnt<< "alignment lines are loaded!"<< std::endl; }
assert((b->core.flag & 0x0001) && (b2->core.flag & 0x0001));
- assert((b->core.flag & 0x0040) && (b2->core.flag & 0x0080) || (b->core.flag & 0x0080) && (b2->core.flag & 0x0040));
+ assert(((b->core.flag & 0x0040) && (b2->core.flag & 0x0080)) || ((b->core.flag & 0x0080) && (b2->core.flag & 0x0040)));
//unalignable reads, skip
bool notgood = (b->core.flag & 0x0004) || (b2->core.flag & 0x0004);
convert(b, hit->getConPrb());
convert(b2, hit->getConPrb());
-
- b->core.mpos = b2->core.pos;
- b2->core.mpos = b->core.pos;
}
/*
use Getopt::Long;
use Pod::Usage;
use File::Basename;
-use Switch;
use strict;
#const
&runCommand($command);
$command = $dir."rsem-build-read-index $gap";
-switch($read_type) {
- case 0 { $command .= " 0 $quiet $imdName\_alignable.fa"; }
- case 1 { $command .= " 1 $quiet $imdName\_alignable.fq"; }
- case 2 { $command .= " 0 $quiet $imdName\_alignable_1.fa $imdName\_alignable_2.fa"; }
- case 3 { $command .= " 1 $quiet $imdName\_alignable_1.fq $imdName\_alignable_2.fq"; }
-}
+if ($read_type == 0) { $command .= " 0 $quiet $imdName\_alignable.fa"; }
+elsif ($read_type == 1) { $command .= " 1 $quiet $imdName\_alignable.fq"; }
+elsif ($read_type == 2) { $command .= " 0 $quiet $imdName\_alignable_1.fa $imdName\_alignable_2.fa"; }
+elsif ($read_type == 3) { $command .= " 1 $quiet $imdName\_alignable_1.fq $imdName\_alignable_2.fq"; }
+else { print "Impossible! read_type is not in [1,2,3,4]!\n"; exit(-1); }
&runCommand($command);
my $doesOpen = open(OUTPUT, ">$imdName.mparams");
size_t pos2 = line.find_first_of('\t', pos);
if (pos2 == string::npos) pos2 = line.length();
tpm = atof(line.substr(pos, pos2 - pos).c_str());
- theta[i] = tpm * eel[i];
+ theta[i] = tpm * eel[i]; // during simulation, there is no check for effL < 0. The reason is for that case, eel[i] here = 0 and therefore no chance to sample from it
denom += theta[i];
}
assert(denom > EPSILON);