Skip to content

Commit

Permalink
add modules
Browse files Browse the repository at this point in the history
  • Loading branch information
yuukiiwa committed Sep 17, 2024
1 parent 5e61982 commit be55066
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 0 deletions.
32 changes: 32 additions & 0 deletions modules/local/f5c_index_eventalign.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
process F5C_INDEX_EVENTALIGN {
tag "$meta.id"
label 'process_medium'

conda "bioconda::nanopolish==0.13.2"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/f5c:1.5--h56e2c18_1' :
'quay.io/biocontainers/f5c:1.5--h56e2c18_1' }"

input:
tuple val(meta), path(genome), path(gtf), path(fastq), path(bam), path(bai), path(blow5)

output:
tuple val(meta), path(genome), path(gtf), path("*eventalign.txt"), path("*summary.txt"), emit: f5c_outputs
path "versions.yml" , emit: versions

when:
task.ext.when == null || task.ext.when

script:
sample_summary = "$meta.id" +"_summary.txt"
sample_eventalign = "$meta.id" +"_eventalign.txt"
"""
f5c index --slow5 $blow5 $fastq
f5c eventalign --reads $fastq --bam $bam --genome $genome --slow5 $blow5 --scale-events --signal-index --summary $sample_summary --threads $task.cpus > $sample_eventalign
cat <<-END_VERSIONS > versions.yml
"${task.process}":
nanopolish: \$( f5c -V | tail -c 4)
END_VERSIONS
"""
}
30 changes: 30 additions & 0 deletions modules/local/slow5tools_f2s_merge.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
process SLOW5_F2S_MERGE {
tag "$meta.id"
label 'process_medium'

conda "bioconda::slow5tools==1.2.0"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/slow5tools:1.2.0--h56e2c18_1' :
'quay.io/biocontainers/slow5tools:1.2.0--h56e2c18_1' }"

input:
tuple val(meta), path(genome), path(gtf), path(fastq), path(bam), path(bai)

output:
tuple val(meta), path(genome), path(gtf), path("*eventalign.txt"), path("*summary.txt"), emit: nanopolish_outputs
path "versions.yml" , emit: versions

when:
task.ext.when == null || task.ext.when

script:
"""
slow5tools f2s fast5_dir -d blow5_dir
slow5tools merge blow5_dir -o file.blow5
cat <<-END_VERSIONS > versions.yml
"${task.process}":
nanopolish: \$( slow5tools -V | head -n 1 | tail -c 6 )
END_VERSIONS
"""
}

0 comments on commit be55066

Please sign in to comment.