fn samtools_fixmate(result_dir: &str) {
    let input_file = format!("{}/raw_alignments.sam", result_dir);
    let output_file = format!("{}/fixed_alignments.bam", result_dir);

    println!("Waiting for samtools fixmate...");
    let mut child_proc = Command::new("samtools")
        .args(&["fixmate", "-O", "bam", &input_file[..], &output_file[..]])
        .spawn()
        .unwrap();
    let _result = child_proc.wait().unwrap();
    println!("Alignment fixing complete");
}
// "fix" alignments by cleaning up read pairing information and flags
// also compress from SAM format to BAM format to save space and
// put the output in result_dir/fixed_alignments.sam
"fix" alignments by cleaning up read pairing information and flags
also compress from SAM format to BAM format to save space and
put the output in result_dir/fixed_alignments.sam
" fix " alignments by cleaning up read pairing information and flags also compress from SAM format to BAM format to save space and put the output in result_dir / fixed_alignments . sam
fn samtools_fixmate(result_dir: &str) {
    let input_file = format!("{}/raw_alignments.sam", result_dir);
    let output_file = format!("{}/fixed_alignments.bam", result_dir);
    println!("Waiting for samtools fixmate...");
    let mut child_proc = Command::new("samtools")
        .args(&["fixmate", "-O", "bam", &input_file[..], &output_file[..]])
        .spawn()
        .unwrap();
    let _result = child_proc.wait().unwrap();
    println!("Alignment fixing complete");
}
fn samtools_fixmate ( result_dir : & str ) { let input_file = format ! ( " " result_dir ) ; let output_file = format ! ( " " result_dir ) ; println ! ( " " ) ; let mut child_proc = Command :: new ( " " ) . args ( & [ " " , " " , " " , & input_file [ .. ] , & output_file [ .. ] ] ) . spawn ( ) . unwrap ( ) ; let _result = child_proc . wait ( ) . unwrap ( ) ; println ! ( " " ) ; }
"fix" alignments by cleaning up read pairing information and flags
also compress from SAM format to BAM format to save space and
put the output in result_dir/fixed_alignments.sam
" fix " alignments by cleaning up read pairing information and flags also compress from SAM format to BAM format to save space and put the output in result_dir / fixed_alignments . sam
result_dir
&str
result_dir
&str