-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add XY filtration workflow #191
base: main
Are you sure you want to change the base?
Conversation
…122-GIABGermlineVariant
@Faizal-Eeman Would it be possible to add a line to the outputed VCF header documenting the XY filtration, similar to how bcftools appends every operation to the header? It would be a good way to maintain a record of what has been done to the file. |
I skimmed through the output file and everything looks as expected: PARs remain diploid in both X and Y, non-PARs are haploid in X and Y. Missing genotypes are always in diploid notation: |
@alkaZeltser for now I'm appending the script command like GATK does to VCF header
As to the steps in the workflow, I've added a document to |
The same sample was treated as an
By the time this test finished, I updated the python script to name the output file based on the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Anything else to add from @alkaZeltser ?
@@ -115,6 +118,8 @@ For normal-only or tumor-only samples, exclude the fields for the other state. | |||
|:----------------|:---------|:-----|:------------| | |||
| `dataset_id` | Yes | string | Dataset ID | | |||
| `blcds_registered_dataset` | Yes | boolean | Set to true when using BLCDS folder structure; use false for now | | |||
| `genome_build` | Yes | string | Genome build, GRCh37 or GRCh38 | | |||
| `sample_sex` | Yes | string | Sample Sex, XY or XX | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question (non-blocking):
@Faizal-Eeman @yashpatel6 We might've touched on this before but have we tried to adjust ploidy for male X Y chromosomes when running HC even before this filtering?
--sample-ploidy 2 \ |
| `<Hail>_<GATK>_<dataset_id>_<patient_id>_<sample_sex>_filtered.vcf.bgz` | chrX/Y filtered SNP and INDEL recalibrated variants | | ||
| `<Hail>_<GATK>_<dataset_id>_<patient_id>_<sample_sex>_filtered.vcf.bgz.sha512` | chrX/Y filtered SNP and INDEL recalibrated variants checksum | | ||
| `<Hail>_<GATK>_<dataset_id>_<patient_id>_<sample_sex>_filtered.vcf.bgz.tbi` | chrX/Y filtered SNP and INDEL recalibrated variants index | | ||
| `<Hail>_<GATK>_<dataset_id>_<patient_id>_<sample_sex>_filtered.vcf.bgz.tbi.sha512` | chrX/Y filtered SNP and INDEL recalibrated variants index checksum | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion:
I recommend removing _filtered
from the name. Many of our VCF outputs undergo some form of filtering, so the term might not add significant value here. Have we decided whether these outputs will be the final outputs or supplementary final outputs?
### 9. Adjust chrX and chrY genotypes based on sample sex from recalibrated VCF | ||
Apply XY filtration workflow to recalibrated VCF as discribed [here](docs/xy_filtration_workflow.md). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question:
How does this process work with mouse samples (or other species)? Is this process optional?
@Faizal-Eeman hmm I am still confused. I looked at |
@alkaZeltser Just compared the chrY calls in the XX output and they are all PAR variants. Based on the XY filtration workflow, we only remove non-PAR chrY calls. |
@Faizal-Eeman Ok but if the individual is truly XX, that means any reads that map to chrY regions, even PAR, are incorrectly mapped right? They're being drawn away from chrX? And how do you interpret a PAR genotype in an XX individual that has chrY calls? Doesn't that technically result in a triploid XXY dosage? |
Description
ADD XY filter workflow
Closes #190
Testing Results
N-T paired WGS (
sample_sex = XY
)N-T paired WGS (
sample_sex = XX
)Checklist
I have read the code review guidelines and the code review best practice on GitHub check-list.
I have reviewed the Nextflow pipeline standards.
The name of the branch is meaningful and well formatted following the standards, using [AD_username (or 5 letters of AD if AD is too long)]-[brief_description_of_branch].
I have set up or verified the branch protection rule following the github standards before opening this pull request.
I have added my name to the contributors listings in the
manifest
block in thenextflow.config
as part of this pull request, am listedalready, or do not wish to be listed. (This acknowledgement is optional.)
I have added the changes included in this pull request to the
CHANGELOG.md
under the next release version or unreleased, and updated the date.I have updated the version number in the
metadata.yaml
andmanifest
block of thenextflow.config
file following semver, or the version number has already been updated. (Leave it unchecked if you are unsure about new version number and discuss it with the infrastructure team in this PR.)I have tested the pipeline on at least one A-mini sample.