Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When checking the accessioning QC we do not need to count star * allele #229

Merged
merged 6 commits into from
Nov 14, 2024
Merged
Changes from 4 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
13 changes: 8 additions & 5 deletions eva_submission/nextflow/accession_and_load.nf
Original file line number Diff line number Diff line change
Expand Up @@ -236,14 +236,17 @@ process accession_vcf {


"""
(java -Xmx${task.memory.toGiga()-1}G -jar $params.jar.accession_pipeline --spring.config.location=file:$params.accession_job_props $pipeline_parameters) || \
(java -Xmx${task.memory.toGiga()-1}G -jar $params.jar.accession_pipeline --spring.config.location=file:$params.accession_job_props $pipeline_parameters) || true
apriltuesday marked this conversation as resolved.
Show resolved Hide resolved
# If accessioning fails due to missing variants, but the only missing variants are structural variants,
# then we should treat this as a success from the perspective of the automation.
# TODO revert once accessioning pipeline properly registers structural variants
# First grep finds the "Structural variant" reported by the accessioning process, remove the duplicates and count
# Second grep count the reported number of missing variants in the Accessioning report
[[ \$(grep 'Skipped processing structural variant' ${params.logs_dir}/${log_filename}.log | cut -d ' ' -f 10- | sort -u| wc -l) \
== \$(grep -oP '\\d+(?= unaccessioned variants need to be checked)' ${params.logs_dir}/${log_filename}.log) ]]
# First grep finds the "Structural variant" reported by the accessioning process, remove the duplicates, remove the * alleles and count
SV_IN_ACCESSION=\$(grep 'Skipped processing structural variant' ${params.logs_dir}/${log_filename}.log | grep -v "alternate='*'" | cut -d ' ' -f 10- | sort -u | wc -l)
# Second grep count the number of missing variants in the Accessioning report after removing the * alleles
SV_IN_QC_REPORT=\$(grep ' variants that were not found in the accession report' ${params.logs_dir}/${log_filename}.log | sed 's/, AbstractVariant/\\n AbstractVariant/g' | grep -v "alternate='*'" | wc -l)
echo "SV_IN_ACCESSION \$SV_IN_ACCESSION"
echo "SV_IN_QC_REPORT \$SV_IN_QC_REPORT"
[[ \$SV_IN_ACCESSION == \$SV_IN_QC_REPORT ]]
tcezard marked this conversation as resolved.
Show resolved Hide resolved
echo "done" > ${accessioned_filename}.tmp
"""
}
Expand Down
Loading