Thomas hace 1 mes
padre
commit
5aabb5de5b
Se han modificado 2 ficheros con 6 adiciones y 6 borrados
  1. 1 1
      pandora-config.example.toml
  2. 5 5
      src/variant/variant_collection.rs

+ 1 - 1
pandora-config.example.toml

@@ -39,7 +39,7 @@ reference_name = "hs1"
 pseudoautosomal_regions_bed = "/home/t_steimle/ref/hs1/chm13v2.0_PAR.bed"
 
 # Sequence dictionary (.dict) for the reference.
-dict_file = "/data/ref/hs1/chm13v2.0.dict"
+dict_file = "/home/t_steimle/ref/hs1/chm13v2.0.dict"
 
 # RefSeq GFF3 annotation (sorted/indexed).
 refseq_gff = "/data/ref/hs1/chm13v2.0_RefSeq_Liftoff_v5.1_sorted.gff3.gz"

+ 5 - 5
src/variant/variant_collection.rs

@@ -1538,7 +1538,7 @@ impl ExternalAnnotation {
         unfound.par_sort();
         unfound.dedup();
 
-        let header = vcf_header("/data/ref/hs1/chm13v2.0.dict")?.join("\n");
+        let header = vcf_header(&self.config.dict_file)?.join("\n");
 
         let min_chunk_size = 1000;
         let max_chunks = 150;
@@ -1688,11 +1688,11 @@ impl ExternalAnnotation {
         mut unfound: Vec<VcfVariant>,
         annotations: &Annotations,
     ) -> anyhow::Result<()> {
-        unfound.par_sort();
+        unfound.par_sort_unstable();
         unfound.dedup();
         info!("{} variants to annotate with VEP.", unfound.len());
 
-        let header = vcf_header("/data/ref/hs1/chm13v2.0.dict")?.join("\n");
+        let header = vcf_header(&self.config.dict_file)?.join("\n");
 
         let (sv, unfound): (Vec<VcfVariant>, Vec<VcfVariant>) =
             unfound.into_iter().partition(|v| v.has_svtype());
@@ -1861,8 +1861,8 @@ fn process_vep_chunk(
     let out_summary = format!("{out_vep}_summary.html");
     let out_warnings = format!("{out_vep}_warnings.txt");
 
-    let mut vcf = File::create(&in_tmp)?; // If this fails, the error is propagated.
-    writeln!(vcf, "{}", header)?; // If this fails, the error is propagated.
+    let mut vcf = File::create(&in_tmp)?;
+    writeln!(vcf, "{}", header)?;
 
     for (i, row) in chunk.iter().enumerate() {
         writeln!(