Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
## 1.1.2

- fix for assess_genome_creation when vcf tables is empty

## 1.1.1

- fix for asseess_genome_creation when there are no indels
- fix for assess_genome_creation when there are no indels

## 1.1.0

Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rundial"
version = "1.1.1"
version = "1.1.2"
edition = "2024"
rust-version = "1.93"

Expand Down
8 changes: 4 additions & 4 deletions process/consensus.nf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
process apply_filters {
publishDir "${params.publish_dir}", enabled: params.publish_dir != "", mode: "copy", saveAs: { filename -> sample_name + "." + filename }
container {
params.test_container_rundial == "" ? params.container_prefix + '/gpas/rundial:1.1.1' : params.test_container_rundial
params.test_container_rundial == "" ? params.container_prefix + '/gpas/rundial:1.1.2' : params.test_container_rundial
}
cpus 1

Expand Down Expand Up @@ -29,7 +29,7 @@ process apply_filters {
process make_consensus {
publishDir "${params.publish_dir}", enabled: params.publish_dir != "", mode: "copy", saveAs: { filename -> sample_name + "." + filename }
container {
params.test_container_rundial == "" ? params.container_prefix + '/gpas/rundial:1.1.1' : params.test_container_rundial
params.test_container_rundial == "" ? params.container_prefix + '/gpas/rundial:1.1.2' : params.test_container_rundial
}
cpus 1
memory "4 GB"
Expand Down Expand Up @@ -75,7 +75,7 @@ process make_consensus {
process make_clair3_consensus {
publishDir "${params.publish_dir}", enabled: params.publish_dir != "", mode: "copy", saveAs: { filename -> sample_name + "." + filename }
container {
params.test_container_rundial == "" ? params.container_prefix + '/gpas/rundial:1.1.1' : params.test_container_rundial
params.test_container_rundial == "" ? params.container_prefix + '/gpas/rundial:1.1.2' : params.test_container_rundial
}
cpus 1
memory "3 GB"
Expand Down Expand Up @@ -123,7 +123,7 @@ process make_clair3_consensus {
process reassess_genome_creation {
publishDir "${params.publish_dir}", enabled: params.publish_dir != "", mode: "copy", saveAs: { filename -> sample_name + "." + filename }
container {
params.test_container_rundial == "" ? params.container_prefix + '/gpas/rundial:1.1.1' : params.test_container_rundial
params.test_container_rundial == "" ? params.container_prefix + '/gpas/rundial:1.1.2' : params.test_container_rundial
}
cpus 1

Expand Down
10 changes: 5 additions & 5 deletions process/variant_calling.nf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ params.test_cpus = ""
process minimap2 {
publishDir "${params.publish_dir}", enabled: params.publish_dir != "", mode: "copy", saveAs: { filename -> sample_name + "." + filename }
container {
params.test_container_rundial == "" ? params.container_prefix + '/gpas/rundial:1.1.1' : params.test_container_rundial
params.test_container_rundial == "" ? params.container_prefix + '/gpas/rundial:1.1.2' : params.test_container_rundial
}
cpus {
params.testing == "" ? 4 : params.test_cpus
Expand Down Expand Up @@ -32,7 +32,7 @@ process minimap2 {
process call_snps {
publishDir "${params.publish_dir}", enabled: params.publish_dir != "", mode: "copy", saveAs: { filename -> sample_name + "." + filename }
container {
params.test_container_rundial == "" ? params.container_prefix + '/gpas/rundial:1.1.1' : params.test_container_rundial
params.test_container_rundial == "" ? params.container_prefix + '/gpas/rundial:1.1.2' : params.test_container_rundial
}
cpus {
params.testing == "" ? 4 : params.test_cpus
Expand Down Expand Up @@ -78,7 +78,7 @@ process call_snps {
process call_all {
publishDir "${params.publish_dir}", enabled: params.publish_dir != "", mode: "copy", saveAs: { filename -> sample_name + "." + filename }
container {
params.test_container_rundial == "" ? params.container_prefix + '/gpas/rundial:1.1.1' : params.test_container_rundial
params.test_container_rundial == "" ? params.container_prefix + '/gpas/rundial:1.1.2' : params.test_container_rundial
}
cpus {
params.testing == "" ? 4 : params.test_cpus
Expand Down Expand Up @@ -132,7 +132,7 @@ process call_all {

process get_clair3_model {
container {
params.test_container_rundial == "" ? params.container_prefix + '/gpas/rundial:1.1.1' : params.test_container_rundial
params.test_container_rundial == "" ? params.container_prefix + '/gpas/rundial:1.1.2' : params.test_container_rundial
}

pod label: "name", value: "rundial:get_clair3_model"
Expand All @@ -155,7 +155,7 @@ process get_clair3_model {
process clair3 {
publishDir "${params.publish_dir}", enabled: params.publish_dir != "", mode: "copy", saveAs: { filename -> sample_name + "." + filename }
container {
params.test_container_rundial == "" ? params.container_prefix + '/gpas/rundial:1.1.1' : params.test_container_rundial
params.test_container_rundial == "" ? params.container_prefix + '/gpas/rundial:1.1.2' : params.test_container_rundial
}
cpus {
params.testing == "" ? 4 : params.test_cpus
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "rundial"
version = "1.1.1"
version = "1.1.2"
description = "Reference based assembly of ONT reads."
classifiers = [
"Environment :: Console",
Expand Down Expand Up @@ -37,7 +37,7 @@ version_scheme = "semver"
version_provider = "pep621"

[tool.version_bumper]
active_version = "1.1.1"
active_version = "1.1.2"
version_files = [
"process/variant_calling.nf",
"process/consensus.nf",
Expand Down
18 changes: 13 additions & 5 deletions src/helper_scripts/assess_genome_creation.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,9 +203,14 @@ def get_depths(row) -> tuple[list[int] | None, list[int] | None, list[int], int]
f"Could not find suitable depth fields for row with FORMAT {row['FORMAT']}.\nrow={row}"
)

vcf[["ADF", "ADR", "COV", "HQ_DP"]] = vcf.apply(
get_depths, axis=1, result_type="expand"
)
if vcf.empty:
vcf[["ADF", "ADR", "COV", "HQ_DP"]] = pd.DataFrame(
[[None, None, [0], 0]], index=vcf.index
)
else:
vcf[["ADF", "ADR", "COV", "HQ_DP"]] = vcf.apply(
get_depths, axis=1, result_type="expand"
)
return vcf


Expand Down Expand Up @@ -239,7 +244,10 @@ def is_het(row) -> bool:
return False
return True

vcf["is_het"] = vcf.apply(is_het, axis=1)
if vcf.empty:
vcf["is_het"] = False
else:
vcf["is_het"] = vcf.apply(is_het, axis=1)
return vcf


Expand Down Expand Up @@ -267,7 +275,7 @@ def in_mask(contig, pos, mask_set, ref):

mask_set = set(zip(mask["contig"], mask["position"]))

if mask_set:
if mask_set and not vcf.empty:
vcf["is_masked"] = vcf.apply(
lambda row: in_mask(row["CHROM"], row["POS"], mask_set, row["REF"]), axis=1
)
Expand Down
2 changes: 1 addition & 1 deletion test_data/clair3_consensus/expected.vcf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
##fileformat=VCFv4.2
##rundial_consensus_version=1.1.1
##rundial_consensus_version=1.1.2
##FILTER=<ID=LowQual,Description="Low quality variant">
##FILTER=<ID=RefCall,Description="Reference call">
##FILTER=<ID=PASS,Description="All filters passed">
Expand Down
2 changes: 1 addition & 1 deletion test_data/single_consensus/expected.vcf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
##fileformat=VCFv4.2
##rundial_consensus_version=1.1.1
##rundial_consensus_version=1.1.2
##FILTER=<ID=INVALID_INDEL,Description="Call is indel but has no ALT alleles.">
##FILTER=<ID=LOW_HQ_DEPTH,Description="High quality depth is less than 5">
##FILTER=<ID=LOW_MQ,Description="Mapping Quality. MQ is less than 30">
Expand Down
2 changes: 1 addition & 1 deletion test_data/support_consensus/expected.vcf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
##fileformat=VCFv4.2
##rundial_consensus_version=1.1.1
##rundial_consensus_version=1.1.2
##FILTER=<ID=INVALID_INDEL,Description="Call is indel but has no ALT alleles.">
##FILTER=<ID=LOW_HQ_DEPTH,Description="High quality depth is less than 5">
##FILTER=<ID=LOW_MQ,Description="Mapping Quality. MQ is less than 30">
Expand Down
2 changes: 1 addition & 1 deletion test_data/write_vcf.vcf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
##fileformat=VCFv4.2
##rundial_consensus_version=1.1.1
##rundial_consensus_version=1.1.2
##FILTER=<ID=INVALID_INDEL,Description="Call is indel but has no ALT alleles.">
##FILTER=<ID=LOW_HQ_DEPTH,Description="High quality depth is less than 5">
##FILTER=<ID=LOW_MQ,Description="Mapping Quality. MQ is less than 30">
Expand Down
Loading