Skip to content
Snippets Groups Projects
Commit 7c5228b0 authored by Houry Rana's avatar Houry Rana
Browse files

:fasta bed

parent 787e1a87
No related branches found
No related tags found
No related merge requests found
...@@ -9,6 +9,9 @@ profiles { ...@@ -9,6 +9,9 @@ profiles {
withName: trimming { withName: trimming {
container = "urqt:d62c1f8" container = "urqt:d62c1f8"
} }
withName: fasta_from_bed {
container = "bedtools:2.25.0"
}
} }
} }
psmn { psmn {
...@@ -32,8 +35,17 @@ profiles { ...@@ -32,8 +35,17 @@ profiles {
queue = 'E5-2670deb128A,E5-2670deb128B,E5-2670deb128C,E5-2670deb128D,E5-2670deb128E,E5-2670deb128F' queue = 'E5-2670deb128A,E5-2670deb128B,E5-2670deb128C,E5-2670deb128D,E5-2670deb128E,E5-2670deb128F'
penv = 'openmp16' penv = 'openmp16'
} }
withName: fasta_from_bed {
beforeScript = "source /usr/share/lmod/lmod/init/bash; module use ~/privatemodules"
module = "BEDtools/2.25.0"
executor = "sge"
clusterOptions = "-m e -cwd -V"
memory = "20GB"
time = "12h"
queue = 'monointeldeb128'
}
} }
} }
} } .
...@@ -44,3 +44,47 @@ UrQt --t 20 --m ${task.cpus} --gz \ ...@@ -44,3 +44,47 @@ UrQt --t 20 --m ${task.cpus} --gz \
""" """
} }
/*
* bedtools :
* Imputs : fasta files
* Imputs : bed files
* Output : fasta files
*/
/* fasta extraction */
params.fasta = "$baseDir/data/fasta/*.fasta"
params.bed = "$baseDir/data/annot/*.bed"
log.info "fasta file : ${params.fasta}"
log.info "bed file : ${params.bed}"
Channel
.fromPath( params.fasta )
.ifEmpty { error "Cannot find any fasta files matching: ${params.fasta}" }
.set { fasta_files }
Channel
.fromPath( params.bed )
.ifEmpty { error "Cannot find any bed files matching: ${params.bed}" }
.set { bed_files }
process fasta_from_bed {
tag "${bed.baseName}"
cpus 4
publishDir "results/fasta/", mode: 'copy'
input:
file fasta from fasta_files
file bed from bed_files
output:
file "*_extracted.fasta" into fasta_files_extracted
script:
"""
bedtools getfasta -name \
-fi ${fasta} -bed ${bed} -fo ${bed.baseName}_extracted.fasta
"""
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment