Merge branch 'master' into cellranger-7.0.0

This commit is contained in:
Gisela Gabernet 2022-06-10 11:19:57 +02:00 committed by GitHub
commit 5a16cf7bae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 137 additions and 1 deletions

View file

@ -0,0 +1,40 @@
process SEXDETERRMINE {
tag "$meta.id"
label 'process_low'
conda (params.enable_conda ? "bioconda::sexdeterrmine=1.1.2" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/sexdeterrmine:1.1.2--hdfd78af_1':
'quay.io/biocontainers/sexdeterrmine:1.1.2--hdfd78af_1' }"
input:
tuple val(meta), path(depth)
path sample_list_file
output:
tuple val(meta), path("*.json"), emit: json
tuple val(meta), path("*.tsv") , emit: tsv
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}"
def sample_list = sample_list_file ? '-f ${sample_list_file}' : ''
if ("$depth" == "${prefix}.tsv") error "Input depth and output TSV names are the same, set prefix in module configuration to disambiguate!"
"""
sexdeterrmine \\
-I $depth \\
$sample_list \\
$args \\
> ${prefix}.tsv
cat <<-END_VERSIONS > versions.yml
"${task.process}":
sexdeterrmine: \$(echo \$(sexdeterrmine --version 2>&1))
END_VERSIONS
"""
}

View file

@ -0,0 +1,48 @@
name: "sexdeterrmine"
description: Calculate the relative coverage on the Gonosomes vs Autosomes from the output of samtools depth, with error bars.
keywords:
- sex determination
- genetic sex
- relative coverage
- ancient dna
tools:
- "sexdeterrmine":
description: "A python script carry out calculate the relative coverage of X and Y chromosomes, and their associated error bars, out of capture data."
homepage: "https://github.com/TCLamnidis/Sex.DetERRmine"
documentation: "https://github.com/TCLamnidis/Sex.DetERRmine/README.md"
tool_dev_url: "https://github.com/TCLamnidis/Sex.DetERRmine"
doi: "https://doi.org/10.1038/s41467-018-07483-5"
licence: "['GPL v3']"
input:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- depth:
type: file
description: Output from samtools depth (with header)
pattern: "*"
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"
- json:
type: file
description: JSON formatted table of relative coverages on the X and Y, with associated error bars.
pattern: "*.json"
- tsv:
type: file
description: TSV table of relative coverages on the X and Y, with associated error bars.
pattern: "*.tsv"
authors:
- "@TCLamnidis"

View file

@ -1851,6 +1851,10 @@ seqwish/induce:
- modules/seqwish/induce/**
- tests/modules/seqwish/induce/**
sexdeterrmine:
- modules/sexdeterrmine/**
- tests/modules/sexdeterrmine/**
shasum:
- modules/shasum/**
- tests/modules/shasum/**

View file

@ -232,10 +232,11 @@ params {
test2_paired_end_umi_unsorted_bam = "${test_data_dir}/genomics/homo_sapiens/illumina/bam/umi/test2.paired_end.umi_unsorted.bam"
test2_paired_end_umi_unsorted_tagged_bam = "${test_data_dir}/genomics/homo_sapiens/illumina/bam/umi/test2.paired_end.unsorted_tagged.bam"
mitochon_standin_recalibrated_sorted_bam = "${test_data_dir}/genomics/homo_sapiens/illumina/bam/mitochon_standin.recalibrated.sorted.bam"
mitochon_standin_recalibrated_sorted_bam_bai = "${test_data_dir}/genomics/homo_sapiens/illumina/bam/mitochon_standin.recalibrated.sorted.bam.bai"
test3_single_end_markduplicates_sorted_bam = "${test_data_dir}/genomics/homo_sapiens/illumina/bam/test3.single_end.markduplicates.sorted.bam"
test_paired_end_sorted_cram = "${test_data_dir}/genomics/homo_sapiens/illumina/cram/test.paired_end.sorted.cram"
test_paired_end_sorted_cram_crai = "${test_data_dir}/genomics/homo_sapiens/illumina/cram/test.paired_end.sorted.cram.crai"
test_paired_end_markduplicates_sorted_cram = "${test_data_dir}/genomics/homo_sapiens/illumina/cram/test.paired_end.markduplicates.sorted.cram"

View file

@ -0,0 +1,16 @@
#!/usr/bin/env nextflow
nextflow.enable.dsl = 2
include { SAMTOOLS_DEPTH } from '../../../modules/samtools/depth/main.nf'
include { SEXDETERRMINE } from '../../../modules/sexdeterrmine/main.nf'
workflow test_sexdeterrmine {
input = [
[ id:'test', single_end:false ], // meta map
file(params.test_data['homo_sapiens']['illumina']['test3_single_end_markduplicates_sorted_bam'], checkIfExists: true) ]
SAMTOOLS_DEPTH ( input )
SEXDETERRMINE ( SAMTOOLS_DEPTH.out.tsv, [] )
}

View file

@ -0,0 +1,12 @@
process {
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }
withName:SAMTOOLS_DEPTH {
ext.args = "-H"
}
withName:SEXDETERRMINE {
ext.prefix = { "${meta.id}_sexdet" }
}
}

View file

@ -0,0 +1,15 @@
- name: sexdeterrmine test_sexdeterrmine
command: nextflow run tests/modules/sexdeterrmine -entry test_sexdeterrmine -c tests/config/nextflow.config
tags:
- sexdeterrmine
files:
- path: output/samtools/test.tsv
md5sum: fa2992ca1ea93a6e1b3e838476191935
- path: output/samtools/versions.yml
md5sum: dbd04b700335c8ad236bd667254c8dd8
- path: output/sexdeterrmine/sexdeterrmine.json
md5sum: bafb2419bb8630eda29a251c20e97166
- path: output/sexdeterrmine/test_sexdet.tsv
md5sum: 1cf8a2b97b38353eb97a96ab872dcca9
- path: output/sexdeterrmine/versions.yml
md5sum: 077361101e8e7997aec3da8a01e59eee