@@ -9,17 +9,10 @@ process MINIMAP2_ALIGN {
99 input:
1010 tuple val(meta), path(fastq)
1111 path(genome_index)
12- // tuple val(meta2), path(reference)
13- // val bam_format
14- // val bam_index_extension
15- // val cigar_paf_format
16- // val cigar_bam
1712
1813 output:
19- // tuple val(meta), path("*.paf") , optional: true, emit: paf
20- tuple val(meta), path(" *.sam" ) , optional: true , emit: sam
21- // tuple val(meta), path("*.bam.${bam_index_extension}"), optional: true, emit: index
22- path " versions.yml" , emit: versions
14+ tuple val(meta), path(" *.sam" ) , optional: true , emit: sam
15+ path " versions.yml" , emit: versions
2316
2417 when:
2518 task. ext. when == null || task. ext. when
@@ -28,29 +21,13 @@ process MINIMAP2_ALIGN {
2821 // This can be expanded eventually to allow cDNA mapping, etc.
2922 def args = task. ext. args ?: ' '
3023 def prefix = task. ext. prefix ?: " ${ meta.id} _${ meta.replicate} _minimap2"
31- def dRNA_preset = task. ext. dRNA_preset ?: " -ax splice -uf"
32- def kmer = task. ext. kmer ?: " -k 14"
33- // def mismatch_tag = (params.talon ) ? "--MD"
34- /*
35- def args2 = task.ext.args2 ?: ''
36- def args3 = task.ext.args3 ?: ''
37- def args4 = task.ext.args4 ?: ''
38- def bam_index = bam_index_extension ? "${prefix}.bam##idx##${prefix}.bam.${bam_index_extension} --write-index" : "${prefix}.bam"
39- def bam_output = bam_format ? "-a | samtools sort -@ ${task.cpus-1} -o ${bam_index} ${args2}" : "-o ${prefix}.paf"
40- def cigar_paf = cigar_paf_format && !bam_format ? "-c" : ''
41- def set_cigar_bam = cigar_bam && bam_format ? "-L" : ''
42- def bam_input = "${reads.extension}".matches('sam|bam|cram')
43- def samtools_reset_fastq = bam_input ? "samtools reset --threads ${task.cpus-1} $args3 $reads | samtools fastq --threads ${task.cpus-1} $args4 |" : ''
44- def query = bam_input ? "-" : reads
45- def target = reference ?: (bam_input ? error("BAM input requires reference") : reads)
46- */
24+ // def dRNA_preset = task.ext.dRNA_preset ?: "-ax splice -uf"
25+ def preset = (params. sequencing_type == ' ont-drna' ) ?: " -ax splice -uf" : " -ax splice"
26+ def kmer = (params. sequencing_type == ' ont-drna' ) ?: " -k 14" : " "
4727
48- // $samtools_reset_fastq \\
49- // $set_cigar_bam \\
50- // $bam_output
5128 """
5229 minimap2 \\
53- ${ dRNA_preset } \\
30+ ${ preset } \\
5431 ${ kmer} \\
5532 -t ${ task.cpus} \\
5633 ${ genome_index} \\
@@ -66,12 +43,8 @@ process MINIMAP2_ALIGN {
6643
6744 stub:
6845 def prefix = task. ext. prefix ?: " ${ meta.id} _${ meta.replicate} _minimap2"
69- def dRNA_preset = task. ext. dRNA_preset ?: " -ax splice -uf"
70- def kmer = task. ext. kmer ?: " -k 14"
71- // def output_file = bam_format ? "${prefix}.bam" : "${prefix}.paf"
72- // def bam_index = bam_index_extension ? "touch ${prefix}.bam.${bam_index_extension}" : ""
73- // def bam_input = "${reads.extension}".matches('sam|bam|cram')
74- // def target = reference ?: (bam_input ? error("BAM input requires reference") : reads)
46+ def preset = (params. sequencing_type == ' ont-drna' ) ?: " -ax splice -uf" : " -ax splice"
47+ def kmer = (params. sequencing_type == ' ont-drna' ) ?: " -k 14" : " "
7548
7649 """
7750 touch ${ prefix} .sam
0 commit comments