Skip to content
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

blastn subworkflow #31

Closed
wants to merge 19 commits into from
Closed

blastn subworkflow #31

wants to merge 19 commits into from

Conversation

alxndrdiaz
Copy link
Collaborator

@alxndrdiaz alxndrdiaz commented Sep 9, 2022

PR checklist

  • This comment contains a description of changes (with reason).
  • If you've fixed a bug or added code that should be tested, add tests!
    • If you've added a new tool - have you followed the pipeline conventions in the contribution docs
    • If necessary, also make a PR on the nf-core/blobtoolkit branch on the nf-core/test-datasets repository.
  • Make sure your code lints (nf-core lint).
  • Ensure the test suite passes (nextflow run . -profile test,docker --outdir <OUTDIR>).
  • Usage Documentation in docs/usage.md is updated.
  • Output Documentation in docs/output.md is updated.
  • CHANGELOG.md is updated.
  • README.md is updated (including new tool citations and authors/contributors).

This PR is part of the Google Summer of Code 2022 project: Conversion of the BlobToolKit pipeline to Nextflow, GitHub repository: https://github.com/sanger-tol/blobtoolkit

@alxndrdiaz alxndrdiaz added the enhancement Improvement of the existing features label Sep 9, 2022
@alxndrdiaz alxndrdiaz self-assigned this Sep 9, 2022
@alxndrdiaz alxndrdiaz marked this pull request as draft September 9, 2022 03:11
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
"""
seqtk subseq \\
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seqtk/subseq is already in nf-core (https://github.com/nf-core/modules/blob/master/modules/seqtk/subseq/main.nf), don't make your own here

modules/local/unchunk_blastn.nf Outdated Show resolved Hide resolved
def log = "${prefix}.log"
def output = "${prefix}.blastn.raw"
"""
if [ -s ${fasta} ]; then \\
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This (if really needed) should be in the subworkflow

Comment on lines +25 to +41
blastn -task megablast \\
$args \\
-num_threads $task.cpus \\
-query ${fasta} \\
-db ${db} \\
> $output 2> $log || \\
sleep 30; \
if [ -s $log ]; then \\
echo "Restarting blastn without taxid filter" >> $log; \\
> $output; \
blastn -task megablast \\
$args2 \\
-num_threads $task.cpus \\
-query ${fasta} \\
-db ${db} \\
> $output 2>> $log; \\
fi \\
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you could do this in the subworkflow by calling the nfcore module https://github.com/nf-core/modules/blob/master/modules/blast/blastn/main.nf

val evalue

output:
path "*.nohit.txt" , emit: nohit_list
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

meta needs to be propagated

modules/local/get_nohit_list.nf Outdated Show resolved Hide resolved
alxndrdiaz and others added 2 commits September 20, 2022 10:31
removed prefix.log file

Co-authored-by: Matthieu Muffato <[email protected]>
deleted args

Co-authored-by: Matthieu Muffato <[email protected]>
@alxndrdiaz alxndrdiaz linked an issue Sep 23, 2022 that may be closed by this pull request
@priyanka-surana priyanka-surana deleted the blastn_subworkflow branch May 5, 2023 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvement of the existing features
Projects
Development

Successfully merging this pull request may close these issues.

subworkflow: blastn
3 participants