-
Notifications
You must be signed in to change notification settings - Fork 736
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
Added subworkflow fasta_gxf_busco_plot #7051
Conversation
I do not think we need to run,
Or am I missing something after taking a break from nf-core/modules? |
I am not sure either. But looks like you cannot run |
Yes, there was an issue in the GitHub workflow action, I don't know if it has been fixed yet |
cfb6e32
to
5265979
Compare
Thank you. Yes, it seems to have been fixed. |
I have applied your suggestions, fixed linting and updated the snapshots. I have also added you to the maintainers list. I hope you won't mind. Thank you! |
Should we be following https://nf-co.re/docs/guidelines/components/modules#configuration-of-extargs-in-tests in subworkflows too? |
Awesome. Looks to me like everything is correct. Thank you @GallVp! |
Can you apply this guideline too to the subworkflow as well please? |
FYI, we're formalizing the use of |
Thank you @mahesh-panchal |
It's not necessary, but we do like uniformity. There's an issue to implement linting for this in tools. It'll make it easier to extend tests in future too ( perhaps Seqera AI could generate more comprehensive test coverage in future), and it means the args are transparent in the test file. |
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.
My only real quibble is the use of inject null
. The others are suggestions if you like them better.
ch_versions = Channel.empty() | ||
ch_db_path = val_busco_lineages_path | ||
? Channel.of(file(val_busco_lineages_path, checkIfExists: true)) | ||
: Channel.of(null) |
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.
This is strange. We should never put null
into a channel.
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.
Changed to Channel.of ( [ [] ] )
ch_busco_assembly_inputs.map { meta, fasta, mode, lineage, db, config -> db ?: [] }, | ||
ch_busco_assembly_inputs.map { meta, fasta, mode, lineage, db, config -> config ?: [] } |
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.
If you swap the null
s above for empty lists (empty lists of lists though perhaps), you don't need these conditionals here.
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.
Removed the ?:
business. Good idea!
// MODULE: BUSCO_GENERATEPLOT as PLOT_ASSEMBLY | ||
ch_assembly_plot_summary = ch_assembly_short_summaries_txt | ||
| map { meta, txt -> | ||
def lineage_name = meta.lineage.split('_odb')[0] |
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.
def lineage_name = meta.lineage.split('_odb')[0] | |
def lineage_name = meta.lineage - '_odb' |
I think this also works.
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.
Applied this in a single commit.
ch_versions = ch_versions.mix(PLOT_ASSEMBLY.out.versions) | ||
|
||
// MODULE: GFFREAD as EXTRACT_PROTEINS | ||
ch_gffread_inputs = ! ( val_mode == 'geno' || val_mode == 'genome' ) |
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.
ch_gffread_inputs = ! ( val_mode == 'geno' || val_mode == 'genome' ) | |
ch_gffread_inputs = ! ( val_mode in [ 'geno', 'genome' ] ) |
!in should also work, but I think the language server complains ( or it did the last time I used it ).
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.
Switched to val_mode !in [ 'geno', 'genome' ]
and the server did not complain.
Co-authored-by: Fernando Duarte <[email protected]>
Co-authored-by: Fernando Duarte <[email protected]>
Co-authored-by: Fernando Duarte <[email protected]>
Co-authored-by: Fernando Duarte <[email protected]>
Good idea. I have applied this now. |
5265979
to
9f1764f
Compare
Hi @mahesh-panchal , @FernandoDuarteF Thank you for approving the swf. I have applied your suggestions. Can you kindly quickly skim through the code once more to make sure everything is as expect. |
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 all good to me. |
* Added subworkflow fasta_gxf_busco_plot * Update subworkflows/nf-core/fasta_gxf_busco_plot/main.nf Co-authored-by: Fernando Duarte <[email protected]> * Update subworkflows/nf-core/fasta_gxf_busco_plot/main.nf Co-authored-by: Fernando Duarte <[email protected]> * Update subworkflows/nf-core/fasta_gxf_busco_plot/main.nf Co-authored-by: Fernando Duarte <[email protected]> * Update subworkflows/nf-core/fasta_gxf_busco_plot/main.nf Co-authored-by: Fernando Duarte <[email protected]> * Fixed linting and updated snapshot * Applied suggestions --------- Co-authored-by: Fernando Duarte <[email protected]>
PR checklist
Closes #5584
FASTA_GXF_BUSCO_PLOT
sub workflow genomeqc#77 (comment)versions.yml
file.label
nf-core modules test <MODULE> --profile docker
nf-core modules test <MODULE> --profile singularity
nf-core modules test <MODULE> --profile conda
nf-core subworkflows test <SUBWORKFLOW> --profile docker
nf-core subworkflows test <SUBWORKFLOW> --profile singularity
nf-core subworkflows test <SUBWORKFLOW> --profile conda