Skip to content

Commit

Permalink
chore(#3): Copy over Homer modules
Browse files Browse the repository at this point in the history
  • Loading branch information
edmundmiller committed Nov 16, 2024
1 parent c8e1564 commit aec3ce5
Show file tree
Hide file tree
Showing 2 changed files with 97 additions and 0 deletions.
45 changes: 45 additions & 0 deletions modules/local/homer/createuniqmap/main.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
process HOMER_CREATEUNIQMAP {
tag "$meta.id"
label 'process_medium'
label 'process_long'

conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/homer:4.11--pl526hc9558a2_3' :
'biocontainers/homer:4.11--pl526hc9558a2_3' }"

input:
path(mappable_regions)

output:
path("uniqmap/"), emit: uniqmap_dir
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 VERSION = '4.11'
"""
mkdir -p uniqmap
homerTools special uniqmap uniqmap/ $mappable_regions
cat <<-END_VERSIONS > versions.yml
"${task.process}":
homer: $VERSION
END_VERSIONS
"""

stub:
def VERSION = '4.11'
"""
mkdir -p uniqmap
cat <<-END_VERSIONS > versions.yml
"${task.process}":
homer: $VERSION
END_VERSIONS
"""
}
52 changes: 52 additions & 0 deletions modules/local/homer/getmappableregions/main.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
process HOMER_GETMAPPABLEREGIONS {
tag "${fasta_files[0].baseName}"
label 'process_high_memory'
label 'process_long'


conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/homer:4.11--pl526hc9558a2_3' :
'community.wave.seqera.io/library/homer:4.11--e7dc4a041f589d54' }"

input:
path(fasta_files, arity: '1..*')
val(parallel_sequences)
val(read_length)

output:
path("*.txt"), emit: txt
path "versions.yml" , emit: versions

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

script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${fasta_files[0].baseName}"
def VERSION = '4.11'
"""
getMappableRegions \\
$parallel_sequences \\
$read_length \\
$fasta_files \\
> ${prefix}.${read_length}nt.txt
cat <<-END_VERSIONS > versions.yml
"${task.process}":
homer: $VERSION
END_VERSIONS
"""

stub:
def prefix = task.ext.prefix ?: "${meta.id}"
def VERSION = '4.11'
"""
touch ${prefix}.${read_length}nt.txt
cat <<-END_VERSIONS > versions.yml
"${task.process}":
homer: $VERSION
END_VERSIONS
"""
}

0 comments on commit aec3ce5

Please sign in to comment.