Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Q
QuaC
Manage
Activity
Members
Labels
Plan
Issues
15
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
center-for-computational-genomics-and-data-science
public
QuaC
Commits
31b4255b
Commit
31b4255b
authored
3 years ago
by
Manavalan Gajapathy
Browse files
Options
Downloads
Patches
Plain Diff
removes unneeded code after refactoring
parent
98d73758
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!2
QC under one umbrella (well mostly) under QuaC
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/qc_checkup/modules/qualimap.py
+0
-50
0 additions, 50 deletions
src/qc_checkup/modules/qualimap.py
src/qc_checkup/modules/verifybamid.py
+0
-49
0 additions, 49 deletions
src/qc_checkup/modules/verifybamid.py
with
0 additions
and
99 deletions
src/qc_checkup/modules/qualimap.py
+
0
−
50
View file @
31b4255b
...
...
@@ -11,56 +11,6 @@ from common import present_within_range, qc_logger, write_to_yaml_file
LOGGER
=
qc_logger
(
__name__
)
# def overall_stats(multiqc_df, sample_name, qualimap_config, outfile):
# """
# Reads overall qualimap QC summary for a particular sample using multiqc's general stats data
# and summarizes the result.
# """
# LOGGER.info(
# f"Analyzing overall qualimap results for sample '{sample_name}' using multiqc general stats data"
# )
# if sample_name not in multiqc_df.index:
# LOGGER.exception(
# f"Sample '{sample_name}' not present in multiqc's general stats data. Exiting now"
# )
# raise SystemExit(1)
# qualimap_prefix = "QualiMap_mqc-generalstats-qualimap"
# if pd.isnull(multiqc_df.loc[sample_name, f"{qualimap_prefix}-avg_gc"]):
# LOGGER.exception(
# f"Qualimap data not available for '{sample_name}' in multiqc's general stats data. Exiting now"
# )
# raise SystemExit(1)
# results_dict = {sample_name: {}}
# pass_fail = set()
# for qc_metric in qualimap_config:
# if qc_metric == "mean_cov:median_cov":
# mean_cov = multiqc_df.loc[sample_name, f"{qualimap_prefix}-mean_coverage"]
# median_cov = multiqc_df.loc[sample_name, f"{qualimap_prefix}-median_coverage"]
# value = (mean_cov / median_cov).round(3)
# else:
# value = multiqc_df.loc[sample_name, f"{qualimap_prefix}-{qc_metric}"]
# minimum = qualimap_config[qc_metric]["min"]
# maximum = qualimap_config[qc_metric]["max"]
# result = present_within_range(value, minimum, maximum)
# results_dict[sample_name][f"{qc_metric}_val"] = float(value)
# results_dict[sample_name][qc_metric] = "pass" if result else "fail"
# pass_fail.add(result)
# # write results to file
# write_to_yaml_file(results_dict, outfile)
# # summarize results to one term
# qc_check_status = "pass" if all(pass_fail) else "fail"
# return qc_check_status
def
stat_by_chromosome
(
qualimap_f
,
sample_name
,
qualimap_config
,
outfile
):
"""
Analyzes chromosome-level coverage QC using qualimap report file
...
...
This diff is collapsed.
Click to expand it.
src/qc_checkup/modules/verifybamid.py
deleted
100644 → 0
+
0
−
49
View file @
98d73758
"""
Read overall verifyBamID QC summary for a particular sample using multiqc
'
s general stats data
and summarize the result.
"""
import
pandas
as
pd
from
common
import
present_within_range
,
qc_logger
,
write_to_yaml_file
# setup logging
LOGGER
=
qc_logger
(
__name__
)
def
verifybamid
(
multiqc_df
,
sample_name
,
verifybamid_config
,
outfile
):
"""
Reads overall verifyBamID QC summary for a particular sample using multiqc
'
s general stats data
and summarizes the result.
"""
LOGGER
.
info
(
f
"
Analyzing overall verifyBamID results for sample
'
{
sample_name
}
'
using multiqc general stats data
"
)
if
sample_name
not
in
multiqc_df
.
index
:
LOGGER
.
exception
(
f
"
Sample
'
{
sample_name
}
'
not present in multiqc
'
s general stats data. Exiting now
"
)
raise
SystemExit
(
1
)
verifybamid_prefix
=
"
VerifyBAMID_mqc-generalstats-verifybamid
"
results_dict
=
{
sample_name
:
{}}
pass_fail
=
set
()
for
qc_metric
in
verifybamid_config
:
value
=
multiqc_df
.
loc
[
sample_name
,
f
"
{
verifybamid_prefix
}
-
{
qc_metric
}
"
]
minimum
=
verifybamid_config
[
qc_metric
][
"
min
"
]
maximum
=
verifybamid_config
[
qc_metric
][
"
max
"
]
result
=
present_within_range
(
value
,
minimum
,
maximum
)
results_dict
[
sample_name
][
f
"
{
qc_metric
}
_val
"
]
=
float
(
value
)
results_dict
[
sample_name
][
qc_metric
]
=
"
pass
"
if
result
else
"
fail
"
pass_fail
.
add
(
result
)
# write results to file
write_to_yaml_file
(
results_dict
,
outfile
)
# summarize results to one term
qc_check_status
=
"
pass
"
if
all
(
pass_fail
)
else
"
fail
"
return
qc_check_status
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment