Add msisensorpro (#1267)

* Add msisensorpro

* remove absolute paths

* fixing tests

* fix msisensorpro tests

* Update modules/msisensorpro/msi_somatic/main.nf

Co-authored-by: Maxime U. Garcia <maxime.garcia@scilifelab.se>

* Update modules/msisensorpro/msi_somatic/main.nf

Co-authored-by: Maxime U. Garcia <maxime.garcia@scilifelab.se>

* add when back in

* add when back in

* Update modules/msisensorpro/msi_somatic/main.nf

Co-authored-by: Maxime U. Garcia <maxime.garcia@scilifelab.se>

* update description

* Update main.nf

* Update main.nf

* Update main.nf

Co-authored-by: Maxime U. Garcia <maxime.garcia@scilifelab.se>
This commit is contained in:
FriederikeHanssen 2022-02-09 21:05:49 +01:00 committed by GitHub
parent 45acc79667
commit c8ebd0de36
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 299 additions and 0 deletions

View file

@ -0,0 +1,47 @@
process MSISENSORPRO_MSI_SOMATIC {
tag "$meta.id"
label 'process_low'
conda (params.enable_conda ? "bioconda::msisensor-pro=1.2.0" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/msisensor-pro:1.2.0--hfc31af2_0' :
'quay.io/biocontainers/msisensor-pro:1.2.0--hfc31af2_0' }"
input:
tuple val(meta), path(normal), path(normal_index), path(tumor), path(tumor_index), path(intervals)
path (fasta)
path (msisensor_scan)
output:
tuple val(meta), path("${prefix}") , emit: output_report
tuple val(meta), path("${prefix}_dis") , emit: output_dis
tuple val(meta), path("${prefix}_germline"), emit: output_germline
tuple val(meta), path("${prefix}_somatic") , emit: output_somatic
path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
script:
def args = task.ext.args ?: ''
prefix = task.ext.prefix ?: "${meta.id}"
def fasta = fasta ? "-g ${fasta}" : ""
def intervals = intervals ? " -e ${intervals} " : ""
"""
msisensor-pro \\
msi \\
-d ${msisensor_scan} \\
-n ${normal} \\
-t ${tumor} \\
${fasta} \\
-o $prefix \\
-b ${task.cpus} \\
${intervals} \\
$args
cat <<-END_VERSIONS > versions.yml
"${task.process}":
msisensor-pro: \$(msisensor-pro 2>&1 | sed -nE 's/Version:\\sv([0-9]\\.[0-9])/\\1/ p')
END_VERSIONS
"""
}

View file

@ -0,0 +1,80 @@
name: msisensorpro_msi_somatic
description: MSIsensor-pro evaluates Microsatellite Instability (MSI) for cancer patients with next generation sequencing data. It accepts the whole genome sequencing, whole exome sequencing and target region (panel) sequencing data as input
keywords:
- micro-satellite-scan
- msisensor-pro
- msi
- somatic
tools:
- msisensorpro:
description: Microsatellite Instability (MSI) detection using high-throughput sequencing data.
homepage: https://github.com/xjtu-omics/msisensor-pro
documentation: https://github.com/xjtu-omics/msisensor-pro/wiki
tool_dev_url: https://github.com/xjtu-omics/msisensor-pro
doi: "doi.org/10.1016/j.gpb.2020.02.001"
licence: ['Custom Licence']
input:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- normal:
type: file
description: BAM/CRAM/SAM file
pattern: "*.{bam,cram,sam}"
- normal_index:
type: file
description: BAM/CRAM/SAM index file
pattern: "*.{bai,crai,sai}"
- tumor:
type: file
description: BAM/CRAM/SAM file
pattern: "*.{bam,cram,sam}"
- tumor_index:
type: file
description: BAM/CRAM/SAM index file
pattern: "*.{bai,crai,sai}"
- intervals:
type: file
description: bed file containing interval information, optional
pattern: "*.{bed}"
- fasta:
type: file
description: Reference genome
pattern: "*.{fasta}"
- msisensor_scan:
type: file
description: Output from msisensor-pro/scan, conaining list of msi regions
pattern: "*.list"
output:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- output_report:
type: file
description: File containing final report with all detected microsatellites, unstable somatic microsatellites, msi score
- output_dis:
type: file
description: File containing distribution results
- output_germline:
type: file
description: File containing germline results
- output_somatic:
type: file
description: File containing somatic results
- versions:
type: file
description: File containing software versions
pattern: "versions.yml"
- list:
type: file
description: File containing microsatellite list
pattern: "*.{list}"
authors:
- "@FriederikeHanssen"

View file

@ -0,0 +1,35 @@
process MSISENSORPRO_SCAN {
tag "$meta.id"
label 'process_low'
conda (params.enable_conda ? "bioconda::msisensor-pro=1.2.0" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/msisensor-pro:1.2.0--hfc31af2_0' :
'quay.io/biocontainers/msisensor-pro:1.2.0--hfc31af2_0' }"
input:
tuple val(meta), path(fasta)
output:
tuple val(meta), path("*.list"), emit: list
path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
"""
msisensor-pro \\
scan \\
-d $fasta \\
-o ${prefix}.msisensor_scan.list \\
$args
cat <<-END_VERSIONS > versions.yml
"${task.process}":
msisensor-pro: \$(msisensor-pro 2>&1 | sed -nE 's/Version:\\sv([0-9]\\.[0-9])/\\1/ p')
END_VERSIONS
"""
}

View file

@ -0,0 +1,43 @@
name: msisensorpro_scan
description: MSIsensor-pro evaluates Microsatellite Instability (MSI) for cancer patients with next generation sequencing data. It accepts the whole genome sequencing, whole exome sequencing and target region (panel) sequencing data as input
keywords:
- micro-satellite-scan
- msisensor-pro
- scan
tools:
- msisensorpro:
description: Microsatellite Instability (MSI) detection using high-throughput sequencing data.
homepage: https://github.com/xjtu-omics/msisensor-pro
documentation: https://github.com/xjtu-omics/msisensor-pro/wiki
tool_dev_url: https://github.com/xjtu-omics/msisensor-pro
doi: "doi.org/10.1016/j.gpb.2020.02.001"
licence: ['Custom Licence']
input:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- fasta:
type: file
description: Reference genome
pattern: "*.{fasta}"
output:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- versions:
type: file
description: File containing software versions
pattern: "versions.yml"
- list:
type: file
description: File containing microsatellite list
pattern: "*.{list}"
authors:
- "@FriederikeHanssen"

View file

@ -1004,6 +1004,14 @@ msisensor/scan:
- modules/msisensor/scan/** - modules/msisensor/scan/**
- tests/modules/msisensor/scan/** - tests/modules/msisensor/scan/**
msisensorpro/msi_somatic:
- modules/msisensorpro/msi_somatic/**
- tests/modules/msisensorpro/msi_somatic/**
msisensorpro/scan:
- modules/msisensorpro/scan/**
- tests/modules/msisensorpro/scan/**
mtnucratio: mtnucratio:
- modules/mtnucratio/** - modules/mtnucratio/**
- tests/modules/mtnucratio/** - tests/modules/mtnucratio/**

View file

@ -0,0 +1,33 @@
#!/usr/bin/env nextflow
nextflow.enable.dsl = 2
include { MSISENSORPRO_MSI_SOMATIC } from '../../../../modules/msisensorpro/msi_somatic/main.nf'
include { MSISENSORPRO_SCAN } from '../../../../modules/msisensorpro/scan/main.nf'
workflow test_msisensorpro_msi {
scan_in = [
[ id:'test', single_end:false ], // meta map
file(params.test_data['homo_sapiens']['genome']['genome_21_fasta'], checkIfExists: true)
]
println scan_in
MSISENSORPRO_SCAN ( scan_in )
input = [// meta map
[ id:'test'],
file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_cram'], checkIfExists: true),
file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_cram_crai'], checkIfExists: true),
file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_recalibrated_sorted_cram'], checkIfExists: true),
file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_recalibrated_sorted_cram_crai'], checkIfExists: true),
[]
]
fasta = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta'], checkIfExists: true)
MSISENSORPRO_SCAN.out.list.map{meta, list -> [list]}.set{list}
MSISENSORPRO_MSI_SOMATIC(input, fasta, list)
}

View file

@ -0,0 +1,5 @@
process {
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }
}

View file

@ -0,0 +1,18 @@
- name: msisensorpro msi_somatic test_msisensorpro_msi
command: nextflow run tests/modules/msisensorpro/msi_somatic -entry test_msisensorpro_msi -c tests/config/nextflow.config
tags:
- msisensorpro/msi_somatic
- msisensorpro
files:
- path: output/msisensorpro/test
md5sum: db7f2cc99ea79f79b0ba011c4bcbb43d
- path: output/msisensorpro/test.msisensor_scan.list
md5sum: 309d41b136993db24a9f3dade877753b
- path: output/msisensorpro/test_dis
md5sum: fc3e205b7ca50c9ecf3f70c87781e96f
- path: output/msisensorpro/test_germline
md5sum: ba585b355c08877b8bca4901f49d9311
- path: output/msisensorpro/test_somatic
md5sum: 836e617ddded07ec1e39089fd595c3d8
- path: output/msisensorpro/versions.yml
md5sum: b57279502ca6863c5406ed46e6b42994

View file

@ -0,0 +1,15 @@
#!/usr/bin/env nextflow
nextflow.enable.dsl = 2
include { MSISENSORPRO_SCAN } from '../../../../modules/msisensorpro/scan/main.nf'
workflow test_msisensorpro_scan {
input = [
[ id:'test', single_end:false ], // meta map
file(params.test_data['homo_sapiens']['genome']['genome_21_fasta'], checkIfExists: true)
]
MSISENSORPRO_SCAN ( input )
}

View file

@ -0,0 +1,5 @@
process {
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }
}

View file

@ -0,0 +1,10 @@
- name: msisensorpro scan test_msisensorpro_scan
command: nextflow run tests/modules/msisensorpro/scan -entry test_msisensorpro_scan -c tests/config/nextflow.config
tags:
- msisensorpro
- msisensorpro/scan
files:
- path: output/msisensorpro/test.msisensor_scan.list
md5sum: 309d41b136993db24a9f3dade877753b
- path: output/msisensorpro/versions.yml
md5sum: ed713232c854bce5c74d10097101ed06