Skip to content

Commit

Permalink
fix: use proper code for decoy reads in unmaped names
Browse files Browse the repository at this point in the history
In single-end mode, *all* unmapped reads were
being reported with the code 'u'. This fixes
the output so the proper code is reported (e.g. 'd')
for decoys. This addresses #748.
  • Loading branch information
Rob Patro committed Jun 3, 2022
1 parent cb6b6ca commit 0fd4dbb
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/SalmonQuantify.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1424,7 +1424,7 @@ void processReads(
if (writeUnmapped and
mapType != salmon::utils::MappingType::PAIRED_MAPPED) {
// If we have no mappings --- then there's nothing to do
// unless we're outputting names for un-mapped reads
// unless we're outputting names for un-mapped / decoy-mapped reads
unmappedNames << rp.first.name << ' ' << salmon::utils::str(mapType)
<< '\n';
}
Expand Down Expand Up @@ -1854,8 +1854,9 @@ void processReads(

if (writeUnmapped and mapType != salmon::utils::MappingType::SINGLE_MAPPED) {
// If we have no mappings --- then there's nothing to do
// unless we're outputting names for un-mapped reads
unmappedNames << rp.name << " u\n";
// unless we're outputting names for un-mapped / decoy mapped reads
unmappedNames << rp.name << ' ' << salmon::utils::str(mapType)
<< '\n';
}

validHits += jointAlignments.size();
Expand Down

0 comments on commit 0fd4dbb

Please sign in to comment.