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

New nf-core role to pull methylseq, rnaseq, atacseq etc and other changes #332

Merged
merged 23 commits into from
Feb 17, 2020
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
141b42f
Add nf-core role
Dec 6, 2019
6f1baa9
Moved rnaseq, methylseq, ampliseq, atacseq to nfcore and upgraded neu…
aanil Jan 21, 2020
dc62f3b
Updated install.yml with nf-core
aanil Jan 21, 2020
114e370
Incorporate past changes
aanil Jan 21, 2020
858b02f
Update ngi reports and statusdb versions
aanil Jan 23, 2020
e243fba
Update sarek role to move to nf-core
aanil Jan 24, 2020
96eeeea
Revert "Update sarek role to move to nf-core"
aanil Jan 24, 2020
b79ec05
Revert "Update ngi reports and statusdb versions"
aanil Jan 24, 2020
187094f
Revert "Incorporate past changes"
aanil Jan 24, 2020
141f7d1
Revert "Updated install.yml with nf-core"
aanil Jan 24, 2020
f606eb2
Adding back conflicting files
aanil Jan 24, 2020
52094ed
Adding changes to sarek, standalone scripts, taca, rnaseq, methylseq,…
aanil Jan 24, 2020
11517b0
Fix issues in new Sarek script and neutronstar
aanil Jan 27, 2020
9d06e12
Add supernova and minor changes
aanil Jan 30, 2020
485ac02
Syntax bug fix in neutronstar
aanil Jan 30, 2020
381e14e
Update with latest ngi_reports version
aanil Jan 31, 2020
94b086d
Updated neutronstar parameters
aanil Feb 4, 2020
1728f9c
Updated location for downloading multiqc reports on staging env
aanil Feb 5, 2020
38ed3cc
Add export_plots to multiqc config
aanil Feb 6, 2020
cac433e
Removed container lists in nf-core role
aanil Feb 13, 2020
8c0c660
Updated neutronstar to use common irma config plus removed custom con…
aanil Feb 13, 2020
5763420
Updated neutronstar to use profile uppmax
aanil Feb 13, 2020
fc35214
Updated nextflow version
aanil Feb 17, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions host_vars/127.0.0.1/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,7 @@ ngi_pipeline_db_sthlm: "{{ ngi_pipeline_sthlm_path }}/db/records_db_sthlm.sql"
piper_module_version: 1.5.1
gatk_bundle_b37: "/sw/data/uppnex/piper_references/2016-04-07/gatk_bundle/2.8/b37/"

sarek_repo: "https://github.com/SciLifeLab/sarek.git"
sarek_version: "2.3.FIX1"
sarek_tag: "2.3"
sarek_tag: "2.5.2"
sarek_dest: "{{ sw_path }}/sarek"
sarek_containers: "{{ ngi_containers }}/sarek"
sarek_irma_config: "{{ ngi_pipeline_conf }}/sarek_irma.config"
Expand Down
5 changes: 1 addition & 4 deletions install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,12 @@
- { role: arteria-siswrap-ws, tags: arteria-siswrap }
- { role: arteria-delivery-ws, tags: arteria-delivery }
- { role: sarek, tags: sarek }
- { role: rnaseq, tags: rnaseq }
- { role: methylseq, tags: methylseq }
- { role: neutronstar, tags: neutronstar }
- { role: standalone_scripts, tags: standalone_scripts }
- { role: ugc, tags: ugc }
- { role: misc-tools, tags: misc-tools }
- { role: archive-upload-ws, tags: archive-upload }
- { role: ampliseq, tags: ampliseq }
- { role: atacseq, tags: atacseq }
- { role: nf-core, tags: nf-core }

environment: "{{ anaconda_env }}"

Expand Down
7 changes: 0 additions & 7 deletions roles/ampliseq/defaults/main.yml

This file was deleted.

52 changes: 0 additions & 52 deletions roles/ampliseq/tasks/main.yml

This file was deleted.

3 changes: 0 additions & 3 deletions roles/ampliseq/templates/ampliseq_site.config

This file was deleted.

7 changes: 0 additions & 7 deletions roles/atacseq/defaults/main.yml

This file was deleted.

52 changes: 0 additions & 52 deletions roles/atacseq/tasks/main.yml

This file was deleted.

3 changes: 0 additions & 3 deletions roles/atacseq/templates/atacseq_site.config

This file was deleted.

7 changes: 0 additions & 7 deletions roles/methylseq/defaults/main.yml

This file was deleted.

56 changes: 0 additions & 56 deletions roles/methylseq/tasks/main.yml

This file was deleted.

12 changes: 0 additions & 12 deletions roles/methylseq/templates/methylseq_site.config

This file was deleted.

2 changes: 1 addition & 1 deletion roles/multiqc/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
multiqc_repo: https://github.com/ewels/MultiQC.git
multiqc_dest: "{{ sw_path }}/multiqc"
multiqc_version: "v1.7"
multiqc_version: "v1.8"

multiqc_ngi_repo: https://github.com/NationalGenomicsInfrastructure/MultiQC_NGI.git
multiqc_ngi_dest: "{{ sw_path }}/multiqc_ngi"
Expand Down
4 changes: 2 additions & 2 deletions roles/neutronstar/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ neutronstar_dest: "{{ sw_path }}/neutronstar"
# neutronstar_container_url: "docker://nf-core/neutronstar:{{ rnaseq_version }}"
ewels marked this conversation as resolved.
Show resolved Hide resolved
neutronstar_container_path: "{{ ngi_containers }}/neutronstar"
# neutronstar_image: "neutronstar-{{ neutronstar_version }}.simg"
neutronstar_version: "157a0c904fd5c8de6a174a184aee4a0ac96a871b"
neutronstar_version: "1.0.0"

# Temporary variables whilst under dev by Remi
neutronstar_container_url: "docker://remiolsen/neutronstar"
neutronstar_container_url: "docker://nfcore/neutronstar"
neutronstar_image: "neutronstar.simg"
2 changes: 1 addition & 1 deletion roles/neutronstar/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
- { site: "sthlm", script: "{{ bash_env_sthlm_script }}" }
- { site: "upps", script: "{{ bash_env_upps_script }}" }

- name: Store neutronstar tool version in deployement
- name: Store neutronstar tool version in deployment
lineinfile:
dest: "{{ deployed_tool_versions }}"
line: "neutronstar: {{ neutronstar_version }}"
21 changes: 21 additions & 0 deletions roles/nf-core/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
nextflow_java: "/sw/comp/java/x86_64/sun_jdk1.8.0_151"
nextflow_version_tag: "v19.04.1"
ewels marked this conversation as resolved.
Show resolved Hide resolved
nextflow_download_url: "https://github.com/nextflow-io/nextflow/releases/download/{{ nextflow_version_tag }}/nextflow"
nf_core_env: "/lupus/ngi/irma3/nf-core-env"
pipelines:
- name: rnaseq
release: 1.4.2
containers:
- nf-core-rnaseq-1.4.2.simg
ewels marked this conversation as resolved.
Show resolved Hide resolved
- name: methylseq
release: 1.4
containers:
- nf-core-methylseq-1.4.simg
- name: ampliseq
release: 1.1.2
containers:
- nf-core-ampliseq-1.1.2.simg
- name: atacseq
release: 1.1.0
containers:
- nf-core-atacseq-1.1.0.simg
72 changes: 72 additions & 0 deletions roles/nf-core/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
---

- name: install nf-core
local_action:
module: pip
virtualenv_command: /lupus/ngi/irma3/virtualenv-15.0.0/virtualenv.py
virtualenv: "{{ nf_core_env }}"
name: nf-core
state: present

- name: Download NextFlow
local_action:
get_url url="{{ nextflow_download_url }}" dest="{{ nf_core_env }}/bin" mode="u+rwx,g=rwx"

- name: Install NextFlow
local_action:
module: command
_raw_params: "{{ nf_core_env }}/bin/nextflow"
environment:
NXF_LAUNCHER: "/scratch"
NXF_HOME: "{{ nf_core_env }}/nextflow"
NXF_WORK: "/scratch"

- name: nf-core
command: "{{ nf_core_env }}/bin/nf-core -v download {{ item.name }} --singularity --compress none --outdir {{ sw_path }}{{ item.name }} --release {{ item.release }}"
environment:
PATH: "{{ ansible_env.PATH }}:{{ nf_core_env }}/bin"
ewels marked this conversation as resolved.
Show resolved Hide resolved
args:
chdir: "{{ sw_path }}"
with_items: "{{ pipelines }}"

- name: Create directories for singularity images
file:
path: "{{ ngi_containers }}/{{ item.name }}"
state: directory
mode: g+s
with_items: "{{ pipelines }}"

- name: Move singularity images
shell: "mv {{ sw_path }}{{ item.0.name }}/singularity-images/{{ item.1 }} {{ ngi_containers }}/{{ item.0.name }}/"
ewels marked this conversation as resolved.
Show resolved Hide resolved
with_subelements:
- "{{ pipelines }}"
- containers

- name: Create nf-core config
template:
src: "site.config.j2"
dest: "{{ ngi_pipeline_conf }}/{{ item.0.name }}_{{ item.1.site }}.config"
with_nested:
- "{{ pipelines }}"
- [ { site: "sthlm", project_id: "{{ ngi_pipeline_sthlm_delivery }}" }, { site: "upps", project_id: "{{ ngi_pipeline_upps_delivery }}" }]

- name: Set alias for pipeline
lineinfile:
dest: "{{ ngi_pipeline_conf }}/{{ item.1.script }}"
line: >
alias {{ item.0.name }}='nextflow run {{ sw_path }}{{ item.0.name }}/workflow/main.nf \
ewels marked this conversation as resolved.
Show resolved Hide resolved
--custom_config_base {{ sw_path }}{{ item.0.name }}/configs \
Copy link
Contributor

Choose a reason for hiding this comment

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

If we are using nf-core download then I'm pretty sure that we don't need this line.

Copy link
Member Author

Choose a reason for hiding this comment

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

Will nf-core download link the general site config that we create in the previous step?

Copy link
Member

Choose a reason for hiding this comment

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

@ewels wont the pipeline start look online for configs if you skip this line?

Copy link
Contributor

Choose a reason for hiding this comment

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

No - nf-core download actually edits the pipeline config files to set params.custom_config_base to point to the parent directory (see code). So as long as you leave the directory structure in tact then it should just work..

Copy link
Member Author

Choose a reason for hiding this comment

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

I've removed the custom_config_base option.

Copy link
Member

@alneberg alneberg Feb 13, 2020

Choose a reason for hiding this comment

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

👍
gif

-profile uppmax \
-c {{ ngi_pipeline_conf }}/nextflow_irma_{{ item.1.site }}.config \
-c {{ ngi_pipeline_conf }}/{{ item.0.name }}_{{ item.1.site }}.config'
ewels marked this conversation as resolved.
Show resolved Hide resolved
backup: no
with_nested:
- "{{ pipelines }}"
- [ { site: "sthlm", script: "{{ bash_env_sthlm_script }}" }, { site: "upps", script: "{{ bash_env_upps_script }}" } ]

- name: Store tool version in deployment
lineinfile:
dest: "{{ deployed_tool_versions }}"
line: "{{ item.name }}: {{ item.release }}"
with_items:
- "{{ pipelines }}"
20 changes: 20 additions & 0 deletions roles/nf-core/templates/site.config.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
process {
{% for i in item.0.containers %}
container = '{{ ngi_containers }}/{{ item.0.name }}/{{ i }}'
{% endfor %}
ewels marked this conversation as resolved.
Show resolved Hide resolved
{% if item.0.name=='methylseq' %}
memory = { 15.GB * task.attempt }
time = { 6.h * task.attempt }

withName:qualimap {
cpus = { 4 * task.attempt }
memory = { 62.GB * task.attempt }
time = { 2.d * task.attempt }
}
{% endif %}
}
params {
{% if item.0.name=='rnaseq' %}
reverse_stranded = true
{% endif %}
}
2 changes: 1 addition & 1 deletion roles/ngi_pipeline/templates/irma_ngi_config.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ analysis:
analysis_engine: ngi_pipeline.engines.qc_ngi
RNA-seq:
analysis_engine: ngi_pipeline.engines.rna_ngi
ngi_nf_path: {{ rnaseq_dest }}/main.nf
ngi_nf_path: {{ sw_path }}rnaseq/workflow/main.nf
ewels marked this conversation as resolved.
Show resolved Hide resolved
sthlm_ngi_conf: {{ sthlm_rna_seq_conf }}
upps_ngi_conf: {{ upps_rna_seq_conf }}
wgs_germline:
Expand Down
2 changes: 1 addition & 1 deletion roles/ngi_reports/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
ngi_reports_repo: https://github.com/NationalGenomicsInfrastructure/ngi_reports.git
ngi_reports_dest: "{{ sw_path }}/ngi_reports"
ngi_reports_version: 4cd7e236586cc5853f0a58f28edad0a6d5e224a8
ngi_reports_version: 42dddcd8728afc4740643de839aefaa8fcb4fb44
ngi_reports_log: "/log/ngi_reports.log"
ngi_reports_log_sthlm: "{{ ngi_pipeline_sthlm_path }}/{{ ngi_reports_log }}"
ngi_reports_log_upps: "{{ ngi_pipeline_upps_path }}/{{ ngi_reports_log }}"
Expand Down
Loading