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

v1.5.0 - find summary .txt file id #28

Merged
merged 5 commits into from
Jun 28, 2024
Merged
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
14 changes: 11 additions & 3 deletions src/eggd_artemis.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ def find_snv_files(reports):
{
'SNV variant report': 'file-ZX',
'Coverage report': {'$dnanexus_link': 'file-GH'},
'Summary text file': 'file-NM',
'SNV count': 1
}
],
Expand All @@ -50,6 +51,7 @@ def find_snv_files(reports):
{
'SNV variant report': 'file-GH',
'Coverage report': {'$dnanexus_link': 'file-GH'},
'Summary text file': 'file-JK',
'SNV count': 3
}
]
Expand Down Expand Up @@ -98,8 +100,13 @@ def _find(report):
except KeyError:
coverage_report = parent_details["output"]["stage-Fyq5z18433GfYZbp3vX1KqjB.report"]

summary_text = parent_details.get("output", {}).get("stage-rpt_athena.summary_text", {}).get("$dnanexus_link")
if not summary_text:
print(f"No summary .txt file found in output of eggd_athena stage"
f" for SNV reports workflow ({parent_details})")

# Extract the sention job id from the vcf metadata
sention_job_id=dxpy.describe(vcf_file)["createdBy"]["job"]
sention_job_id = dxpy.describe(vcf_file)["createdBy"]["job"]
sentieon_details = dxpy.bindings.dxjob.DXJob(dxid=sention_job_id).describe()

# Get bam & bai job id from sention job metadata
Expand All @@ -117,6 +124,7 @@ def _find(report):
{
"SNV variant report": report['describe']['id'],
"Coverage report": coverage_report,
"Summary text file": summary_text,
"SNV count": str(snv_variant_count)
}
]
Expand Down Expand Up @@ -411,10 +419,10 @@ def get_multiqc_report(path_to_reports, project):
multiqc_file (str): file id of the multiqc file
"""
# Get path to single from reports path
single=f"/output/{path_to_reports.split('/')[2]}"
single = f"/output/{path_to_reports.split('/')[2]}"

# Find MultiQC jobs in the project
multiqc_reports=list(dxpy.bindings.search.find_jobs(
multiqc_reports = list(dxpy.bindings.search.find_jobs(
name_mode='glob',
name="*MultiQC*",
state="done",
Expand Down