working commit of the fmx-assign-to-gt functionality#44
working commit of the fmx-assign-to-gt functionality#44
Conversation
|
@amadeovezz -- can you check that these additions to the pre_qc file follow conventions you have set up for channels? would love feedback on this. |
| .map{it -> [it[0], it[6], it[2], it[3], it[4], it[5]]} // [lib, num_of_samples, plp_files]] (excluding .tsv) | ||
| FREEMUXLET_POOL(ch_multi_lib_transformed) | ||
|
|
||
| if (params.settings.fmx_assign_to_gt){ |
There was a problem hiding this comment.
As intuitive as it may be to add this logic under the freemuxlet conditionals, I think conceptually and for readability it is better to put this after the de-multiplexing stage. That way we can leave the intention of block entirely for de-multiplexing and the outputs of de-multiplexing flow into the FMX_ASSIGN_TO_GT process. How do you feel about adding it on line 263 (after de-multiplexing). Something like:
if (params.settings.demux_method == "freemuxlet" && params.settings.fmx_assign_to_gt) {
if (params.settings.merge) {
FMX_ASSIGN_TO_GT(
Channel.from(get_pool_vcf())
.join(FREEMUXLET_POOL.out.vcf) // [pool, ref_vcf, fmx_vcf]
);
}
ch_gt_input = Channel.from(get_pool_vcf()) // [pool, vcf]
.combine(
Channel.from(get_library_by_pool()).map { it -> [it[1], it[0]] },
by: 0
) // [pool, vcf, lib]
.map { it -> [it[2], it[1]] } // [lib, vcf]
.join(FREEMUXLET_LIBRARY.out.vcf); // [lib, ref_vcf, fmx_vcf]
// TODO: add checks that the reference file exists
FMX_ASSIGN_TO_GT_LIBRARY(ch_gt_input);
}
This also de-duplicates some of the repeated code for the single library processing
There was a problem hiding this comment.
Ooo good call. I'll move it around, thanks!
…nes into ef/fmx_assign_to_gt Pulling demuxlet and additional fixes
…nes into ef/fmx_assign_to_gt
| } | ||
|
|
||
| // TODO: unify the two processes | ||
| process SEPARATE_FMX_PRE { |
There was a problem hiding this comment.
I'm happy you unified these processes!
I remember now why I duplicated it as a short term solution. There are other pipelines that reference SEPARATE_FMX and I wanted to make sure I didnt break them by being explicit about the input:
tuple val(library), path(vcf_file), path(sample_file), path(lmix_file)
Might be worth running those pipelines to be sure?
|
@erflynn granted my hotfix testing PR works (and the subsequently merged in). Do you want to try and adding a test cases for this? Seems like a good candidate. |
|
|
||
| ch_sample_map = FREEMUXLET_LIBRARY.out.sample_map | ||
| } | ||
| ch_lib_vcf = FREEMUXLET_LIBRARY.out.vcf |
There was a problem hiding this comment.
so I think you can take this line and lines 180-186 and move them to the conditional below.
There was a problem hiding this comment.
the channels FREEMUXLET_LIBRARY.out.vcf and SEPARATE_FMX will continue to exist. And that way we encapsulate everything into the conditional
There was a problem hiding this comment.
thanks! just updated
ya i was actually looking at the channel logic, i think we can refactor it to make it simpler. |
…nes into ef/fmx_assign_to_gt
Addresses #23
Adds optional function to run gtcheck to compare reference vcf and freemuxlet output.