zipstrain 0.2.11__tar.gz → 0.2.16__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {zipstrain-0.2.11 → zipstrain-0.2.16}/PKG-INFO +1 -1
- {zipstrain-0.2.11 → zipstrain-0.2.16}/pyproject.toml +1 -1
- {zipstrain-0.2.11 → zipstrain-0.2.16}/src/zipstrain/task_manager.py +12 -7
- {zipstrain-0.2.11 → zipstrain-0.2.16}/README.md +0 -0
- {zipstrain-0.2.11 → zipstrain-0.2.16}/src/zipstrain/__init__.py +0 -0
- {zipstrain-0.2.11 → zipstrain-0.2.16}/src/zipstrain/cli.py +0 -0
- {zipstrain-0.2.11 → zipstrain-0.2.16}/src/zipstrain/compare.py +0 -0
- {zipstrain-0.2.11 → zipstrain-0.2.16}/src/zipstrain/database.py +0 -0
- {zipstrain-0.2.11 → zipstrain-0.2.16}/src/zipstrain/profile.py +0 -0
- {zipstrain-0.2.11 → zipstrain-0.2.16}/src/zipstrain/utils.py +0 -0
- {zipstrain-0.2.11 → zipstrain-0.2.16}/src/zipstrain/visualize.py +0 -0
|
@@ -523,7 +523,7 @@ class ProfileTaskGenerator(TaskGenerator):
|
|
|
523
523
|
"bed-file": FileInput(self.profile_bed_file),
|
|
524
524
|
"gene-range-table": FileInput(self.gene_range_file),
|
|
525
525
|
"genome-length-file": FileInput(self.genome_length_file),
|
|
526
|
-
"num-
|
|
526
|
+
"num-workers": IntInput(self.num_procs),
|
|
527
527
|
"breadth-min-cov": IntInput(self.breadth_min_cov),
|
|
528
528
|
}
|
|
529
529
|
expected_outputs ={
|
|
@@ -720,7 +720,7 @@ class LocalBatch(Batch):
|
|
|
720
720
|
|
|
721
721
|
def __init__(self, tasks, id, run_dir, expected_outputs) -> None:
|
|
722
722
|
super().__init__(tasks, id, run_dir, expected_outputs)
|
|
723
|
-
self._script = self.TEMPLATE_CMD + "\nset -
|
|
723
|
+
self._script = self.TEMPLATE_CMD + "\nset -euo pipefail\n"
|
|
724
724
|
self._proc: asyncio.subprocess.Process | None = None
|
|
725
725
|
|
|
726
726
|
|
|
@@ -759,14 +759,18 @@ class LocalBatch(Batch):
|
|
|
759
759
|
except asyncio.CancelledError:
|
|
760
760
|
if self._proc and self._proc.returncode is None:
|
|
761
761
|
self._proc.terminate()
|
|
762
|
-
await write_file(self.batch_dir / f"{self.id}.err",
|
|
762
|
+
await write_file(self.batch_dir / f"{self.id}.err", err_bytes.decode(), self.file_semaphore)
|
|
763
763
|
|
|
764
|
-
raise
|
|
764
|
+
raise Exception
|
|
765
765
|
|
|
766
766
|
|
|
767
767
|
await write_file(self.batch_dir / f"{self.id}.out", out_bytes.decode(), self.file_semaphore)
|
|
768
768
|
await write_file(self.batch_dir / f"{self.id}.err", err_bytes.decode(), self.file_semaphore)
|
|
769
769
|
|
|
770
|
+
if self._proc.returncode != 0:
|
|
771
|
+
error=err_bytes.decode()
|
|
772
|
+
raise RuntimeError(f"Batch script failed with error:\n{error}")
|
|
773
|
+
|
|
770
774
|
if self._proc.returncode == 0 and self.outputs_ready():
|
|
771
775
|
self.cleanup()
|
|
772
776
|
self._status = Status.SUCCESS.value
|
|
@@ -814,7 +818,7 @@ class SlurmBatch(Batch):
|
|
|
814
818
|
super().__init__(tasks, id, run_dir, expected_outputs)
|
|
815
819
|
self._check_slurm_works()
|
|
816
820
|
self.slurm_config = slurm_config
|
|
817
|
-
self._script = self.TEMPLATE_CMD + self.slurm_config.to_slurm_args() + "\nset -
|
|
821
|
+
self._script = self.TEMPLATE_CMD + self.slurm_config.to_slurm_args() + "\nset -euo pipefail\n"
|
|
818
822
|
self._job_id = None
|
|
819
823
|
|
|
820
824
|
def _check_slurm_works(self) -> None:
|
|
@@ -1454,7 +1458,7 @@ class ProfileBamTask(Task):
|
|
|
1454
1458
|
|
|
1455
1459
|
- gene-range-table: A BED file specifying the gene ranges for the sample.
|
|
1456
1460
|
|
|
1457
|
-
- num-
|
|
1461
|
+
- num-workers: The number of concurrent workers to use for processing.
|
|
1458
1462
|
|
|
1459
1463
|
- genome-length-file: A file containing the lengths of the genomes in the reference fasta.
|
|
1460
1464
|
|
|
@@ -1477,7 +1481,8 @@ class ProfileBamTask(Task):
|
|
|
1477
1481
|
--stb-file <stb-file> \
|
|
1478
1482
|
--num-workers <num-workers> \
|
|
1479
1483
|
--output-dir .
|
|
1480
|
-
mv
|
|
1484
|
+
mv input_profile.parquet <sample-name>.parquet
|
|
1485
|
+
mv input_genome_stats.parquet <sample-name>_genome_stats.parquet
|
|
1481
1486
|
samtools idxstats <bam-file> | awk '$3 > 0 {print $1}' > <sample-name>.parquet.scaffolds
|
|
1482
1487
|
"""
|
|
1483
1488
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|