fn freebayes_variant_call(ref_name: &str, result_dir: &str) {
    let input_file = format!("{}/sorted_alignments.bam", result_dir);
    let output_file = format!("{}/variants.vcf", result_dir);

    println!("Waiting for Freebayes...");
    let mut child_proc = Command::new("freebayes")
        .args(&[
            "--pooled-continuous",
            "--fasta-reference",
            ref_name,
            "--bam",
            &input_file[..],
            "--vcf",
            &output_file[..],
        ])
        .spawn()
        .unwrap();
    let _result = child_proc.wait().unwrap();
    println!("Variant calling complete");
}
// do variant calling with Freebayes
// use the --pooled-continuous flag since we are using more than 1 fly in our sample
do variant calling with Freebayes
use the --pooled-continuous flag since we are using more than 1 fly in our sample
do variant calling with Freebayes use the -- pooled - continuous flag since we are using more than 1 fly in our sample
fn freebayes_variant_call(ref_name: &str, result_dir: &str) {
    let input_file = format!("{}/sorted_alignments.bam", result_dir);
    let output_file = format!("{}/variants.vcf", result_dir);
    println!("Waiting for Freebayes...");
    let mut child_proc = Command::new("freebayes")
        .args(&[
            "--pooled-continuous",
            "--fasta-reference",
            ref_name,
            "--bam",
            &input_file[..],
            "--vcf",
            &output_file[..],
        ])
        .spawn()
        .unwrap();
    let _result = child_proc.wait().unwrap();
    println!("Variant calling complete");
}
fn freebayes_variant_call ( ref_name : & str , result_dir : & str ) { let input_file = format ! ( " " result_dir ) ; let output_file = format ! ( " " result_dir ) ; println ! ( " " ) ; let mut child_proc = Command :: new ( " " ) . args ( & [ " " , " " , ref_name , " " , & input_file [ .. ] , " " , & output_file [ .. ] , ] ) . spawn ( ) . unwrap ( ) ; let _result = child_proc . wait ( ) . unwrap ( ) ; println ! ( " " ) ; }
do variant calling with Freebayes
use the --pooled-continuous flag since we are using more than 1 fly in our sample
do variant calling with Freebayes use the -- pooled - continuous flag since we are using more than 1 fly in our sample
ref_name
&str
result_dir
&str
ref_name
&str
result_dir
&str