Added samtools sort + index

Added container to FastQC
This commit is contained in:
Phil Ewels 2019-12-05 15:35:51 +01:00
parent 5e4c023edd
commit 97fbd32644
9 changed files with 125 additions and 19 deletions

View file

@ -16,3 +16,11 @@ jobs:
- name: FastQC
path: tools/fastqc/*
run: nextflow run ./tools/fastqc/test/
- name: samtools sort
path: tools/samtoosl/sort*
run: nextflow run ./tools/samtools/sort/test/
- name: samtools index
path: tools/samtoosl/index*
run: nextflow run ./tools/samtools/index/test/

View file

@ -1,18 +1,20 @@
process fastqc {
tag "$sample_id"
publishDir "${params.outdir}/fastqc", mode: 'copy',
saveAs: {filename -> filename.indexOf(".zip") > 0 ? "zips/$filename" : "$filename"}
input:
set val(sample_id), file(reads)
output:
file "*_fastqc.{zip,html}"
script:
"""
fastqc -q $reads
fastqc --version &> fastqc.version.txt
"""
}
process fastqc {
tag "$sample_id"
publishDir "${params.outdir}/fastqc", mode: 'copy',
saveAs: {filename -> filename.indexOf(".zip") > 0 ? "zips/$filename" : "$filename"}
container: 'quay.io/biocontainers/fastqc:0.11.8--2'
input:
set val(sample_id), file(reads)
output:
file "*_fastqc.{zip,html}"
script:
"""
fastqc -q $reads
fastqc --version &> fastqc.version.txt
"""
}

View file

@ -12,7 +12,7 @@ tools:
across your reads, the per base sequence content (%A/C/G/T).
You get information about adapter contamination and other
overrepresented sequences.
homepage: hhttps://www.bioinformatics.babraham.ac.uk/projects/fastqc/
homepage: https://www.bioinformatics.babraham.ac.uk/projects/fastqc/
documentation: https://www.bioinformatics.babraham.ac.uk/projects/fastqc/Help/
input:
-

View file

@ -0,0 +1,22 @@
process samtools_index {
tag "${bam.baseName}"
container: 'quay.io/biocontainers/samtools:1.9--h10a08f8_12'
input:
set file(bam)
output:
file "*.sorted.bam"
script:
def suff_mem = ("${(task.memory.toBytes() - 6000000000) / task.cpus}" > 2000000000) ? 'true' : 'false'
def avail_mem = (task.memory && suff_mem) ? "-m" + "${(task.memory.toBytes() - 6000000000) / task.cpus}" : ''
"""
samtools sort $bam \\
-@ ${task.cpus} ${avail_mem} \\
-o ${bam.baseName}.sorted.bam
samtools --version &> v_samtools.txt
"""
}

View file

@ -0,0 +1,27 @@
name: samtools sort
description: Sort a BAM or CRAM file
keywords:
- sort
tools:
- samtools:
description: |
SAMtools is a set of utilities for interacting with and post-processing
short DNA sequence read alignments in the SAM, BAM and CRAM formats, written by Heng Li.
These files are generated as output by short read aligners like BWA.
homepage: http://www.htslib.org/
documentation: hhttp://www.htslib.org/doc/samtools.html
doi: 10.1093/bioinformatics/btp352
input:
-
- input:
type: file
description: Input BAM or CRAM file
pattern: *.{bam,cram}
output:
-
- index:
type: file
description: BAM or CRAM index file
pattern: *.{bai}
authors:
- @ewels

View file

@ -0,0 +1 @@
/* A mini pipeline to test samtools index here */

View file

@ -0,0 +1,18 @@
process samtools_index {
tag "${bam.baseName}"
container: 'quay.io/biocontainers/samtools:1.9--h10a08f8_12'
input:
set file(bam)
output:
file "*.bam.bai"
script:
"""
samtools index $bam
samtools --version &> v_samtools.txt
"""
}

View file

@ -0,0 +1,27 @@
name: samtools sort
description: Sort a BAM or CRAM file
keywords:
- sort
tools:
- samtools:
description: |
SAMtools is a set of utilities for interacting with and post-processing
short DNA sequence read alignments in the SAM, BAM and CRAM formats, written by Heng Li.
These files are generated as output by short read aligners like BWA.
homepage: http://www.htslib.org/
documentation: hhttp://www.htslib.org/doc/samtools.html
doi: 10.1093/bioinformatics/btp352
input:
-
- input:
type: file
description: Input BAM or CRAM file
pattern: *.{bam,cram}
output:
-
- sorted_file:
type: file
description: Sorted BAM or CRAM file
pattern: *.{bam,cram}
authors:
- @ewels

View file

@ -0,0 +1 @@
/* A mini pipeline to test samtools sort here */