Skip to content
This repository has been archived by the owner on Apr 19, 2023. It is now read-only.

Commit

Permalink
Merge pull request #347 from vib-singlecell-nf/develop
Browse files Browse the repository at this point in the history
Develop for 0.26.1
  • Loading branch information
dweemx authored Jul 5, 2021
2 parents 366732c + 1abd4dc commit 962111a
Show file tree
Hide file tree
Showing 7 changed files with 81 additions and 15 deletions.
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
4 changes: 2 additions & 2 deletions docs/getting-started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down Expand Up @@ -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)
Expand Down
43 changes: 41 additions & 2 deletions docs/pipelines.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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]
...
27 changes: 27 additions & 0 deletions main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
4 changes: 2 additions & 2 deletions src/channels/sra.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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

}
12 changes: 6 additions & 6 deletions src/utils/processes/utils.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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}"
"""
}

Expand Down

0 comments on commit 962111a

Please sign in to comment.