Skip to content

Commit

Permalink
remove_minimap2_duplicated_headers: Use it.
Browse files Browse the repository at this point in the history
  • Loading branch information
wwood committed Dec 9, 2019
1 parent ffc5fda commit 27f2a30
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@ env:
build: false

test_script:
- cargo test
- PATH=target/debug:$PATH cargo test

10 changes: 8 additions & 2 deletions src/bam_generator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -797,7 +797,7 @@ pub fn build_mapping_command(
};

return format!(
"{} {} -t {} {} '{}' {}",
"{} {} -t {} {} '{}' {}{}",
match mapping_program {
MappingProgram::BWA_MEM => "bwa mem".to_string(),
_ => {
Expand All @@ -820,5 +820,11 @@ pub fn build_mapping_command(
threads,
read_params1,
reference,
read_params2)
read_params2,
match mapping_program {
MappingProgram::BWA_MEM => {""},
// Required because of https://github.com/lh3/minimap2/issues/527
_ => " | remove_minimap2_duplicated_headers"
}
)
}
2 changes: 2 additions & 0 deletions src/bin/remove_minimap2_duplicated_headers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ fn main() {
// @SQ lines before the @PG line are removed. Other lines are printed to
// STDOUT.

// See https://github.com/lh3/minimap2/issues/527

let mut is_before_pg = true;

let stdin = std::io::stdin();
Expand Down

0 comments on commit 27f2a30

Please sign in to comment.