Skip to content

Commit

Permalink
Merge branch 'TASK-6766' of https://github.com/opencb/opencga into TA…
Browse files Browse the repository at this point in the history
…SK-6766
  • Loading branch information
jtarraga committed Sep 20, 2024
2 parents 63baa43 + 3fd69a8 commit 7e8e87c
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions opencga-app/app/analysis/qc/variant_qc.main.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,20 +103,20 @@ def check_input(vcf_fpath, info_fpath, qc_type):
# Getting IDs and sample IDs from info JSON file
info_ids = []
info_sample_ids = []
for record in info_json:
# Getting all IDs in info file
info_ids.append(record['id'])
# Family
if qc_type == 'family' and 'members' in record:
info_sample_ids = [sample['id']
for member in record['members'] if 'samples' in member
for sample in member['samples'] if 'id' in sample]
# Individual
elif qc_type == 'individual' and 'samples' in record:
info_sample_ids = [sample['id'] for sample in record['samples'] if 'id' in sample]
# Sample
elif qc_type == 'sample' and 'id' in record:
info_sample_ids.append(record['id'])
record = info_json
# Getting all IDs in info file
info_ids.append(record['id'])
# Family
if qc_type == 'family' and 'members' in record:
info_sample_ids = [sample['id']
for member in record['members'] if 'samples' in member
for sample in member['samples'] if 'id' in sample]
# Individual
elif qc_type == 'individual' and 'samples' in record:
info_sample_ids = [sample['id'] for sample in record['samples'] if 'id' in sample]
# Sample
elif qc_type == 'sample' and 'id' in record:
info_sample_ids.append(record['id'])
info_sample_ids.sort()

# Checking whether input file and info file have the same samples
Expand Down

0 comments on commit 7e8e87c

Please sign in to comment.