The current script filter_variants.sh needs to be extended to allow filtering for all genes. The easiest solution is to run snpEff -Xmx8g genes2bed $reference with an empty gene name. We should implement a new option to allow gene_name to be set to "all" and then handle it by setting $gene_name to an empty value. All relevant checks and processes should be adapted accordingly.
Proposed Changes
Allow "all" as a gene_name value:
Modify the script to recognize "all" as a special value for the gene_name parameter.
When "all" is specified, set $gene_name to an empty string.
Adapt genes2bed command:
Ensure the genes2bed command is executed with an empty gene name if "all" is specified, which results in creating a BED file for all genes.
Update checks and processes:
Modify all checks and processes to handle the scenario where gene_name is "all".
Ensure the script can handle the filtering and processing of variants for all genes without any issues.
Tasks
[x] Modify filter_variants.sh to allow "all" as a value for gene_name.
[x] Adapt the genes2bed command to handle an empty gene name.
[x] Update all relevant checks and processes in the script to handle filtering for all genes.
[ ] Test the script thoroughly to ensure it works correctly with the "all" option.
Benefits
This enhancement will enable users to filter variants across all genes easily.
It simplifies the process of obtaining a comprehensive set of variants for analysis without specifying individual genes.
Additional Notes
Ensure backward compatibility with the current usage of specifying individual genes.
Update the documentation and usage instructions to reflect the new feature.
Description
The current script
filter_variants.sh
needs to be extended to allow filtering for all genes. The easiest solution is to runsnpEff -Xmx8g genes2bed $reference
with an empty gene name. We should implement a new option to allowgene_name
to be set to"all"
and then handle it by setting$gene_name
to an empty value. All relevant checks and processes should be adapted accordingly.Proposed Changes
Allow "all" as a gene_name value:
"all"
as a special value for thegene_name
parameter."all"
is specified, set$gene_name
to an empty string.Adapt
genes2bed
command:genes2bed
command is executed with an empty gene name if"all"
is specified, which results in creating a BED file for all genes.Update checks and processes:
gene_name
is"all"
.Tasks
filter_variants.sh
to allow"all"
as a value forgene_name
.genes2bed
command to handle an empty gene name."all"
option.Benefits
Additional Notes