Module/igv/1.0 - #303
Conversation
| igv: | ||
|
|
||
| inputs: | ||
| # Available wildcards: {unix_group} {seq_type} {tumour_sample_id} {normal_sample_id} {pair_status} {genome_build} |
There was a problem hiding this comment.
Is it okay to have {unix_group} as a wildcard?
There was a problem hiding this comment.
It is not a standard column in the lcr-modules schema and is something specific to gambl. There are ways to deal with this - can show some examples and we can talk about this more before lab meeting today 😄
Kdreval
left a comment
There was a problem hiding this comment.
Thanks!!
I am mostly wondering if we can reuse existing conda envs and scripts to have more standard approach and decrease the maintenance burden 😄
This looks great, long way since the early version! 🚀
| maf: "__UPDATE__" | ||
|
|
||
| regions: | ||
| # Provide regions files as lists in their respective genome builds so that liftover of coordinates occurs properly |
There was a problem hiding this comment.
What happens if nothing is specified here? Can we add the "__UPDATE__" to anything that has to be filled in?
There was a problem hiding this comment.
I added an "__UPDATE__" string and specified that at least one regions file must be provided
| maf: | ||
| grch37: [] | ||
| hg38: [] | ||
| mutation_id: |
There was a problem hiding this comment.
Can we add here the example formatting of what is expected in that file? Does it have to have a header and expects certain column names?
There was a problem hiding this comment.
Done ! I added what column and format is required for mutation_id file format
| options: | ||
| genome_map: | ||
| # Map metadata builds to grch37 and hg38 so that MAF file locations are determined correctly | ||
| grch37: ["__UPDATE__"] # e.g ["grch37","hg19","hs37d5"] |
There was a problem hiding this comment.
you sort of know this upfront, so maybe it is better to fill in these keys and then the comment will be that you can add other genome builds to this list?
|
|
||
| liftover_regions: | ||
| reference_chain_file: | ||
| grch37: "genomes/grch37/chains/grch37/hg19ToHg38.over.chain" |
There was a problem hiding this comment.
I think this is generated with the reference files so you can directly request the reference files output instead of having this listed here. This can be an example:
lcr-modules/modules/liftover/2.0/liftover.smk
Lines 108 to 130 in 7b495a3
| run_unpaired_tumours_with: "unmatched_normal" | ||
| run_paired_tumours_as_unpaired: False | ||
|
|
||
| slms_3: |
There was a problem hiding this comment.
can you instead just include config from slms-3?
I think this will conflict if you have snakefile that will attempt to run both slms-3 and this module because snakemake won't like duplicated config values - or will just use whatever is imported last so may have unexpected consequence in that scenario
There was a problem hiding this comment.
Yes good idea, I removed this part from the config
| bam = CFG["dirs"]["inputs"] + "bams/{seq_type}/{sample_id}.bam", | ||
| bai = CFG["dirs"]["inputs"] + "bams/{seq_type}/{sample_id}.bam.bai" | ||
| run: | ||
| op.absolute_symlink(input.bam, output.bam) |
There was a problem hiding this comment.
Curious if this needs crai index whe the bam is a cram 😃
| input: | ||
| maf = get_maf | ||
| output: | ||
| maf = CFG["dirs"]["inputs"] + "maf/{seq_type}--{genome_build}/{tumour_id}--{normal_sample_id}--{pair_status}.maf" |
There was a problem hiding this comment.
I think this might be missing the sample in the tumour_id wildcard?
Here is the part from config:
# Available wildcards: {unix_group} {seq_type} {tumour_sample_id} {normal_sample_id} {pair_status} {genome_build}
| script: | ||
| config["lcr-modules"]["igv"]["scripts"]["format_regions"] | ||
|
|
||
| REGIONS_FORMAT = { |
There was a problem hiding this comment.
Why do we need a dictionary if everything is mapped to the same key bed? Maybe we can just refer to bed regardless of what is the region format?
There was a problem hiding this comment.
You're right- I removed it
| script: | ||
| config["lcr-modules"]["igv"]["scripts"]["filter_script"] | ||
|
|
||
| def _get_maf(wildcards): |
There was a problem hiding this comment.
Curious why this does not conflict with the function defined above?
def get_maf(wildcards):
unix_group = config["unix_group"]
return expand(config["lcr-modules"]["igv"]["inputs"]["maf"], allow_missing=True, unix_group=unix_group)
Just because it is defined later the further call will use the "latest" definition?
There was a problem hiding this comment.
I removed the earlier function because I do not need it to fill in unix_group value (this can be done from the snakefile that is used to launch the run), so not an issue anymore
|
|
||
| rule _igv_download_igv: | ||
| output: | ||
| igv_zip = CFG["dirs"]["igv"] + "IGV_2.7.2.zip", |
There was a problem hiding this comment.
What if someone doesn't run this on linux or wants to have a different version? Maybe this part should be configurable or better even use the conda instead of downloading the source file?
https://anaconda.org/bioconda/igv
|
I have addressed most of the comments above, but I need to further investigate regarding:
plus i have made added some more changes since, so I will ask for an updated review once I'm finished |
…d symlink resources to minimize how many symlink jobs happen at once
…ow fails mid run/mid quality control, it will recreate the failed summary file with updated LAUNCH_DATE (if workflow run on different day) and this causes ALL quality control jobs to run again ;_;
Pull Request Checklists
Important: When opening a pull request, keep only the applicable checklist and delete all other sections.
Checklist for New Module
Required
I used the cookiecutter template and updated the placeholder rules.
The snakemake rules follow the design guidelines.
rulesobject (e.g. for input files) are wrapped withstr().Every rule in the module is either listed under
localrulesor has thethreadsandresourcesdirectives.Input and output files are being symlinked into the
CFG["inputs"]andCFG["outputs"]subdirectories, respectively.I grouped the input symlinking rule to the next job that uses the input files.
I updated the final target rule (
*_all) to include every output rule.I explained important module design decisions in
CHANGELOG.md.I tested the module on real data for all supported
seq_typevalues.I updated the
default.yamlconfiguration file to provide default values for each rule in the module snakefile.I did not set any global wildcard constraints. Any/all wildcard constraints are set on a per-rule basis.
I ensured that all symbolic links are relative and self-contained (i.e. do not point outside of the repository).
I replaced every value that should (or might need to) be updated in the default configuration file with
__UPDATE__.I recursively searched for all comments containing
TODOto ensure none were left. For example:If applicable
I added more granular output subdirectories.
I added rules to the
reference_filesworkflow to generate any new reference files.I added subdirectories with large intermediate files to the list of
scratch_subdirectoriesin thedefault.yamlconfiguration file.I updated the list of available wildcards for the input files in the
default.yamlconfiguration file.Checklist for Updated Module
Important! If you are updating the module version, ensure the previous version of the module is restored from master.
If you want to restore a deleted file or directory from the remote master, you can use
git checkout origin/master path/to/file,then a
git commitwill ensure that file is tracked on your branch again.Example: