diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 347fe09e..137442cd 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -38,8 +38,8 @@ If applicable, add screenshots to help explain your problem. **Please complete the following information:** - OS: [e.g. Ubuntu] - - Nextflow Version: [e.g. 20.04.1] - - vsn-pipelines Version: [e.g. 0.14.2] + - Nextflow Version: [e.g. 20.10.0] + - vsn-pipelines Version: [e.g. 0.26.1] **Additional context** Add any other context about the problem here. diff --git a/docs/getting-started.rst b/docs/getting-started.rst index f162918f..b24e94bf 100644 --- a/docs/getting-started.rst +++ b/docs/getting-started.rst @@ -23,7 +23,7 @@ Make sure you have the following software installed, - Nextflow_ - - Currently VSN-Pipelines requires Nextflow version ``20.04.1`` + - Currently VSN-Pipelines requires Nextflow version ``20.10.0`` or higher. - A container system, either of: @@ -68,7 +68,7 @@ Example Output .. code:: shell $ nextflow -C nextflow.config run $VSN -entry single_sample - N E X T F L O W ~ version 20.04.1 + N E X T F L O W ~ version 20.10.0 Launching `/staging/leuven/stg_00002/lcb/dwmax/documents/aertslab/GitHub/vib-singlecell-nf/vsn-pipelines/main.nf` [silly_pare] - revision: 77be3ba59d WARN: DSL 2 IS AN EXPERIMENTAL FEATURE UNDER DEVELOPMENT -- SYNTAX MAY CHANGE IN FUTURE RELEASE executor > local (83) diff --git a/docs/pipelines.rst b/docs/pipelines.rst index 749bd236..81876d85 100644 --- a/docs/pipelines.rst +++ b/docs/pipelines.rst @@ -559,7 +559,7 @@ First, generate the config : Make sure the following parts of the generated config are properly set: -.. code:: bash +.. code:: groovy [...] data { @@ -597,9 +597,48 @@ Make sure the following parts of the generated config are properly set: Now we can run it with the following command: -.. code:: groovy +.. code:: bash nextflow -C nextflow.config \ run ~/vib-singlecell-nf/vsn-pipelines \ -entry cell_filter + +**sra** |sra| +------------- + +.. |sra| image:: https://github.com/vib-singlecell-nf/vsn-pipelines/workflows/cell_annotate_filter/badge.svg + +Runs the ``sra`` workflow which will download all (or user-defined selected) FASTQ files from a particular SRA project ID and format with properly and humand friendly names. + +First, generate the config : + +.. code:: bash + + nextflow config \ + ~/vib-singlecell-nf/vsn-pipelines \ + -profile sra,singularity \ + > nextflow.config + +NOTE: If you're a VSC user, you might want to add the ``vsc`` profile. + + +Now we can run it with the following command: + +.. code:: bash + + nextflow -C nextflow.config \ + run ~/vib-singlecell-nf/vsn-pipelines \ + -entry cell_filter + + $ nextflow -C nextflow.config run ~/vib-singlecell-nf/vsn-pipelines -entry sra + N E X T F L O W ~ version 20.11.0-edge + Launching `~/vib-singlecell-nf/vsn-pipelines/main.nf` [cranky_kare] - revision: c5e34d476a + executor > local (1) + [c3/4bf7a2] process > sra:DOWNLOAD_FROM_SRA:SRA_TO_METADATA (1) [100%] 1 of 1 _ + [- ] process > sra:DOWNLOAD_FROM_SRA:DOWNLOAD_FASTQS_FROM_SRA_ACC_ID - + [- ] process > sra:DOWNLOAD_FROM_SRA:NORMALIZE_SRA_FASTQS - + [SRR11442507, scATAC_Control_Superior_and_Middle_Temporal_Gyri_1] + [SRR11442506, scATAC_Control_Substantia_Nigra_2] + ... + diff --git a/main.nf b/main.nf index b709a41f..139a42e2 100644 --- a/main.nf +++ b/main.nf @@ -1025,6 +1025,33 @@ workflow nemesh { } +workflow sra { + + main: + include { + getChannel as getSRAChannel; + } from './src/channels/sra' params(params) + include { + DOWNLOAD_FROM_SRA; + } from './src/utils/workflows/downloadFromSRA' params(params) + include { + PUBLISH; + } from "./src/utils/workflows/utils" params(params) + + // Run + DOWNLOAD_FROM_SRA( getSRAChannel( params.data.sra ) ) + if(params.utils?.publish) { + PUBLISH( + DOWNLOAD_FROM_SRA.out, + null, + "fastqs", + null, + false + ) + } + +} + workflow sra_cellranger_bbknn { main: diff --git a/nextflow.config b/nextflow.config index 424bced6..cd0d9e09 100644 --- a/nextflow.config +++ b/nextflow.config @@ -3,7 +3,7 @@ manifest { name = 'vib-singlecell-nf/vsn-pipelines' description = 'A repository of pipelines for single-cell data in Nextflow DSL2' homePage = 'https://github.com/vib-singlecell-nf/vsn-pipelines' - version = '0.26.0' + version = '0.26.1' mainScript = 'main.nf' defaultBranch = 'master' nextflowVersion = '!>=20.10.0' diff --git a/src/channels/sra.nf b/src/channels/sra.nf index 7d7dd37d..402762f6 100644 --- a/src/channels/sra.nf +++ b/src/channels/sra.nf @@ -7,13 +7,13 @@ workflow getChannel { sra main: - channel = Channel.fromList( + data_channel = Channel.fromList( sra ).map { it -> tuple(it.id, it.samples) } emit: - channel + data_channel } \ No newline at end of file diff --git a/src/utils/processes/utils.nf b/src/utils/processes/utils.nf index bbab099f..2186ef09 100644 --- a/src/utils/processes/utils.nf +++ b/src/utils/processes/utils.nf @@ -434,15 +434,14 @@ process SC__PUBLISH { publishDir \ "${getPublishDir(params.global.outdir,toolName)}", \ - mode: "${params.utils.publish?.mode ? params.utils.publish.mode: 'link'}", \ - saveAs: { filename -> "${outputFileName}" } + mode: "${params.utils.publish?.mode ? params.utils.publish.mode: 'link'}" label 'compute_resources__minimal' input: tuple \ val(tag), \ - path(f, stageAs: 'input_file'), \ + path(f), \ val(stashedParams) val(fileOutputSuffix) val(toolName) @@ -464,9 +463,10 @@ process SC__PUBLISH { stashedParams ) """ - if [ ! -f ${outputFileName} ]; then - ln -s input_file "${outputFileName}" - fi + # In case f and outputFileName are colliding, rename to f to dummy tmp filename + mv ${f} tmp + # FIXME: should avoid copying data (currently it's the only option to work without causing #317 and #345) + cp -rL tmp "${outputFileName}" """ }