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

nf-core smrnaseq release 1.0 #9

Merged
merged 19 commits into from
May 21, 2019
Merged

nf-core smrnaseq release 1.0 #9

merged 19 commits into from
May 21, 2019

Conversation

chuan-wang
Copy link
Contributor

  • Refactors to nf-core smrnaseq;
  • Option for adding sequencing center to bam files from aligner;
  • Switch to Bowtie 1 for the alignment to host reference genome.

Copy link
Member

@apeltzer apeltzer left a comment

Choose a reason for hiding this comment

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

Minor comments by me.

enabled = false
}

process {
Copy link
Member

Choose a reason for hiding this comment

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

This still has the old process$ syntax you replaced further up in the other configs - maybe that would be good here too?


process {
// Environment modules and resource requirements
$makeBowtieIndex.module = ['bioinfo-tools', 'Fastx/0.0.14', 'bowtie/1.2.0']
Copy link
Member

Choose a reason for hiding this comment

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

Same here - process$ instead of withName:

@@ -13,6 +13,7 @@
process {
executor = 'slurm'
clusterOptions = { "-A $params.project ${params.clusterOptions ?: ''}" }
container = "docker://$wf_container"
Copy link
Member

Choose a reason for hiding this comment

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

You don#t need the docker prefix anymore.
And you could have something like in the base profile here: https://github.com/nf-core/rnaseq/blob/2cf2f0f779d39463b09d874449cbb9fdb9f58d2f/conf/base.config#L14
inside the profile here too - initializing the variable in nextflow.config https://github.com/nf-core/rnaseq/blob/2cf2f0f779d39463b09d874449cbb9fdb9f58d2f/nextflow.config#L15

@chuan-wang chuan-wang mentioned this pull request Aug 9, 2018
@chuan-wang
Copy link
Contributor Author

This PR closes #10

Copy link
Member

@ewels ewels left a comment

Choose a reason for hiding this comment

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

Looks good! A few comments, though all minor things.

main.nf Outdated
@@ -84,6 +85,31 @@ if (params.help){
exit 0
}

// Pipeline options
params.name = false
Copy link
Member

Choose a reason for hiding this comment

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

Please don't move all of these into main.nf - they should be in nextflow.config. This is because the nf-core linting tests we do use the nextflow config -flat . to pull out all of the config options. This nextflow command doesn't look in main.nf sadly.

nf_required_version = '0.30.2' // Minimum version of nextflow required
container = 'nfcore/smrnaseq:latest' // Container slug. Stable releases should specify release tag!!

// Pipeline options
params.name = false
Copy link
Member

Choose a reason for hiding this comment

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

I guess you moved these to main.nf because they weren't working here. The reason is because of this code is inside the params { block starting on L11 but also prefixes the variables with params.. So this means that the variables end up being for example params.params.name.

To fix, just remove the params. prefix on these lines 👍

README.md Outdated

**nf-core/smrnaseq** is a bioinformatics best-practice analysis pipeline used for small RNA sequencing data at the [National Genomics Infastructure](https://ngisweden.scilifelab.se/)
at [SciLifeLab Stockholm](https://www.scilifelab.se/platforms/ngi/), Sweden.
**nf-core/smrnaseq** is a bioinformatics best-practice analysis pipeline used for small RNA sequencing data. It is developed at the [National Genomics Infastructure](https://ngisweden.scilifelab.se/) at [SciLifeLab Stockholm](https://www.scilifelab.se/platforms/ngi/), Sweden.
Copy link
Member

Choose a reason for hiding this comment

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

Please remove the stuff that's specifically references SciLifeLab like this. See https://github.com/nf-core/methylseq for an example of this introduction text.


<p align="center"><a href="stand_alone/http://www.scilifelab.se/" target="_blank"><img src="docs/images/SciLifeLab_logo.png" title="SciLifeLab"></a></p>
### Credits
These scripts were originally written for use at the [National Genomics Infrastructure](https://portal.scilifelab.se/genomics/) at [SciLifeLab](http://www.scilifelab.se/) in Stockholm, Sweden, by Phil Ewels (@ewels), Chuan Wang (@chuan-wang) and Rickard Hammarén (@Hammarn)
Copy link
Member

Choose a reason for hiding this comment

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

This bit is fine :)

VERSION 1.0

%environment
PATH=/opt/conda/envs/nfcore-smrnaseq-1.0/bin:$PATH
Copy link
Member

Choose a reason for hiding this comment

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

The below %post command also needs updating sorry (I forgot this when we were talking before). Should be:

%post
    /opt/conda/bin/conda env create -f /environment.yml
    /opt/conda/bin/conda clean -a

@@ -313,6 +340,7 @@ process bowtie_miRBase_mature {
script:
index_base = index.toString().tokenize(' ')[0].tokenize('.')[0]
prefix = reads.toString() - ~/(.R1)?(_R1)?(_trimmed)?(\.fq)?(\.fastq)?(\.gz)?$/
seqCenter = params.seqCenter ? "--sam-RG ID:${prefix} --sam-RG 'CN:${params.seqCenter}'" : ''
Copy link
Member

Choose a reason for hiding this comment

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

To remove all whitespace from the string, you can use .${params.seqCenter.replaceAll("\\s","")}:

seqCenter = params.seqCenter ? "--sam-RG ID:${prefix} --sam-RG 'CN:${params.seqCenter.replaceAll("\\s","")}'" : ''

Copy link
Member

Choose a reason for hiding this comment

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

Done 👍

main.nf Outdated
@@ -325,6 +353,7 @@ process bowtie_miRBase_mature {
--strata \\
-e 99999 \\
--chunkmbs 2048 \\
$seqCenter \\
Copy link
Member

Choose a reason for hiding this comment

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

Minor thing, but for these kinds of flags I usually don't put them on their own line. It should work fine, but most people won't set it and will have a blank line in their command which can look kind of scary in the logs.

@@ -351,6 +380,7 @@ process bowtie_miRBase_hairpin {
script:
index_base = index.toString().tokenize(' ')[0].tokenize('.')[0]
prefix = reads.toString() - '.mature_unmapped.fq.gz'
seqCenter = params.seqCenter ? "--sam-RG ID:${prefix} --sam-RG 'CN:${params.seqCenter}'" : ''
Copy link
Member

Choose a reason for hiding this comment

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

As above with removing whitespace

Copy link
Member

Choose a reason for hiding this comment

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

Done 👍

main.nf Outdated
@@ -363,6 +393,7 @@ process bowtie_miRBase_hairpin {
-e 99999 \\
--chunkmbs 2048 \\
-q <(zcat $reads) \\
$seqCenter \\
Copy link
Member

Choose a reason for hiding this comment

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

As above about putting it on the same line as another option

main.nf Outdated
--strata \\
-e 99999 \\
--chunkmbs 2048 \\
$seqCenter \\
Copy link
Member

Choose a reason for hiding this comment

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

As above with the newlines

@ewels
Copy link
Member

ewels commented Aug 10, 2018

Final thing @chuan-wang - please could you update the conda tools to their latest version? This is something we should do for each release:

  • trim-galore=0.4.5, 0.5.0 available
  • samtools=1.8, 1.9 available
  • multiqc=1.5, 1.6 available

(please mention in the changelog)

Copy link
Member

@apeltzer apeltzer left a comment

Choose a reason for hiding this comment

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

Hmm, why are you moving these to the main.nf and not keeping these in nextflow.config as usual?

@chuan-wang
Copy link
Contributor Author

Hi, the pipeline only ran with the parameters of reference in main.nf.

@apeltzer
Copy link
Member

Hmm, I'll have a look later. Will land in a couple of minutes and loose internet connection therefore...

Copy link
Member

@ewels ewels left a comment

Choose a reason for hiding this comment

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

A couple of final changes! Sorry! Nearly there....

CHANGELOG.md Outdated
* Add option for sequencing centre in BAM file.
* Software updates: trim-galore 0.4.5 to 0.5.0; samtools 1.8 to 1.9; multiqc 1.5 to 1.6.

Change bowtie parameters from `bowtie -n x -l 15 -k 10 --best (x=0 for mature and x=1 for hairpin)` into `bowtie -k 1 -m 1 --best --strata`.

## [0.1dev](https://github.com/SciLifeLab/NGI-smRNAseq/releases/tag/0.1dev) - 2018-05-14
Copy link
Member

Choose a reason for hiding this comment

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

Please remove this section - instead just have a line saying that the pipeline was originally called https://github.com/SciLifeLab/NGI-smRNAseq and that previous versions can be seen there.

@@ -4,4 +4,4 @@ LABEL authors="alex.peltzer@gmail.com" \
description="Docker image containing all requirements for nf-core/smrnaseq pipeline"

COPY environment.yml /
RUN conda env update -n root -f /environment.yml && conda clean -a
Copy link
Member

Choose a reason for hiding this comment

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

As you updated the Singularity file to use the new (reverted) syntax where we do create instead of update -n root, please also update the Dockerfile here.

params.skip_fastqc = false
params.skip_multiqc = false
name = false
project = false
Copy link
Member

Choose a reason for hiding this comment

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

Looks like singleEnd has gone missing here.

Copy link
Member

Choose a reason for hiding this comment

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

Correction: we don't ever run paired end data in this pipeline, so it doesn't make sense to define params.singleEnd in this pipeline. So the warning from the lint tests is acceptable.

@drpatelh
Copy link
Member

@ewels @apeltzer @chuan-wang

How far off is this PR to being merged? We will need to do some major updates to this pipeline in order to bring it in line with the latest template code. I don't see a dev branch either which is why I'm wondering how we should manage this PR.

@apeltzer
Copy link
Member

Maybe we could change this to merge in a new branch dev and work on it afterwards ?

Sent with GitHawk

@drpatelh
Copy link
Member

Yes. That makes sense. Ill try and update the template code when I get a moment.

@drpatelh drpatelh changed the base branch from master to dev April 27, 2019 16:33
@drpatelh
Copy link
Member

Ive added a dev branch and changed the base branch for this PR.

Ill leave it up to you guys as to how you want to merge/fix this PR because you have requested changes. Also, lint and pipeline tests were failing at the time with Travis CI...

@lpantano
Copy link
Contributor

Hi all,

I would really like to work on the pipeline, anything I can do to push this forward and start implementing some other tools and strategies?

Can I address the revisions?

Thanks!

@drpatelh
Copy link
Member

That would be great @lpantano ! Sorry, I haven't had time to update the template code.

I think we should maybe just merge this PR as it stands and then you can develop the pipeline from that point on to get everything working.

@lpantano
Copy link
Contributor

I am happy with that, maybe that works better, so +1 from me.

@apeltzer
Copy link
Member

Go ahead - glad if someone takes care @lpantano !

@apeltzer apeltzer merged commit f83cb2a into nf-core:dev May 21, 2019
@apeltzer
Copy link
Member

Ok I just merged this to dev - please create a branch off it and then improve the open issues / points on it to make this work / follow the latest template :-)

@lpantano
Copy link
Contributor

perfect! thanks.

nschcolnicov pushed a commit that referenced this pull request Oct 10, 2024
Template update for nf-core/tools version 1.9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants