Skip to content

Commit

Permalink
qc: Removed job id as input parameter #TASK-6766
Browse files Browse the repository at this point in the history
  • Loading branch information
dapregi committed Sep 9, 2024
1 parent 235a24f commit e427997
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 14 deletions.
4 changes: 1 addition & 3 deletions opencga-app/app/analysis/qc/family_qc/family_qc.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
LOGGER = logging.getLogger('variant_qc_logger')

class FamilyQCExecutor:
def __init__(self, vcf_file, info_file, bam_file, config, output_parent_dir, job_id, sample_ids, id_):
def __init__(self, vcf_file, info_file, bam_file, config, output_parent_dir, sample_ids, id_):
"""Create output dir
:param str vcf_file: VCF input file path
Expand All @@ -21,15 +21,13 @@ def __init__(self, vcf_file, info_file, bam_file, config, output_parent_dir, job
:param str config: Configuration file path
:param str output_parent_dir: Output directory path for the id_ (e.g. /path/to/outdir/id1)
:param list sample_ids: Sample IDs from the VCF file
:param str job_id: ID from the executed job
:param str id_: ID from the info JSON file
"""
self.vcf_file = vcf_file
self.info_file = info_file
self.bam_file = bam_file
self.config = config
self.output_parent_dir = output_parent_dir
self.job_id = job_id
self.sample_ids = sample_ids
self.id_ = id_

Expand Down
4 changes: 1 addition & 3 deletions opencga-app/app/analysis/qc/individual_qc/individual_qc.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
LOGGER = logging.getLogger('variant_qc_logger')

class IndividualQCExecutor:
def __init__(self, vcf_file, info_file, bam_file, config, output_parent_dir, job_id, sample_ids, id_):
def __init__(self, vcf_file, info_file, bam_file, config, output_parent_dir, sample_ids, id_):
"""Create output dir
:param str vcf_file: VCF input file path
Expand All @@ -20,15 +20,13 @@ def __init__(self, vcf_file, info_file, bam_file, config, output_parent_dir, job
:param str config: Configuration file path
:param str output_parent_dir: Output directory path for the id_ (e.g. /path/to/outdir/id1)
:param list sample_ids: Sample IDs from the VCF file
:param str job_id: ID from the executed job
:param str id_: ID from the info JSON file
"""
self.vcf_file = vcf_file
self.info_file = info_file
self.bam_file = bam_file
self.config = config
self.output_parent_dir = output_parent_dir
self.job_id = job_id
self.sample_ids = sample_ids
self.id_ = id_

Expand Down
5 changes: 1 addition & 4 deletions opencga-app/app/analysis/qc/sample_qc/sample_qc.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,13 @@ def __init__(self, vcf_file, info_file, bam_file, config, output_parent_dir, job
:param str config: Configuration file path
:param str output_parent_dir: Output directory path for the id_ (e.g. /path/to/outdir/id1)
:param list sample_ids: Sample IDs from the VCF file
:param str job_id: ID from the executed job
:param str id_: ID from the info JSON file
"""
self.vcf_file = vcf_file
self.info_file = info_file
self.bam_file = bam_file
self.config = config
self.output_parent_dir = output_parent_dir
self.job_id = job_id
self.sample_ids = sample_ids
self.id_ = id_

Expand Down Expand Up @@ -81,9 +79,8 @@ def bcftools_stats(self, vcf_file):
bam_file = ""
config = ""
output_parent_dir = "/tmp/qc_tests/"
job_id = ""
sample_ids = []
id_ = ""
se = SampleQCExecutor(vcf_file=vcf_file, info_file=info_file, bam_file=bam_file, config=config,
output_parent_dir=output_parent_dir, job_id=job_id, sample_ids=sample_ids, id_=id_)
output_parent_dir=output_parent_dir, sample_ids=sample_ids, id_=id_)
sys.exit(se.run())
4 changes: 0 additions & 4 deletions opencga-app/app/analysis/qc/variant_qc.main.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ def get_parser():
help='configuration file path')
parser.add_argument('-o', '--output-dir', dest='output_dir',
help='output directory path')
parser.add_argument('--job-id', dest='job_id',
help='job ID')

parser.add_argument('-l', '--log-level', dest='log_level',
default='INFO', choices=['DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL'],
Expand Down Expand Up @@ -196,7 +194,6 @@ def main():
qc_type = args.qc_type
config = args.config
output_dir = os.path.realpath(os.path.expanduser(args.output_dir))
job_id = args.job_id

# Setting up logger
logger = create_logger(args.log_level, output_dir)
Expand Down Expand Up @@ -228,7 +225,6 @@ def main():
bam_file=bam_files[i],
config=config,
output_parent_dir=qc_outdir_fpath,
job_id=job_id,
sample_ids=sample_ids,
id_=id_
).run()
Expand Down

0 comments on commit e427997

Please sign in to comment.