star module tests

This commit is contained in:
kevinmenden 2021-01-25 09:02:03 +01:00
parent f58c1c1e9e
commit 6444af7b36
2 changed files with 28 additions and 16 deletions

View file

@ -12,30 +12,29 @@ process STAR_ALIGN {
saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), publish_id:meta.id) } saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), publish_id:meta.id) }
// Note: 2.7X indices incompatible with AWS iGenomes. // Note: 2.7X indices incompatible with AWS iGenomes.
conda (params.enable_conda ? "bioconda::star=2.6.1d" : null) conda (params.enable_conda ? 'bioconda::star=2.6.1d' : null)
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
container "https://depot.galaxyproject.org/singularity/star:2.6.1d--0" container 'https://depot.galaxyproject.org/singularity/star:2.6.1d--0'
} else { } else {
container "quay.io/biocontainers/star:2.6.1d--0" container 'quay.io/biocontainers/star:2.6.1d--0'
} }
input: input:
tuple val(meta), path(reads) tuple val(meta), path(reads)
path index path index
path gtf path gtf
output: output:
tuple val(meta), path("*Aligned.out.bam") , emit: bam tuple val(meta), path('*Aligned.out.bam') , emit: bam
tuple val(meta), path("*Log.final.out") , emit: log_final tuple val(meta), path('*Log.final.out') , emit: log_final
tuple val(meta), path("*Log.out") , emit: log_out tuple val(meta), path('*Log.out') , emit: log_out
tuple val(meta), path("*Log.progress.out"), emit: log_progress tuple val(meta), path('*Log.progress.out'), emit: log_progress
path "*.version.txt" , emit: version path '*.version.txt' , emit: version
tuple val(meta), path("*sortedByCoord.out.bam") , optional:true, emit: bam_sorted tuple val(meta), path('*sortedByCoord.out.bam') , optional:true, emit: bam_sorted
tuple val(meta), path("*toTranscriptome.out.bam"), optional:true, emit: bam_transcript tuple val(meta), path('*toTranscriptome.out.bam'), optional:true, emit: bam_transcript
tuple val(meta), path("*fastq.gz") , optional:true, emit: fastq tuple val(meta), path('*fastq.gz') , optional:true, emit: fastq
tuple val(meta), path("*.tab") , optional:true, emit: tab tuple val(meta), path('*.tab') , optional:true, emit: tab
script: script:
def software = getSoftwareName(task.process) def software = getSoftwareName(task.process)
@ -48,6 +47,7 @@ process STAR_ALIGN {
--readFilesIn $reads \\ --readFilesIn $reads \\
--runThreadN $task.cpus \\ --runThreadN $task.cpus \\
--outFileNamePrefix $prefix. \\ --outFileNamePrefix $prefix. \\
--outSAMtype BAM Unsorted \\
$ignore_gtf \\ $ignore_gtf \\
$seq_center \\ $seq_center \\
$options.args $options.args

View file

@ -1,9 +1,10 @@
#!/usr/bin/env nextflow #!/usr/bin/env nextflow
nextflow.enable.dsl = 2 nextflow.enable.dsl = 2
def options_align = [args: '--readFilesCommand zcat']
include { STAR_ALIGN } from '../../../software/star/align/main.nf' addParams( options: [:] ) def options_gg = [args: '--genomeSAindexNbases 9']
include { STAR_GENOMEGENERATE } from '../../../software/star/genomegenerate/main.nf' addParams( options: [:] ) include { STAR_ALIGN } from '../../../software/star/align/main.nf' addParams( options: options_align )
include { STAR_GENOMEGENERATE } from '../../../software/star/genomegenerate/main.nf' addParams( options: options_gg )
workflow test_star_genomegenerate { workflow test_star_genomegenerate {
fasta = file("${launchDir}/tests/data/fasta/E_coli/GCF_000019425.1_ASM1942v1_genomic.fna", checkIfExists: true) fasta = file("${launchDir}/tests/data/fasta/E_coli/GCF_000019425.1_ASM1942v1_genomic.fna", checkIfExists: true)
@ -11,6 +12,17 @@ workflow test_star_genomegenerate {
STAR_GENOMEGENERATE ( fasta, gtf ) STAR_GENOMEGENERATE ( fasta, gtf )
} }
workflow test_star_alignment_single_end {
fasta = file("${launchDir}/tests/data/fasta/E_coli/GCF_000019425.1_ASM1942v1_genomic.fna", checkIfExists: true)
gtf = file("${launchDir}/tests/data/gff/GCF_000019425.1_ASM1942v1_genomic.gtf", checkIfExists: true)
STAR_GENOMEGENERATE ( fasta, gtf )
input = [ [ id:'test', single_end:true ], // meta map
[ file("${launchDir}/tests/data/fastq/rna/test_single_end.fastq.gz", checkIfExists: true) ] ]
STAR_ALIGN( input, STAR_GENOMEGENERATE.out.index, gtf)
}
// workflow test_star_alignment_single_end { // workflow test_star_alignment_single_end {
// fasta = file("${launchDir}/tests/data/fasta/E_coli/NC_010473.fa", checkIfExists: true) // fasta = file("${launchDir}/tests/data/fasta/E_coli/NC_010473.fa", checkIfExists: true)