Skip to content

Commit

Permalink
Skip SQ line stripping when no classify is run
Browse files Browse the repository at this point in the history
Because this step will not involve any trimming
since no reads are being classified.
  • Loading branch information
tijyojwad committed Apr 22, 2024
1 parent a2abf83 commit d2f09c9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dorado/cli/demux.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ int demuxer(int argc, char* argv[]) {
auto emit_summary = parser.visible.get<bool>("emit-summary");
auto threads(parser.visible.get<int>("threads"));
auto max_reads(parser.visible.get<int>("max-reads"));
auto no_classify(parser.visible.get<bool>("--no-classify"));

alignment::AlignmentProcessingItems processing_items{reads, recursive_input, output_dir, true};
if (!processing_items.initialise()) {
Expand Down Expand Up @@ -213,7 +214,7 @@ int demuxer(int argc, char* argv[]) {
}

add_pg_hdr(header.get());
if (!no_trim) {
if (!no_classify && !no_trim) {
// Remove SQ lines from header since alignment information
// is invalidated after trimming.
utils::strip_alignment_data_from_header(header.get());
Expand Down
1 change: 1 addition & 0 deletions tests/test_simple_basecaller_execution.sh
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,7 @@ for bam in $output_dir/demux_only_test/SQK-RBK114-96_barcode01.bam $output_dir/d
echo "Missing expected bam file $bam"
exit 1
fi
samtools view $bam > /dev/null
done

rm -rf $output_dir

0 comments on commit d2f09c9

Please sign in to comment.