|
@@ -2,7 +2,8 @@ use std::{
|
|
|
collections::{HashMap, HashSet},
|
|
collections::{HashMap, HashSet},
|
|
|
fs::{self, File},
|
|
fs::{self, File},
|
|
|
io::{Read, Write},
|
|
io::{Read, Write},
|
|
|
- path::{Path, PathBuf}, sync::Arc,
|
|
|
|
|
|
|
+ path::{Path, PathBuf},
|
|
|
|
|
+ sync::Arc,
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
use anyhow::Context;
|
|
use anyhow::Context;
|
|
@@ -20,7 +21,12 @@ use super::vcf_variant::{
|
|
|
};
|
|
};
|
|
|
use crate::{
|
|
use crate::{
|
|
|
annotation::{
|
|
annotation::{
|
|
|
- Annotation, Annotations, cosmic::Cosmic, echtvar::{parse_echtvar_val, run_echtvar}, gnomad::GnomAD, parse_trinuc, vep::{VEP, VepJob, VepLine, get_best_vep, run_vep}
|
|
|
|
|
|
|
+ cosmic::Cosmic,
|
|
|
|
|
+ echtvar::{parse_echtvar_val, run_echtvar},
|
|
|
|
|
+ gnomad::GnomAD,
|
|
|
|
|
+ parse_trinuc,
|
|
|
|
|
+ vep::{get_best_vep, VepJob, VepLine, VEP},
|
|
|
|
|
+ Annotation, Annotations,
|
|
|
},
|
|
},
|
|
|
collection::{
|
|
collection::{
|
|
|
bam::{counts_at, counts_ins_at},
|
|
bam::{counts_at, counts_ins_at},
|
|
@@ -28,10 +34,12 @@ use crate::{
|
|
|
},
|
|
},
|
|
|
config::Config,
|
|
config::Config,
|
|
|
helpers::{
|
|
helpers::{
|
|
|
- Hash128, Repeat, app_storage_dir, detect_repetition, estimate_shannon_entropy, mean, temp_file_path
|
|
|
|
|
|
|
+ app_storage_dir, detect_repetition, estimate_shannon_entropy, mean, temp_file_path,
|
|
|
|
|
+ Hash128, Repeat,
|
|
|
},
|
|
},
|
|
|
io::{fasta::sequence_at, readers::get_reader, vcf::vcf_header, writers::get_gz_writer},
|
|
io::{fasta::sequence_at, readers::get_reader, vcf::vcf_header, writers::get_gz_writer},
|
|
|
- positions::{GenomePosition, GenomeRange, GetGenomePosition, overlaps_par}, run,
|
|
|
|
|
|
|
+ positions::{overlaps_par, GenomePosition, GenomeRange, GetGenomePosition},
|
|
|
|
|
+ run,
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
/// A collection of VCF variants along with associated metadata.
|
|
/// A collection of VCF variants along with associated metadata.
|
|
@@ -1750,7 +1758,8 @@ impl ExternalAnnotation {
|
|
|
writeln!(vcf, "{s}",)?;
|
|
writeln!(vcf, "{s}",)?;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- run_vep(&in_tmp, &out_vep).context("Error while running VEP.")?;
|
|
|
|
|
|
|
+ let mut vep_job = VepJob::new(&in_tmp, &out_vep, config);
|
|
|
|
|
+ run!(config, &mut vep_job).context("Error while running VEP.")?;
|
|
|
|
|
|
|
|
let mut reader_vep = ReaderBuilder::new()
|
|
let mut reader_vep = ReaderBuilder::new()
|
|
|
.delimiter(b'\t')
|
|
.delimiter(b'\t')
|
|
@@ -1873,7 +1882,7 @@ fn process_vep_chunk(
|
|
|
)?;
|
|
)?;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- let mut vep_job= VepJob::new(&in_tmp, &out_vep, config);
|
|
|
|
|
|
|
+ let mut vep_job = VepJob::new(&in_tmp, &out_vep, config);
|
|
|
if let Err(e) = run!(config, &mut vep_job) {
|
|
if let Err(e) = run!(config, &mut vep_job) {
|
|
|
error!("VEP error: {e}");
|
|
error!("VEP error: {e}");
|
|
|
return Err(anyhow::anyhow!("VEP execution failed: {}", e)); // Propagate the error.
|
|
return Err(anyhow::anyhow!("VEP execution failed: {}", e)); // Propagate the error.
|